Reputation: 1429
In my Java class DBManager
I have a method
alterRights(int, HashMap<Integer,Right>)
In my JSP file I do
HashMap<Integer,Right> radios = new HashMap<Integer,Right>();
Then I add a few items and then I do
dbm.alterRights(alterKlausurID, radios);
(dbm
is an instance of DBManager
)
And here the exception is thrown. It says: "The method alterRights(int, HashMap) in the type DBManager is not applicable for the arguments (int, HashMap)". In a former version, the method actually was alterRights(int, HashMap<Integer,String>)
, but I changed it and it even worked until I changed something else. I didn't even touch this method or anything that is connected to it. For me it seems that the JSP file loads an older version of dbm
but I don't know how this is even possible.
Upvotes: 0
Views: 1699
Reputation: 328556
The usual problem here is that either JSP or DBManager
wasn't compiled after the change.
Make sure you compile everything in your project. If you let your application server compile JSPs for you, change your build to compile them together with the rest of the code (then, you'd catch such problems while building the project).
In the meantime, read the documentation of your application server and find out how you can flush the JSP compile cache. Chances are that an old version of the compiled JSP is hanging around there. If you can't figure this out, undeploy your application, shut down the app server, start it again, deploy again.
Upvotes: 2