SEVERE: Unable to create initial connections of pool - tomcat 7 with context.xml file

后端 未结 4 1927
故里飘歌
故里飘歌 2020-12-11 16:30

I tried to run project on tomcat 7.0.52 and initialize to DB through context.xml file.

But it throws bunch of exceptions, I couldn\'t figur

4条回答
  •  遥遥无期
    2020-12-11 17:16

    When you encounter exceptions like this, the most useful information is generally at the bottom of the stacktrace:

    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      ...
      at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
    

    The problem is that Tomcat can't find com.mysql.jdbc.Driver. This is usually caused by the JAR containing the MySQL driver not being where Tomcat expects to find it (namely in the webapps//WEB-INF/lib directory).

提交回复
热议问题