Hello,

  I believe that this problem might have been posted before, but I was unable to find 
any references in the archives, so  . . .

  I'm trying to use Jason Hunter's com.oreilly.servlet.MultipartRequest class to 
handle (of all things) a multipart/form-data HTTP POST request.  I am getting a 
NoClassDefFound error on javax/servlet/ServletRequest inside the MultipartRequest 
constructor, at the point where the com.oreilly.servlet.multipart.MultipartParse 
object is initialized.  Here is a stack trace:

  java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
      at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:116)
      at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:74)
      at mypackage.MyServlet.doPost(MyServlet.java:111)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
      at org.apache.tomcat.core.Handler.service(Handler.java:286)
      at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
      at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
      at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
      at java.lang.Thread.run(Thread.java:484)

  It seems that for some reason, once the MultipartRequest constructor is called, my 
CLASSPATH is getting mangled somehow.

  Just for reference, when tomcat is started, it uses the following CLASSPATH:

  Using classpath:
         /ext/jakarta-tomcat-3.2.1/lib/ant.jar:   // tomcat libs
         /ext/jakarta-tomcat-3.2.1/lib/jasper.jar:
         /ext/jakarta-tomcat-3.2.1/lib/jaxp.jar:
         /ext/jakarta-tomcat-3.2.1/lib/parser.jar:
         /ext/jakarta-tomcat-3.2.1/lib/servlet.jar:
         /ext/jakarta-tomcat-3.2.1/lib/test:
         /ext/jakarta-tomcat-3.2.1/lib/webserver.jar:

         /ext/jdk1.3/lib/tools.jar:   // runtime stuff
         /ext/jdk1.3/jre/lib/rt.jar:
         /ext/jdk1.3/jre/lib/i18n.jar:

         /ext/j2sdkee1.2.1/lib/j2ee.jar:  // J2EE stuff

         /ext/jdk1.3/jre/lib/ext/jce1_2_1.jar:  // JCE stuff
         /ext/jdk1.3/jre/lib/ext/sunjce_provider.jar:

         /ext/j2sdkee1.2.1/lib:
         /ext/j2sdkee1.2.1/lib/system/mm.mysql-2.0.4-bin.jar:   //  my JDBC driver

         /ext/j2sdkee1.2.1/lib/system:   //  this is where i've copied the 
com.oreilly.servlet tree (i've also
                                         //  tried using the included .jar file, with 
the exact same result)

         /ext/webmacro/webmacro.jar:     //  webmacro template engine stuff
         /ext/webmacro


  Note:  It seems that the actual file upload is going through fine . . . ive checked 
and the uploads do actually get stored in my temporary directory . . . apparently the 
problem appears after the files are stored "temporarily" and before they are moved to 
the upload dir specified in the MultipartRequest constructor.

  One last thing:  I've run a sanity check by installing and configuring the included 
demos in upload.war . . . and I get the same results.  Same error:  it cannot find 
javax/servlet/ServletRequest.



  Anybody have *any* idea of what's going on here?


  Any help is greatly appreciated.


--john jacobs

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to