Classloading conflict when running webstart

Jiri Vanek jvanek at redhat.com
Mon Jan 14 15:23:42 UTC 2019


On 1/9/19 2:35 PM, Christian Svedin wrote:
> I have an application that has a mozilla rhino jar as a dependency. When 
> I use classes from that dependency i get a NoSuchMethodException
> 
> Caused by: java.lang.NoSuchMethodError: 
> org.mozilla.javascript.Parser.parse(Ljava/lang/String;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode
> 
> I think the problem is that IcedTea-web already has rhino as a 
> dependency so I get the version from IcedTea in a parent classloader to 
> my application.
> 
> Any way to get a "clean" classpath for my application that doesn't 
> contain IcedTea-classes? Any other way to solve this?
> 
> / Christian
> 

Hi. If you can edit launchers, you can see that  rhino jar is there as variable. So just remove it.
If you cant, then you have to buid ITW without Rhino.

I think for future ITW without plugin, to remove rhino from boot classpath is logical step, but can
not be immediate.

Itw currentl do not have  mechanism to exclude single jar from bootcp. Hearing your case, likely
worthy to implement. Any ideas?

Please try to edit your launcher (javaws(.sh) or javaws.bat) and try if it fixes your problem.
As ITW 1.8 have binary launchers, the filtering of deps in runtime isliekly necessary.


Are you on distribution build or bundled one? In distribution, you can try to remoe rhino from
system. On bundled, you can remoe rhino from directory with bundled libraries.


J.

-- 
Jiri Vanek
Senior QE engineer, OpenJDK QE lead, Mgr.
Red Hat Czech
jvanek at redhat.com    M: +420775390109


More information about the distro-pkg-dev mailing list