Servlet exception

Discussions

Web tier: servlets, JSP, Web frameworks: Servlet exception

  1. Servlet exception (3 messages)

    Hello,

    This message will appear when I call my servlet from my web browser. I use Tomcat 5.5 and JDBC Oracle driver. The JDBC Oracle driver (ojdbc14.jar) is installed under the WEB-INF/lib directory.

    Can someone help me with this error message?


    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
    admin.Database.connect(Database.java:26)
    model.LanDAO.getLan(LanDAO.java:21)
    control.LanServlet.doGet(LanServlet.java:32)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.

    Threaded Messages (3)

  2. Servlet exception[ Go to top ]

    Hi,

    I think you need to check your classpath. Make sure that JDBCDriver is avialable in classpath.

    Thanks
    Ravi Rasappan
  3. Servlet exception[ Go to top ]

    I have got the same message before and got around by adding the jar file to the startup classpath for the Tomcat.
  4. Classpath[ Go to top ]

    The problem is the container can't find your JDBC driver. How you resolve this will depend on which container you're using. If you're using Tomcat, then you would place the .jar file for the Oracle driver in either the WEB-INF/lib directory of your web application, or (if you're declaring a global connection pool) in the <%TOMCAT_HOME%>/server/lib directory.