This question already has answers here:
Multiple Entrypoints in Struts Action (Migration Struts 2.2.3 -> 2.3.1)
(2 answers)
Closed 6 years ago.
I am trying to do a redirectAction to another class, and to invoke a specific method in that class. Basically, when the user hits an "Edit" link in a cell in a table, we get that object and put it
into the Session, and then invoke the Editor class, calling the method which retrieves that object from the Session so it can be displayed in the editor.
This is the way my predecessors wrote the system long ago, and I'd prefer to make as few structural changes as possible.
Upgrading to 2.5 breaks all that. We've narrowed it down to the method parameter:
<result name="editSingle" type="redirectAction">
<param name="actionName">productEdit</param>
<param name="method">getFromSession</param>
</result>
When we run this, we get the
"There is no Action mapped..."
message. When we comment out the <param name="method"> line, it no longer fails, but obviously it never gets to the method we are no longer specifying. The docs for the redirectAction list a few parameters, but method is not among them. So my questions, I suppose, are twofold:
1) Did this really get removed somewhere in the 2.1 -> 2.5 migration journey?
2) How are people handling this removal? We can't be the only ones who've run into this.
1) Did this really get removed somewhere in the 2.1 -> 2.5 migration
journey?
No, I compared Struts 2.5 ServletActionRedirectResult.java with Struts 2.1 ServletActionRedirectResult.java and both are same about parameter method!
Related
This question already has answers here:
Entity Framework Core: DbContextOptionsBuilder does not contain a definition for 'usesqlserver' and no extension method 'usesqlserver'
(35 answers)
Closed 1 year ago.
The tutorial I'm (was) following, they have an option to select "using Microsoft entity framework" but for me, it does not show that potential fix, any advice would be much appreciated.
services.AddMvc();
services.AddDbContext<NewContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
}
Error message screen shot
Your project needs to have the entity framework libraries referenced.
Try adding the "Microsoft.EntityFrameworkCore.SqlServer" nuget package to your project.
Then add the using directive.
Recently iam trying to update my angular project from 8 to 9. While updating i also updated wijmo from wijmo/wijmo to #grapecity/wijmo package as it supports IVY.
But after the completing the upgradation, i can able to compile the application but i am getting the following error at run time
global-error-handler.service.ts:43 Error: Uncaught (in promise): TypeError: (0 , t[n]) is not a function
TypeError: (0 , t[n]) is not a function
at backend.js:61
at Reflect.<anonymous> (backend.js:61)
at push../node_modules/#grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js.__decorate (index.js:28)
at index.js:53
at Object../node_modules/#grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js (index.js:53)
at __webpack_require__ (bootstrap:84)
I'd like to get some more info about this error. The quick thing to check is property initialization order. In Ivy, the properties are interpreted as they are specified in markup (previously wijmo controlled how they were interpreted). So you can break components by setting certain properties before others.
For example, if I tried to set the selectedIndex on a combobox BEFORE I set the data source, then the app would break at runtime because there are no items in the list to select yet.
More info here: https://www.grapecity.com/wijmo/docs/GettingStarted/Angular-Components#property-initialization-order-in-angular-9-ivy-and-higher
The next thing to check is component decorators (if you are inheriting our components). There are some breaking changes in decorators in Ivy.
For example, you might need to add {descendants: true} to ContentChildren queries.
Or you might need to add an #Injectable decorator to your class.
You can read more about breaking changes in Ivy and how to fix them here: https://angular.io/guide/ivy-compatibility-examples
But please feel free to contact us to work directly: wijmoexperts#grapecity.com
I am working on a financial app development in Scala (2.9.0-1) full time in IntelliJ 10.5 last few month and looking into moving to eclipse-ide on and off a few times.
One show stopper has been that class or method reference search by "Reference -> Workspace/Project/Hierarchy".
I have been trying to see if the reference search is working Whenever there is a new version of Scala-IDE out there.
But I get "The Operation Unavailable on the current select. Please select a valid Java element name" (I selected a class defined in scala when I had this popup)
Has anyone solved this issue?
Dev environment
scala: 2.9.0-1
eclipse: 3.7
scala-ide: 2.0.0.beta10-2_09-201109130916-d64e014
m2eclipse: the latest from http://m2eclipse.sonatype.org/sites/m2e
m2eclipse-scala: 0.2.3
My project is defined in maven and imported into scala-ide
Best
BG KO
Find references is not yet implemented in Scala IDE. We are working on it and expect to get it in the first milestone for version 2.1 (rougly 6 weeks from now).
However, you can get a bit farther by using the Java Search window (Ctrl-H) and entering the name of the qualified name of the class or method that you want to search for. It doesn't always work though, so the feature is officially unsupported (work in progress).
I'm using the Entity Framework in C# with a MySQL back-end. Here's the problem section of the code:
using (var entities = new myEntities()) {
Parties = new ObservableCollection<t_party>(
entities.SalesParties
.Include("SalesReps")
.Include("InventoryReservation")
.Include("InventoryReservation.InventoryAssignment")
.Include("InventoryReservation.InventoryAssignment.Inventory")
.ToList()
);
}
When the code runs, I get an error: "Calling 'Read' when the data reader is closed is not a valid operation." The interesting part is that if I remove the .Include("SalesReps") it works just fine. SalesReps and InventoryReservation are both 0..1 multiplicity from the SalesParty end and * from the other end.
I'm using the Entity Framework 4.1 with the "MySQL Connector Net 6.3.7" library. I tried 6.4.x initially, but ran into some other problems between it and the Entity Framework and had to roll back.
The truly mystifying thing is that I recently switched laptops, and it was running fine on the old one! The old one was running Windows 7 on a 32-bit processor, the new one is 64-bit. Not sure if that would affect things by using different libraries, but it's the only other variable I can think of.
I also got the same issue and found that once the using block has been executed, the entities variable will be disposed. So if you try to use it again outside of the block, you will get this error. To solve this problem create entities variable without any using block and then try to run the code.
Im using phpunit & phpundercontrol to run the RC Selenium on every build.
PHPUnit allows you to implement your own TestListener. Custom test listeners implement the abstract methods in the PHPUnit_Framework_TestListener interface. Specifically, your listener will implement:
startTestSuite()
endTestSuite()
startTest()
endTest()
addError()
addFailure()
addSkippedTest()
addIncompleteTest()
Once you've attached the TestListner these methods will be called each time the corresponding events occur in your test suite. These methods will be written to perform the INSERTs and UPDATEs on a test results database that you'll create.
Attaching the listener class to your suite is as easy as adding a tag to the phpunit.xml configuration file. For example:
<phpunit>
<testsuites>[...]</testsuites>
<selenium>[...]</selenium>
<listeners>
<listener class="Database"
file="/usr/loocal/share/pear/PHPUnit/Util/Log/Database.php">
</listeners>
</phpunit>
That's all you need!
In fact, PHPUnit already comes with a working version of the listener I just described (PHPUnit_Util_Log_Database), as well as two different database schema definitions.
On many systems this class will live at /usr/loocal/share/pear/PHPUnit/Util/Log/Database.php, and the schemas at /usr/loocal/share/pear/PHPUnit/Util/Log/Database/MySQL.sql and /usr/loocal/share/pear/PHPUnit/Util/Log/Database/SQLite3.sql. You may have to do some tweaking depending on the DBMS you're using.
See these sections of the documentation (it wont let me post two links:
http://www.phpunit.de/manual/3.4/en/extending-phpunit.html#extending-phpunit.PHPUnit_Framework_TestListener
htp://www.phpunit.de/manual/3.4/en/api.html#api.testresult.tables.testlistener
(StackOverflow won't let me post two links, so you'll have to correct the HTTP in that second one)
I am working on the same problem.
Have asked a related question here a few days ago.
My attempt using Selenium IDE, Selenium RC and perl.
General strategy:
You can make newer releases of phpunit generate TAP output (options --tap, --log-tap).
(TAP is Test Anything Protocol - standardized output format)
Parse the logfile to obtain the suite metadata from the TAP parser object, insert into database using perl, e.g. "# Number of Passed": , "Failed", "Unexpectedly succeeded",