Issue1254

classification
Title: jython.jar (2.5b1) conflicts with previous version (2.2)
Type: behaviour Severity: normal
Components: Library Versions: 2.5b1
Milestone:
process
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.

Messages
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
naming.
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
applications?

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
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

And here is the documentation for Sun Java System Application Server
Platform
http://docs.sun.com/app/docs/doc/819-3659/beadf?a=view
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 PyServlet.java 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 PyServlet.java 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.

https://lists.sourceforge.net/lists/listinfo/jython-users
History
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