I’m in the process of upgrading our java web app to Weblogic 9.2 and Java 5 using Weblogic’s (1.5_06 JVM). Now when I attempt to import one of our application classes in a jython script, it fails. Here’s the code:


import sys

sys.add_package ('com.peopleclick.cp.presentation.form')

from com.peopleclick.cp.presentation.form import FormData

formDataObject = FormData()


Here’s the message from the Weblogic console:

import: trying com.peopleclick.cp.presentation.form.FormData as java class in syspath loader


Here’s the error from the app’s log file:

ImportError: cannot import name FormData


      at org.python.core.Py.ImportError(Py.java:184)

      at org.python.core.imp.importFromAs(imp.java:704)

      at org.python.core.imp.importFrom(imp.java:677)

      at org.python.pycode._pyx5.f$0(<iostream>:11)

      at org.python.pycode._pyx5.call_function(<iostream>)

      at org.python.core.PyTableCode.call(PyTableCode.java:208)

      at org.python.core.PyCode.call(PyCode.java:14)

      at org.python.core.Py.runCode(Py.java:1135)

      at org.python.core.Py.exec(Py.java:1157)

      at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:148)



This same code was working in the previous version of the application environment:

Weblogic 8.1.4 and Java 1.4


It appears to be a classpath type issue based on the ImportError message but I haven’t been able to figure out how to tell jython to ‘look here’ for my application classes.


Any help is greatly appreciated.