Title: jython.jar (2.5b1) conflicts with previous version (2.2)
Type: behaviour Severity: normal
Components: Library Versions: 2.5b1
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: amak Nosy List: amak, rapto
Priority: normal Keywords:

Created on 2009-01-28.11:52:08 by rapto, last changed 2009-01-30.12:33:48 by amak.

msg4094 (view) Author: Marcos Sánchez Provencio (rapto) Date: 2009-01-28.11:52:08
When using different versions of jython.jar in different WEB-INF/lib
folders, application does not work. For example:
java.lang.NoClassDefFoundError: org/python/core/PyJavaInstance
I propose that new jars are compatible with previous or get a different
msg4099 (view) Author: Alan Kennedy (amak) Date: 2009-01-28.14:00:39
So, you are using 2 different versions of jython.jar in 2 different web

That should not create any problems, because the two different web
applications should each have a separate class loader; each class loader
should see a different jython.jar, and load the classes from it
completely independently.

If this is not happening, then you need to read the documentation for
your servlet container, in order to understand how class-loading within
that container works. For example, you may have a copy of jython.jar
being loaded by a classloader further up the class-loading hierarchy,
which is over-riding any jython.jar further down the hierarchy, such as
in the WEB-INF/lib of an individual application. In this case, you would
have to delete the jython.jar from further up the hierarchy, and also
make sure that your application configuration ensures that jars are
loaded from the local WEB-INF/lib *before* class-loading is delegated up
the hierarchy.

It is not possible to guess the actual cause of your problems without
knowing A: the container being used and B: how you have configured it.

Here is the relevant documentation for Apache Tomcat

And here is the documentation for Sun Java System Application Server
msg4110 (view) Author: Marcos Sánchez Provencio (rapto) Date: 2009-01-30.09:17:00
Actually the trouble seems to be that python.home property is set to the
other application's...

I have found that sets python.home, does it affect every
other webapp?

I am using tomcat 5.5.17
msg4111 (view) Author: Alan Kennedy (amak) Date: 2009-01-30.12:33:47
> Actually the trouble seems to be that python.home property is set to the
> other application's...
> I have found that sets python.home, does it affect every
> other webapp?

org.python.util.PyServlet only computes a value for and sets python.home
*if* it is not already been explicitly set in the web.xml.

If you have two web applications, A and B, then whatever A does in
relation to python.home, either by setting it implicitly or explicitly,
will have *no* effect on application B; this is guaranteed at a servlet
container level.

I am closing this bug as "invalid"; if you want further assistance
configuring pyservlet, please post a message on the jython-users list.
Date User Action Args
2009-01-30 12:33:48amaksetstatus: open -> closed
resolution: invalid
messages: + msg4111
2009-01-30 09:17:04raptosetmessages: + msg4110
severity: normal
2009-01-28 14:00:40amaksetpriority: normal
assignee: amak
messages: + msg4099
severity: normal -> (no value)
nosy: + amak
2009-01-28 11:52:08raptocreate