启动Tomcat 8服务器时出现以下错误。我正在使用ojdbc14.jar,也尝试过使用ojdbc6.jar,但它不起作用。这仅在Tomcat 8中发生。如果使用Tomcat 7,则不会引发任何异常。JRE版本是7
引起原因:java.lang.AbstractMethodError:org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:917)处的oracle.jdbc.driver.T4CConnection.isValid(I)Z在org.apache.tomcat处。 org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:356)的dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:282)org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory( org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2289)处的org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038)处的BasicDataSource.java:2306) org.hibernate.ejb.connection处的.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1532)。org.hibernate.engine.jdbc.internal.JdbcServicesImpl $ ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)处的InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70)在org.hibernate.engine.jdbc.internal.JdbcServicesImpl。 org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)处的org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)处的org.hibernate.service.internal org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:78)处的org.hibernate.cfg.Configuration中的.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)。org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2279)的org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1748)的org.hibernate.ejb.EntityManagerFactoryImpl的buildSettingsInternal(Configuration.java:2283) .org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:920)处的EntityManagerFactoryImpl.java:94)org.hibernate.ejb.HibernatePersistence处的org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)处的。 org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:290)处的.createContainerEntityManagerFactory(HibernatePersistence.java:92),位于org.springframework.orm.jpa.AbstractEntityManagerFactoryBean。在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)的afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBean。 …另外21个
将ojdbc7.jar与Java 7配合使用,应该可以使用。