I'm trying to use the httpclient within Jython (see
http://jakarta.apache.org/commons/httpclient/ for more information on
the httpclient).
My Jython version is:
Jython 2.1 on java1.4.2_04 (JIT: null)
My Java version is:
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
My CLASSPATH includes:
jdom.jar
xerces.jar
jython.jar
jt400.jar
log4j-1.2.8.jar
commons-httpclient-2.0.jar
When I just try to perform the import statements from example code I
get the error pasted below.
import org.apache.comm ons.httpclient. Cookie
import org.apache.comm ons.httpclient. HttpClient
import org.apache.comm ons.httpclient. HttpState
import org.apache.comm ons.httpclient. cookie.CookiePo licy
import org.apache.comm ons.httpclient. methods.GetMeth od
import org.apache.comm ons.httpclient. HttpClient
Traceback (innermost last):
File "<console>" , line 1, in ?
java.lang.NoCla ssDefFoundError : org/apache/commons/logging/LogFactory
at
org.apache.comm ons.httpclient. HttpClient.<cli nit>(HttpClient .java:101)
at java.lang.Class .forName0(Nativ e Method)
at java.lang.Class .forName(Unknow n Source)
at
org.python.core .SyspathJavaLoa der.loadClass(S yspathJavaLoade r.java)
at java.lang.Class Loader.loadClas s(Unknown Source)
at org.python.core .Py.findClassEx (Py.java)
at
org.python.core .SysPackageMana ger.findClass(S ysPackageManage r.java)
at
org.python.core .PackageManager .findClass(Pack ageManager.java )
at
org.python.core .SysPackageMana ger.findClass(S ysPackageManage r.java)
at
org.python.core .PyJavaPackage. __findattr__(Py JavaPackage.jav a)
at org.python.core .PyObject.impAt tr(PyObject.jav a)
at org.python.core .imp.import_nex t(imp.java)
at org.python.core .imp.import_log ic(imp.java)
at org.python.core .imp.import_nam e(imp.java)
at org.python.core .imp.importName (imp.java)
at org.python.core .ImportFunction .load(__builtin __.java)
at org.python.core .ImportFunction .__call__(__bui ltin__.java)
at org.python.core .PyObject.__cal l__(PyObject.ja va)
at org.python.core .__builtin__.__ import__(__buil tin__.java)
at org.python.core .imp.importOne( imp.java)
at org.python.pyco de._pyx2.f$0(<c onsole>:1)
at org.python.pyco de._pyx2.call_f unction(<consol e>)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyCode.call(Py Code.java)
at org.python.core .Py.runCode(Py. java)
at org.python.core .Py.exec(Py.jav a)
at
org.python.util .PythonInterpre ter.exec(Python Interpreter.jav a)
at
org.python.util .InteractiveInt erpreter.runcod e(InteractiveIn terpreter.java)
at
org.python.util .InteractiveInt erpreter.runsou rce(Interactive Interpreter.jav a)
at
org.python.util .InteractiveInt erpreter.runsou rce(Interactive Interpreter.jav a)
at
org.python.util .InteractiveCon sole.push(Inter activeConsole.j ava)
at
org.python.util .InteractiveCon sole.interact(I nteractiveConso le.java)
at org.python.util .jython.main(jy thon.java)
java.lang.NoCla ssDefFoundError : java.lang.NoCla ssDefFoundError :
org/apache/commons/logging/LogFactory
Thanks for any help you can provide. If this is the wrong
forum...point me the right way.
Greg