From: Erik Svensson <erik.svensson@me...> - 2009-10-30 21:01:48
I'm a newbie jython user with an inherited web-application that among
other things uses embedded jython.
We are changing the web-app to use terracotta for clustering (among
other things) and this is creating problems for the jython scripts.
Terracotta (tc) instruments a number of classes from the java.util
packages on boot (by injecting bytecode) , creating a jar file that is
loaded through -Xbootclasspath: which insures that
the tc instrumented classes are loaded instead of the default classes.
When we try and run the scripts we get an
java.lang.IncompatibleClassChangeError for Hashtable (one of the
classes instrumented by tc).
I'm guessing here that what happens here is that somehow Hashtable is
loaded from the normal rt.jar instead of from our boot jar.
We got it for HashMap as well but implemented our own HashMap and that
worked. That is not feasible for Hashtable, I'm afraid.
I'm not certain that it really is jython that is doing something wrong
or if it is tomcats classloader but I'm pretty desperate right now.
I've been looking for ways to change where jython looks for classes
and the order they are loaded. I changed the class path scanning order
in the registry file but that didn't do anything, except
scan the jar files in a different order.
I also tried to put python.cachedir.skip = true in the registry file
but that didn't work.
I'd really appreciate some help!
Erik Svensson, Memnon