简体   繁体   English

Maven编译和运行时错误java.lang.AbstractMethodError:Tomcat 8 Server上的oracle.jdbc.driver.T4CConnection.isValid(I)Z

[英]Maven compilation and run time error java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z on Tomcat 8 Server

I've been converting a large Java Web App to a maven project, but I've run into an error in a handful of classes originating from the tomcat-dbcp jar. 我一直在将大型Java Web App转换为maven项目,但是在少数来自tomcat-dbcp jar的类中遇到了错误。 I get the following error messages from any class that needs to use BasicDataSource objects: 我从需要使用BasicDataSource对象的任何类中获得以下错误消息:

javax.servlet.ServletException: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z
java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z

Now I know this jar is present on the server (as it is default in our Tomcat8 installation). 现在,我知道该jar存在于服务器上(因为它是我们Tomcat8安装中的默认值)。 So in maven I declared this dependency as such: 所以在Maven中我这样声明了这种依赖关系:

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-dbcp</artifactId>
    <version>8.0.26</version>
    <scope>provided</scope>
</dependency>

But I'm still seeing this error. 但是我仍然看到此错误。 What can I do to eliminate this error? 我该怎么做才能消除此错误?

This error did go away, though I have no idea why. 这个错误确实消失了,尽管我不知道为什么。 The pom entry is still the same and still running on Tomcat 8. We did find a hacky temporary fix: pom条目仍然相同,并且仍在Tomcat 8上运行。我们确实找到了一个hacky临时修复程序:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc7</artifactId>
    <version>12.1.0.1</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/ojdbc7-12.1.0.1.jar</systemPath>
</dependency>

But we reverted back at some point and it is working fine. 但是我们在某个时候恢复了,现在一切正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Oracle 驱动程序错误 oracle.jdbc.driver.T4CConnection.isValid(I)Z - Oracle Driver Error oracle.jdbc.driver.T4CConnection.isValid(I)Z 表类型的调用过程。 创建结构时发生异常:java.lang.AbstractMethodError:oracle.jdbc.driver.T4CConnection.createStruct - Call procedure with a table type. Exception while create Struct: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.createStruct java.lang.AbstractMethodError:org.postgresql.jdbc3.Jdbc3Connection.isValid(I)Z - java.lang.AbstractMethodError: org.postgresql.jdbc3.Jdbc3Connection.isValid(I)Z java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z - java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z 为什么会出现java.lang.AbstractMethodError:oracle.jdbc.driver.OracleConnection错误? - Why do I get java.lang.AbstractMethodError: oracle.jdbc.driver.OracleConnection error? java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z - java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z java.io.NotSerializableException-oracle.jdbc.driver.T4CConnection - java.io.NotSerializableException - oracle.jdbc.driver.T4CConnection java.lang.AbstractMethodError - java.lang.AbstractMethodError 错误StatusLogger捕获java.lang.AbstractMethodError - ERROR StatusLogger Caught java.lang.AbstractMethodError java.lang.ClassCastException:oracle.jdbc.driver.T4CConnection无法转换为com.arjuna.ats.internal.arjuna.recovery.Connection - java.lang.ClassCastException: oracle.jdbc.driver.T4CConnection cannot be cast to com.arjuna.ats.internal.arjuna.recovery.Connection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM