By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

Problem using .jars in Tomcat 5.0.16

P: n/a
Hi,
I have a problem with using *.jar files with Tomcat 5.0.16. I place
the jar in the lib directory of the application but server throws
Exception.

java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:222)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:109)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:89)
org.apache.jsp.receive_jsp._jspService(receive_jsp .java:45)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

I tried to use the packege unpacked in the class directory. But result
was the same. With 4.1.* version there was not such a problem. If any
could help or to redirect me to a place where I could read how to
solve the problem I'll be THANKFUL!
Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Nic
http://jakarta.apache.org/tomcat/faq/classnotfound.html

ji*****@abv.bg (jajoo) wrote in message news:<2b**************************@posting.google. com>...
Hi,
I have a problem with using *.jar files with Tomcat 5.0.16. I place
the jar in the lib directory of the application but server throws
Exception.

java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:222)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:109)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:89)
org.apache.jsp.receive_jsp._jspService(receive_jsp .java:45)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

I tried to use the packege unpacked in the class directory. But result
was the same. With 4.1.* version there was not such a problem. If any
could help or to redirect me to a place where I could read how to
solve the problem I'll be THANKFUL!

Jul 17 '05 #2

P: n/a
Nic
http://jakarta.apache.org/tomcat/faq/classnotfound.html

ji*****@abv.bg (jajoo) wrote in message news:<2b**************************@posting.google. com>...
Hi,
I have a problem with using *.jar files with Tomcat 5.0.16. I place
the jar in the lib directory of the application but server throws
Exception.

java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:222)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:109)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:89)
org.apache.jsp.receive_jsp._jspService(receive_jsp .java:45)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

I tried to use the packege unpacked in the class directory. But result
was the same. With 4.1.* version there was not such a problem. If any
could help or to redirect me to a place where I could read how to
solve the problem I'll be THANKFUL!

Jul 17 '05 #3

P: n/a
ji*****@abv.bg (jajoo) wrote in message news:<2b**************************@posting.google. com>...
Hi,
I have a problem with using *.jar files with Tomcat 5.0.16. I place
the jar in the lib directory of the application but server throws
Exception.

java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:222)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:109)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:89)
org.apache.jsp.receive_jsp._jspService(receive_jsp .java:45)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

I tried to use the packege unpacked in the class directory. But result
was the same. With 4.1.* version there was not such a problem. If any
could help or to redirect me to a place where I could read how to
solve the problem I'll be THANKFUL!


I don't know the difference of specs between 4.x and 5.x. The last
thing I'd ever want to know! Dunk the jar into Tomcat lib, not your
app's lib. That'll be OK.
Jul 17 '05 #4

P: n/a
ji*****@abv.bg (jajoo) wrote in message news:<2b**************************@posting.google. com>...
Hi,
I have a problem with using *.jar files with Tomcat 5.0.16. I place
the jar in the lib directory of the application but server throws
Exception.

java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:222)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:109)
com.oreilly.servlet.MultipartRequest.(MultipartReq uest.java:89)
org.apache.jsp.receive_jsp._jspService(receive_jsp .java:45)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

I tried to use the packege unpacked in the class directory. But result
was the same. With 4.1.* version there was not such a problem. If any
could help or to redirect me to a place where I could read how to
solve the problem I'll be THANKFUL!


I don't know the difference of specs between 4.x and 5.x. The last
thing I'd ever want to know! Dunk the jar into Tomcat lib, not your
app's lib. That'll be OK.
Jul 17 '05 #5

P: n/a
ns*****@tin.it (Nic) wrote in message news:<18**************************@posting.google. com>...
http://jakarta.apache.org/tomcat/faq/classnotfound.html


Thank You Nick,
I found the solution of the problem near to the link you gave me. It
was because the jar was put in the $JAVA_HOME/jre/lib/ext too, except
in the /WEB-INF/lib directory. When I removed it from
$JAVA_HOME/jre/lib/ext the problem was gone.
I still could not understand why, but everythig is ok. In the refer
was written that the jar in $JAVA_HOME/jre/lib/ext can cause problems
because these directories have a higher class loading priority than
any of the Tomcat class loaders. But i still wonder why this could be
a problem? Why Tomcat could not load the jar too. Nevermind I will
keep reading :)
Thank you very much!

Zhivko Mitrev
Jul 17 '05 #6

P: n/a
ns*****@tin.it (Nic) wrote in message news:<18**************************@posting.google. com>...
http://jakarta.apache.org/tomcat/faq/classnotfound.html


Thank You Nick,
I found the solution of the problem near to the link you gave me. It
was because the jar was put in the $JAVA_HOME/jre/lib/ext too, except
in the /WEB-INF/lib directory. When I removed it from
$JAVA_HOME/jre/lib/ext the problem was gone.
I still could not understand why, but everythig is ok. In the refer
was written that the jar in $JAVA_HOME/jre/lib/ext can cause problems
because these directories have a higher class loading priority than
any of the Tomcat class loaders. But i still wonder why this could be
a problem? Why Tomcat could not load the jar too. Nevermind I will
keep reading :)
Thank you very much!

Zhivko Mitrev
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.