Problem using .jars in Tomcat 5.0.16

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jajoo

    Problem using .jars in Tomcat 5.0.16

    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.NoCla ssDefFoundError : javax/servlet/ServletRequest
    com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 222)
    com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 109)
    com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 89)
    org.apache.jsp. receive_jsp._js pService(receiv e_jsp.java:45)
    org.apache.jasp er.runtime.Http JspBase.service (HttpJspBase.ja va:133)
    javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java:856)
    org.apache.jasp er.servlet.JspS ervletWrapper.s ervice(JspServl etWrapper.java: 311)
    org.apache.jasp er.servlet.JspS ervlet.serviceJ spFile(JspServl et.java:301)
    org.apache.jasp er.servlet.JspS ervlet.service( JspServlet.java :248)
    javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.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!
  • Nic

    #2
    Re: Problem using .jars in Tomcat 5.0.16



    jivkoto@abv.bg (jajoo) wrote in message news:<2b392568. 0401221519.7d0b 3040@posting.go ogle.com>...[color=blue]
    > 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.NoCla ssDefFoundError : javax/servlet/ServletRequest
    > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 222)
    > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 109)
    > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 89)
    > org.apache.jsp. receive_jsp._js pService(receiv e_jsp.java:45)
    > org.apache.jasp er.runtime.Http JspBase.service (HttpJspBase.ja va:133)
    > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java:856)
    > org.apache.jasp er.servlet.JspS ervletWrapper.s ervice(JspServl etWrapper.java: 311)
    > org.apache.jasp er.servlet.JspS ervlet.serviceJ spFile(JspServl et.java:301)
    > org.apache.jasp er.servlet.JspS ervlet.service( JspServlet.java :248)
    > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.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![/color]

    Comment

    • Nic

      #3
      Re: Problem using .jars in Tomcat 5.0.16



      jivkoto@abv.bg (jajoo) wrote in message news:<2b392568. 0401221519.7d0b 3040@posting.go ogle.com>...[color=blue]
      > 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.NoCla ssDefFoundError : javax/servlet/ServletRequest
      > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 222)
      > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 109)
      > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 89)
      > org.apache.jsp. receive_jsp._js pService(receiv e_jsp.java:45)
      > org.apache.jasp er.runtime.Http JspBase.service (HttpJspBase.ja va:133)
      > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java:856)
      > org.apache.jasp er.servlet.JspS ervletWrapper.s ervice(JspServl etWrapper.java: 311)
      > org.apache.jasp er.servlet.JspS ervlet.serviceJ spFile(JspServl et.java:301)
      > org.apache.jasp er.servlet.JspS ervlet.service( JspServlet.java :248)
      > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.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![/color]

      Comment

      • hiwa

        #4
        Re: Problem using .jars in Tomcat 5.0.16

        jivkoto@abv.bg (jajoo) wrote in message news:<2b392568. 0401221519.7d0b 3040@posting.go ogle.com>...[color=blue]
        > 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.NoCla ssDefFoundError : javax/servlet/ServletRequest
        > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 222)
        > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 109)
        > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 89)
        > org.apache.jsp. receive_jsp._js pService(receiv e_jsp.java:45)
        > org.apache.jasp er.runtime.Http JspBase.service (HttpJspBase.ja va:133)
        > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java:856)
        > org.apache.jasp er.servlet.JspS ervletWrapper.s ervice(JspServl etWrapper.java: 311)
        > org.apache.jasp er.servlet.JspS ervlet.serviceJ spFile(JspServl et.java:301)
        > org.apache.jasp er.servlet.JspS ervlet.service( JspServlet.java :248)
        > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.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![/color]

        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.

        Comment

        • hiwa

          #5
          Re: Problem using .jars in Tomcat 5.0.16

          jivkoto@abv.bg (jajoo) wrote in message news:<2b392568. 0401221519.7d0b 3040@posting.go ogle.com>...[color=blue]
          > 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.NoCla ssDefFoundError : javax/servlet/ServletRequest
          > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 222)
          > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 109)
          > com.oreilly.ser vlet.MultipartR equest.(Multipa rtRequest.java: 89)
          > org.apache.jsp. receive_jsp._js pService(receiv e_jsp.java:45)
          > org.apache.jasp er.runtime.Http JspBase.service (HttpJspBase.ja va:133)
          > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java:856)
          > org.apache.jasp er.servlet.JspS ervletWrapper.s ervice(JspServl etWrapper.java: 311)
          > org.apache.jasp er.servlet.JspS ervlet.serviceJ spFile(JspServl et.java:301)
          > org.apache.jasp er.servlet.JspS ervlet.service( JspServlet.java :248)
          > javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.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![/color]

          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.

          Comment

          • jajoo

            #6
            Re: Problem using .jars in Tomcat 5.0.16

            nsegall@tin.it (Nic) wrote in message news:<186fae86. 0401230127.6ad9 267e@posting.go ogle.com>...[color=blue]
            > http://jakarta.apache.org/tomcat/faq/classnotfound.html[/color]

            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

            Comment

            • jajoo

              #7
              Re: Problem using .jars in Tomcat 5.0.16

              nsegall@tin.it (Nic) wrote in message news:<186fae86. 0401230127.6ad9 267e@posting.go ogle.com>...[color=blue]
              > http://jakarta.apache.org/tomcat/faq/classnotfound.html[/color]

              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

              Comment

              Working...