spring - java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z -


when upgraded tomcat 7 8.5 , jdk 7 8, getting below errors while starting tomcat.

spring version: 4.1.8.release

i changed below pom entries too, nothing seems working. please have , let me know need resolve issue.

    <dependency>         <groupid>com.oracle</groupid>         <artifactid>ojdbc6</artifactid>         <version>11.2.0.3</version>         <scope>compile</scope>     </dependency> 

to

    <dependency>         <groupid>com.oracle</groupid>         <artifactid>ojdbc7</artifactid>         <version>12.1.0.1</version>         <scope>compile</scope>     </dependency> 

and

    <dependency>         <groupid>org.apache.tomcat</groupid>         <artifactid>tomcat-dbcp</artifactid>         <version>7.0.47</version>     </dependency> 

to

    <dependency>         <groupid>org.apache.tomcat</groupid>         <artifactid>tomcat-dbcp</artifactid>         <version>8.5.4</version>     </dependency> 

the entitymanagerfactory()

 @bean  public localcontainerentitymanagerfactorybean entitymanagerfactory() {         localcontainerentitymanagerfactorybean entitymanagerfactorybean = new localcontainerentitymanagerfactorybean();         entitymanagerfactorybean.setdatasource(datasource());         entitymanagerfactorybean.setpersistenceproviderclass(hibernatepersistenceprovider.class);         entitymanagerfactorybean.setpackagestoscan(new string[] {"com.rest.entity" });         entitymanagerfactorybean.setjpavendoradapter(new hibernatejpavendoradapter());         entitymanagerfactorybean.setjpaproperties(hibernateproperties());          return entitymanagerfactorybean;     }  private properties hibernateproperties() {         properties properties = new properties();         properties.put("hibernate.dialect", "org.hibernate.dialect.oracledialect");         properties.put("hibernate.cache.provider_class", "org.hibernate.cache.nocacheprovider");         properties.put("hibernate.current_session_context_class","thread");         properties.put("hibernate.show_sql", "false");         properties.put("hibernate.hbm2ddl.auto", "update");         return properties;     } 

tomcat stderr.logs

org.springframework.beans.factory.beancreationexception: error creating bean name 'entitymanagerfactory' defined in class path resource [com/rest/configuration/jpaconfiguration.class]: invocation of init method failed; nested exception java.lang.abstractmethoderror: oracle.jdbc.driver.t4cconnection.isvalid(i)z         @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1572)         @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:539)         @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476)         @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:303)         @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:230)         @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:299)         @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:194)          @ org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:960)          @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:749)          @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:480)          @ org.springframework.web.servlet.frameworkservlet.configureandrefreshwebapplicationcontext(frameworkservlet.java:664)         @ org.springframework.web.servlet.frameworkservlet.initwebapplicationcontext(frameworkservlet.java:536)            @ org.springframework.web.servlet.frameworkservlet.initservletbean(frameworkservlet.java:490)          @ org.springframework.web.servlet.httpservletbean.init(httpservletbean.java:136)         @ javax.servlet.genericservlet.init(genericservlet.java:158)       @ org.apache.catalina.core.standardwrapper.initservlet(standardwrapper.java:1183)          @ org.apache.catalina.core.standardwrapper.load(standardwrapper.java:992)          @ org.apache.catalina.core.standardcontext.loadonstartup(standardcontext.java:4931)            @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5241)            @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150)         @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:752)          @ org.apache.catalina.core.containerbase.addchild(containerbase.java:728)          @ org.apache.catalina.core.standardhost.addchild(standardhost.java:734)            @ org.apache.catalina.startup.hostconfig.deploydescriptor(hostconfig.java:630)         @ org.apache.catalina.startup.hostconfig$deploydescriptor.run(hostconfig.java:1842     @ java.util.concurrent.executors$runnableadapter.call(executors.java:511)          @ java.util.concurrent.futuretask.run(futuretask.java:266)         @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1149)          @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:624)          @ java.lang.thread.run(thread.java:748)     caused by: java.lang.abstractmethoderror: oracle.jdbc.driver.t4cconnection.isvalid(i)z          @ org.apache.tomcat.dbcp.dbcp2.delegatingconnection.isvalid(delegatingconnection.java:924)         @ org.apache.tomcat.dbcp.dbcp2.poolableconnection.validate(poolableconnection.java:282)        @ org.apache.tomcat.dbcp.dbcp2.poolableconnectionfactory.validateconnection(poolableconnectionfactory.java:359)        @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.validateconnectionfactory(basicdatasource.java:2316)        @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.createpoolableconnectionfactory(basicdatasource.java:2299)          @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.createdatasource(basicdatasource.java:2043)         @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.getconnection(basicdatasource.java:1543)            @ org.hibernate.engine.jdbc.connections.internal.datasourceconnectionproviderimpl.getconnection(datasourceconnectionproviderimpl.java:139)         @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl$connectionproviderjdbcconnectionaccess.obtainconnection(jdbcservicesimpl.java:279)           @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.configure(jdbcservicesimpl.java:124)         @ org.hibernate.boot.registry.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:111)          @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:234)           @ org.hibernate.service.internal.abstractserviceregistryimpl.getservice(abstractserviceregistryimpl.java:206)          @ org.hibernate.cfg.configuration.buildtyperegistrations(configuration.java:1885)          @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1843)         @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl$4.perform(entityanagerfactorybuilderimpl.java:850)           @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl$4.perform(entitymanagerfactorybuilderimpl.java:843)          @ org.hibernate.boot.registry.classloading.internal.classloaderserviceimpl.withtccl(classloaderserviceimpl.java:398)           @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.build(entitymanagerfactorybuilderimpl.java:842)          @ org.springframework.orm.jpa.vendor.springhibernatejpapersistenceprovider.createcontainerentitymanagerfactory(springhibernatejpapersistenceprovider.java:60)          @ org.springframework.orm.jpa.localcontainerentitymanagerfactorybean.createnativeentitymanagerfactory(localcontainerentitymanagerfactorybean.java:343)         @ rg.springframework.orm.jpa.abstractentitymanagerfactorybean.afterpropertiesset(abstractentitymanagerfactorybean.java:318)        @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1631)         @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1568)        ... 29 more             jul 28, 2017 12:18:33 pm org.apache.catalina.core.standardcontext loadonstartup     severe: servlet [dispatcher] in web application [/tgarest] threw load() exception        java.lang.abstractmethoderror: oracle.jdbc.driver.t4cconnection.isvalid(i)z            @ org.apache.tomcat.dbcp.dbcp2.delegatingconnection.isvalid(delegatingconnection.java:924)         @ org.apache.tomcat.dbcp.dbcp2.poolableconnection.validate(poolableconnection.java:282)            @ org.apache.tomcat.dbcp.dbcp2.poolableconnectionfactory.validateconnection(poolableconnectionfactory.java:359)            @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.validateconnectionfactory(basicdatasource.java:2316)            @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.createpoolableconnectionfactory(basicdatasource.java:2299)          @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.createdatasource(basicdatasource.java:2043)         @ org.apache.tomcat.dbcp.dbcp2.basicdatasource.getconnection(basicdatasource.java:1543)        @ org.hibernate.engine.jdbc.connections.internal.datasourceconnectionproviderimpl.getconnection(datasourceconnectionproviderimpl.java:139)         @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl$connectionproviderjdbcconnectionaccess.obtainconnection(jdbcservicesimpl.java:279)           @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.configure(jdbcservicesimpl.java:124)         @ org.hibernate.boot.registry.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:111)          @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:234)           @  


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -