Author mvera
Recipients mvera
Date 2012-11-07.08:42:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I solved my problem, but problems exist in Jython. It seems to me that embedding jython in a web application is not really supported. Here is described how I solved my problem.

I used the jython-standalone 2.5.3 from maven.

This worked well under tomcat but we had to place our scripts at the root of a jar (in a war in an ear), not in a /Lib folder. We also had to separate java classes and .py scripts as we ancountered the mixed folder problem.

Then we migrated under websphere 7 and it didn't worked. We had to remove all classes generated from .py scripts in jython-standalone.jar. We moved all .py scrpits in the jython-standalone.jar at the root of the jar. Finaly we had to patch (file attached).

We noticed that jython doesn't behave the same in both containers. Here is the sys.path respectively in tomcat and websphere:

System Path: [

[06/11/12 11:15:17:394 CET] 0000005d SystemOut     O System Path: ['__classpath__', '__pyclasspath__/']

We also noticed that websphere use precompiled classes and tomcat doesn't.

Also, jython causes objectweb to crash under websphere when a class is analyzed. We called the objectweb function in the same environment, it didn't crash.

I hope my remarks will help you to improve your software. But unless you  improve the web container support, I don't recommend to embed jython in a web application.

Last remark, I tried to recompile jython, I abandonned as documentation is obsolete (javacc link broken, links to very old libs), I spent so much time to download informix jdbc I don't understand why and I gave up when I realized I had to install mercurial.

Thanks for your work for the open source community.

Date User Action Args
2012-11-07 08:42:15mverasetmessageid: <>
2012-11-07 08:42:15mverasetrecipients: + mvera
2012-11-07 08:42:14mveralinkissue1983 messages
2012-11-07 08:42:14mveracreate