无法加载资源工厂类[根异常是java.lang.ClassNotFoundException:oracle.jdbc.pool.OracleDataSourceFactory

时间:2017-03-07 05:27:08

标签: java spring oracle tomcat jdbc

我在tomcat服务器的lib文件夹中有tomcat-jdbc.jar文件,但仍显示错误:

SEVERE: Exception processing Global JNDI Resources
 javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSourceFactory]
at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:66)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:840)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindings

我可以获得我的webapp的登录屏幕。

1 个答案:

答案 0 :(得分:1)

您的代码中缺少Oracle jar。请将ojdbc6.jar或其他oracle jar添加到tomcat的lib文件夹中。然后重启tomcat并检查。