我在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
我可以获取我的Web应用程序的登录屏幕。
最佳答案
您的代码中缺少Oracle jar。请将ojdbc6.jar或其他Oracle jar添加到tomcat的lib文件夹中。然后重启tomcat并检查。