Quantcast

HttpClient and classpath issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

HttpClient and classpath issues

Brad Barkhouse
HttpClient and classpath issues

Hi all,

I'm running into some issues running the modem simulator on UNIX  (it runs fine on Windows) and I was wondering if anyone else has encountered similar behaviour.  I'll try to briefly sum up what's happening:

Here's my shell script:

java -verbose -classpath .:classes:lib\mail.jar:lib\activation.jar:lib\xalan.jar:lib\j2ee.jar:lib\sun-xercesImpl.jar:lib\xercesImpl.jar:lib\dom.jar:lib\saaj-api.jar:lib\saaj-impl.jar:lib\commons-httpclient-2.0.jar:lib\commons-logging.jar:lib\commons-logging-api.jar:lib\commons-httpclient-2.0.jar com.supportsoft.acs.modemsimulator.simulate_n_modem $*

And now the console output (note that I've turned verbosity on, and included the most important parts):

.Finished processing...
Use -Kill commands to kill the modems
[Loaded com.supportsoft.acs.modemsimulator.UserInterfaceHttpListener]
[Loaded java.io.UnsupportedEncodingException from /usr/local/j2sdk1.4.1_07/jre/lib/rt.jar]

         -Kill_range n,m= kills modem starting from n to m
         -Kill_one n= kills nth modem
         -Kill_all = kills all the launched modem
         -Start_one n= restarts nth modem
Listening for incoming HTTP requests on port 8181
[Loaded java.lang.ClassFormatError from /usr/local/j2sdk1.4.1_07/jre/lib/rt.jar]
java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpClient
[Loaded java.lang.StackTraceElement from /usr/local/j2sdk1.4.1_07/jre/lib/rt.jar]
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at com.supportsoft.acs.modemsimulator.worker.do_the_real_work(worker.java:49)
        at com.supportsoft.acs.modemsimulator.worker.run(worker.java:479)
        at java.lang.Thread.run(Thread.java:536)


Appears to be an issue with commons-httpclient-2.0.jar.  I'm not sure if the presence of the ClassFormatError indicates that it is corrupt, but that seems unlikely as I have tried copying the same file from other areas on aluminum.  I've also tried playing with the classpath-ordering of the jar file, to no avail.  Debugging it from the command-line hasn't turned up anything useful either.  Help, I'm running out of ideas!

P.S. - I AM using the same java version between Windows and UNIX  (1.4.1_07), so that shouldn't be an issue.

--
Brad Barkhouse
Senior Software Engineer
SupportSoft Canada Inc.
[hidden email]
http://www.supportsoft.com
v. (902) 481-5750 ext. 2146
f. (902) 481-5799



Loading...