this seems to be a classic Java/IWebphere problem, considering the amount of Google hits I get about classpath issues with IBM Websphere and Jython. Main story that precisely describes the problem I have: http://www.ibm.com/developerworks/websphere/techjournal/0406_brown/0406_brown.html
(the suggestions on IBM's website do not suffice, unfortunately.)
The issue: I need to use a newer ORO library from Apache Commons, namely Jakarta Oro 2.0.8. However, IBM comes bundled with a ton of libraries and preferably it loads these libraries first (PARENT_FIRST). This means that if you have any newer jar file on the lib path of your application (a WAR in my situation) you can be certain it will never be loaded.
According to the aforementioned link, Java will never "see" my newer version. To change that I should set the classloader behavior to "PARENT_LAST" (either on server, app or module level). Unfortunately this raises a ton of new issues which seem hard to solve (many incompatibilities).
I also tried adding it to the MANIFEST.MF, but that wouldn't work because IBM first loads its own classes and then the ones in the MANIFEST, which in turn must be part of the EAR.
When I renamed jython.jar to jython.old, my NoSuchMethodError went away. The reason that my development environment (Rational Rose XDE) does not complain is because it uses its own classpath for the application, hence the error only appears after deployment.
I do not have access to the deployment servers and thus I cannot disable jython.jar by hand. It has to be done using the server interface.
The question is simple, but possibly hard (?) to answer: how can I force the loading of the new ORO lib or how can I force Websphere to stop loading jython.jar. The means I have are:
1. change the configuration of the WAR or EAR
2. change the configuration of the server settings
3. programming (I have full access to applicable sources)
Anybody any idea? Any help's appreciated,
-- Abel --