HttpClient and classpath issues

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

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 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(
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClassInternal(
        at com.supportsoft.acs.modemsimulator.worker.do_the_real_work(

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]
v. (902) 481-5750 ext. 2146
f. (902) 481-5799