Skip to main content

IllegalArgumentException in new java plugin

5 replies [Last post]
tkram01
Offline
Joined: 2005-12-14

While testing the new java plugin with firefox 3 beta 2 I get to following exception when calling get(i) on a java.util.List exposed through an Applet.

Error: uncaught exception: Error calling method on NPObject! [plugin exception: java.lang.IllegalArgumentException: More than one method matching name get and arguments [java.lang.Integer]].

There is only one get() defined in the list class (the one mandated by the List interface). This works fine when using the current plugin.

Trevor

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kbr
Offline
Joined: 2003-06-16

A bunch of LiveConnect-related bugs were fixed in the new Java Plug-In in the forthcoming 6u10 build 10 and this appears to be one of them. Please re-test when this build comes out, hopefully either later this week or early next week.

tkram01
Offline
Joined: 2005-12-14

I am still getting this error with the latest build (10)

Error: uncaught exception: Error calling method on NPObject! [plugin exception: java.lang.IllegalArgumentException: More than one method matching name get and arguments [java.lang.Integer]
Method 1: public java.lang.Object com.vpharm.application.verdi.EntityList.get(int)
Method 2: public com.vpharm.application.verdi.VerdiBase com.vpharm.application.verdi.EntityList.get(int) throws com.vpharm.application.verdi.RuntimeDatabaseException].

Trevor

tkram01
Offline
Joined: 2005-12-14

Here is the class signature for EntityList

public final class EntityList extends AbstractList implements RandomAccess

kbr
Offline
Joined: 2003-06-16

Ugh. The problem is caused by the use of generics, their current erasure-based implementation and the generation of bridge methods by javac. The new plug-in is correct; there will actually be two get(int) methods in the class file.

I'll see whether there's a workaround we can do.

Your workaround for the time being would be to not expose instances of generic classes to JavaScript.

kbr
Offline
Joined: 2003-06-16

Filed as bug ID 6654481, fixed in build 12.