MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  (Read 5295 times)

0 Members and 1 Guest are viewing this topic.

Offline Administrator

  • Chinmay Dingore
  • Administrator
  • Full Member
  • *****
  • Posts: 135
  • Karma: +1/-0
    • View Profile
    • MilesWeb Internet Services Pvt Ltd
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
« on: February 24, 2014, 04:01:49 PM »
Hi Team,

When trying to access your .jsp files using tomcat, you receive an error as below.

Quote
Feb 14, 2014 5:51:37 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/hoverbox] threw exception [javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver] with root cause
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:126)
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at org.apache.jsp.hoverbox.index_jsp._jspService(index_jsp.java:104)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

It is because the WEB-INF folder does not exist at the location in the sub directory in the error. You either compile the application to use the WEB-INF folder under public_html OR copy the WEB-INF folder in hoverbox sub folder as in the error above.

Hope this helps :-)
MilesWeb.com - Your Hosting, Our Responsibility!
Unlimited Hosting Plans | Managed VPS with 20% Discount

MilesWeb Hosting Forum

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
« on: February 24, 2014, 04:01:49 PM »