Running Jython from an EAR

Erik Klein ErikKlein at yahoo.com
Sat May 3 07:30:16 EDT 2003


I have been successfully running Jython on Weblogic Server v6.1 sp3
from within a Stateless Session EJB by using a System Classpath to
identify all the JAR files needed by both the EJB as well as the
Jython Script (which is being run thru Apache's BSF (Bean Scripting
Framework).

Recently, my system classpath got too long for it to work properly
with the command line needed to start up Weblogic on an NT machine.

I realize there are other workarounds, but I chose to make an EAR file
that contained the EJB and all the supporting Jars.  I followed
convention by creating an application.xml that identifies the EJB and
by placing a custom manifest.mf within the JAR containing the EJB so
that it can find all the other JARs within the EAR.  This is working
properly from a Java perspective.

Problem now is that when Jython launches, it looks only at the System
Classpath and cannot find any of the JARs within the EAR.  Manually
running Jython with a System Classpath so that it can fill it's
"cache" directory is not an option as this will not be permitted
within my production environment.

Does anyone know how I could instruct Jython to see the Classpath as
viewed from the EAR?

Thanks in advance.

ErikKlein at yahoo.com




More information about the Python-list mailing list