为什么我得到了java。lang。尝试在db中加载一个blob时,将会发生什么?

时间:2022-04-05 22:51:32

I've got a problem with JDBC.

我遇到了JDBC的问题。

I'have the following code:

我'have以下代码:

//blargeparam is a blob column.
PreparedStatement pst =connection.prepareStatement("update gcp_processparams_log set blargeparam= ? where idprocessparamslog=1");

pst.setBinaryStream(1,inputStream);         

I get the following error:

我得到了以下错误:

Exception in thread "main" java.lang.AbstractMethodError:           
oracle.jdbc.driver.T2CPreparedStatement.setBinaryStream(ILjava/io/InputStream;)V  

My connection string is jdbc:oracle:oci:@.....

我的连接字符串是jdbc:oracle:oci:@…

The Oracle version is 11g.

甲骨文的版本是11g。

From the error message it seems that something is missing but:

从错误信息看来,似乎缺少了什么,但是:

  • when I read from the same blob column (with blob.getBytes) everything works.
  • 当我从相同的blob列(使用blob.getBytes)读取时,一切正常。
  • The DLL's of the instant client are (correctly) in the library path.
  • 在库路径中,即时客户机的DLL是(正确的)。
  • This is the manifest of the Oracle JDBC JAR in my class path:

    这是我的类路径中的Oracle JDBC JAR的清单:

    Manifest-Version: 1.0  
    Specification-Title:    Oracle JDBC driver classes for use with JDK14  
    Sealed: true  
    Created-By: 1.4.2_14 (Sun Microsystems Inc.)  
    Implementation-Title:   ojdbc14.jar  
    Specification-Vendor:   Oracle Corporation  
    Specification-Version:  Oracle JDBC Driver version - "10.2.0.4.0"  
    Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0"  
    Implementation-Vendor:  Oracle Corporation  
    Implementation-Time:    Sat Feb  2 11:40:29 2008  
    

14 个解决方案

#1


60  

With JDBC, that error usually occurs because your JDBC driver implements an older version of the JDBC API than the one included in your JRE. These older versions are fine so long as you don't try and use a method that appeared in the newer API.

使用JDBC时,通常会出现这种错误,因为JDBC驱动程序实现了比JRE中包含的JDBC API更老的版本。只要您不尝试并使用在更新的API中出现的方法,这些旧版本就很好。

I'm not sure what version of JDBC setBinaryStream appeared in. It's been around for a while, I think.

我不确定什么版本的JDBC setBinaryStream出现了。我想这已经有一段时间了。

Regardless, your JDBC driver version (10.2.0.4.0) is quite old, I recommend upgrading it to the version that was released with 11g (download here), and try again.

无论如何,您的JDBC驱动程序版本(10.2.0.4.0)已经相当陈旧了,我建议将其升级到以11g版本发布的版本(此处下载),然后再试一次。

#2


10  

It looks that even if the driver 10.2 is compatible with the JDBC3 it may not work with JRE6 as I've found here:

看起来,即使驱动程序10.2与JDBC3兼容,它也不能与JRE6一起工作,正如我在这里发现的:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html#02_03

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html 02 _03

Which JDBC drivers support which versions of Javasoft's JDK?

哪些JDBC驱动程序支持哪些版本的Javasoft JDK?

pre-8i OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x
8.1.5 OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x
8.1.6SDK THIN Driver - JDK 1.1.x and JDK 1.2.x (aka Java2)
8.1.6SDK OCI Driver - Only JDK 1.1.x
8.1.6 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x
8.1.7 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x
9.0.1 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x and JDK 1.3.x
9.2.0 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x
10.1.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x
10.2.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, JDK 1.4.x, and JDK 5.0.x
11.1.0 OCI and THIN Driver - JDK 1.5.x and JDK 1.6.x

pre-8i OCI和瘦驱动- JDK 1.0。x和JDK 1.1。x8.1.5 OCI和瘦驱动程序——JDK 1.0。x和JDK 1.1。x8.1.6 sdk THIN Driver - JDK 1.1。x和JDK 1.2。x(又名Java2) 8.1.6SDK OCI驱动程序——只有JDK 1.1。x8.1.6 OCI和瘦驱动程序- JDK 1.1。x和JDK 1.2。x8.1.7 OCI和THIN Driver - JDK 1.1。x和JDK 1.2。x9.0.1 OCI和瘦驱动程序- JDK 1.1。x,JDK 1.2。x和JDK 1.3。x9.2.0 OCI和瘦驱动程序- JDK 1.1。x,JDK 1.2。x,JDK 1.3。x,JDK 1.4。x10.1.0 OCI和瘦驱动- JDK 1.2。x,JDK 1.3。x,JDK 1.4。x10.2.0 OCI和瘦驱动程序- JDK 1.2。x,JDK 1.3。x,JDK 1.4。x,JDK 5.0。x11.1.0 OCI和瘦驱动- JDK 1.5。x和JDK 1.6.x

Oracle 10.2.0 supports:

甲骨文10.2.0支持:

Full support for JDBC 3.0
Note that there is no real change in the support for the following in the database. Allthat has changed is that some methods that previously threw SQLException now do something more reasonable instead.
result-set holdability
returning multiple result-sets.

对JDBC 3.0的完全支持说明在数据库中对以下内容的支持没有真正的改变。所有这些都改变了,一些以前抛出SQLException的方法现在做了一些更合理的事情。结果集的可保持性返回多个结果集。

#3


6  

Here's what the JDK API says about AbstractMethodError:

下面是JDK API关于abstractmethod的描述:

Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.

当应用程序试图调用抽象方法时抛出。通常,这个错误被编译器捕获;这个错误只能在运行时发生,如果某个类的定义有不兼容的变化,因为当前的执行方法是最后编译的。

Bug in the oracle driver, maybe?

可能是oracle驱动程序中的Bug ?

#4


4  

Just put ojdbc6.jar in class path, so that we can fix CallbaleStatement exception:

把ojdbc6。jar在类路径中,这样我们就可以修复CallbaleStatement exception:

oracle.jdbc.driver.T4CPreparedStatement.setBinaryStream(ILjava/io/InputStream;J)V)

in Oracle.

在Oracle。

#5


3  

As described in the API of java.sql.PreparedStatement.setBinaryStream() it is available since 1.6 so it is a JDBC 4.0 API! You use a JDBC 3 Driver so this method is not available!

按照java.sql.PreparedStatement.setBinaryStream()的API描述,它从1.6开始就可用了,所以它是一个JDBC 4.0 API!您使用JDBC 3驱动程序,因此此方法不可用!

#6


2  

In my case this was the error.

在我的例子中,这是错误。

Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:917) at org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:282) at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:356) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2306) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2289) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1532) at beans.Test.main(Test.java:24)

线程“main”java.lang中的异常。AbstractMethodError:mso - ascii - font - family: tahoma; mso - hansi - font - family: tahoma; mso - hansi - font - family: tahoma; mso - bidi - font - family: tahoma ' >, < / span > < spancaspase .dbcp.dbcp2. basicdatasource . createpoolableconnectionfactory (BasicDataSource.java:2289)在org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038)。

Solution: I just change ojdbc14.jar to ojdbc6.jar

解决方案:我只是更改ojdbc14。jar,ojdbc6.jar

#7


2  

Just use ojdb6.jar and will fix all such issues.

只使用ojdb6。jar并将解决所有这些问题。

For maven based applications:

基于maven应用程序:

  1. Download and copy ojdbc6.jar to a directory in your local machine

    下载和复制ojdbc6。jar到本地机器中的一个目录。

  2. From the location where you have copied your jar install the ojdbc6.jar in your local .M2 Repo by issuing below command C:\SRK\Softwares\Libraries>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true

    从您复制jar的位置安装ojdbc6。在本地的. m2 Repo中,通过下面的命令C:\SRK\Softwares\ library >mvn安装:installfile -DgroupId=com。oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 - dfiles =jar -Dfile=ojdbc6。jar -DgeneratePom = true

  3. Add the below in your project pom.xml as ojdbc6.jar dependency

    在项目pom中添加以下内容。xml作为ojdbc6。jar依赖项

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0.3</version>
    </dependency>
    

PS: The issue might be due to uses of @Lob annotation in JPA for storing large objects specifically in oracle db columns. Upgrading to 11.2.0.3 (ojdbc6.jar) can resolve the issue.

PS:这个问题可能是由于在JPA中使用@Lob注释来存储大型对象,特别是在oracle db列中。升级到11.2.0.3 (ojdbc6.jar)可以解决这个问题。

#8


1  

I would suggest investigating your classpath very carefully. You might have two different versions of a jar file where one invokes methods in the other and the other method is abstract.

我建议您非常仔细地调查您的类路径。您可能有两个不同版本的jar文件,其中一个调用另一个方法,另一个方法是抽象的。

#9


1  

In my case problem was at context.xml file of my project.

在我的案例中,问题在于上下文。我的项目的xml文件。

The following from context.xml causes the java.lang.AbstractMethodError, since we didn't show the datasource factory.

以下从上下文。xml使. lang。因为我们没有显示数据源工厂。

<Resource name="jdbc/myoracle"
              auth="Container"
              type="javax.sql.DataSource"
              driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@(DESCRIPTION = ... "
              username="****" password="****" maxActive="10" maxIdle="1"
              maxWait="-1" removeAbandoned="true"/> 

Simpy adding factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" solved the issue:

Simpy添加工厂= " org.apache.tomcat.jdbc.pool。DataSourceFactory”解决了这个问题:

<Resource name="jdbc/myoracle"
              auth="Container"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"  type="javax.sql.DataSource"
              driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@(DESCRIPTION = ... "
              username="****" password="****" maxActive="10" maxIdle="1"
              maxWait="-1" removeAbandoned="true"/>

To make sure I reproduced the issue several times by removing factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" from Resource

为了确保我通过删除工厂=“org.apache.tomcat.jdbc.pool”多次复制这个问题。DataSourceFactory”资源

#10


0  

I do meet this problem. use ojdbc14.jar and jdk 1.6

我遇到这个问题。使用ojdbc14。jar和jdk 1.6

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,file.length());  // got AbstractMethodError 

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,(int)file.length());  // no problem.

#11


0  

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,file.length());  

instead of this u need to use

而不是这个u需要使用。

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,(int)file.length());  

#12


0  

The problem is due to older version of ojdbc - ojdbc14.

问题在于旧版本的ojdbc - ojdbc14。

Place the latest version of ojdbc jar file in your application or shared library. (Only one version should be there and it should be the latest one) As of today - ojdbc6.jar

在应用程序或共享库中放置最新版本的ojdbc jar文件。(只有一个版本应该在那里,而且应该是最新的版本)——ojdbc6.jar。

Check the application libraries and shared libraries on server.

在服务器上检查应用程序库和共享库。

#13


0  

I think, the reason of the error from JDBC driver, you should get suitable JDBC driver for your Oracle db. You can get it from

我认为,JDBC驱动程序错误的原因是,您应该为您的Oracle db找到合适的JDBC驱动程序。你可以从。

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

http://www.oracle.com/technetwork/database/enterprise edition/jdbc - 112010 - 090769. - html

#14


-2  

I got the same problem and resolved it.

我遇到了同样的问题并解决了。

To resolve this problem, you should upgrade commons-dbcp library to latest version (1.4). It will work with latest JDBC drivers.

要解决这个问题,您应该将common -dbcp库升级到最新版本(1.4)。它将使用最新的JDBC驱动程序。

#1


60  

With JDBC, that error usually occurs because your JDBC driver implements an older version of the JDBC API than the one included in your JRE. These older versions are fine so long as you don't try and use a method that appeared in the newer API.

使用JDBC时,通常会出现这种错误,因为JDBC驱动程序实现了比JRE中包含的JDBC API更老的版本。只要您不尝试并使用在更新的API中出现的方法,这些旧版本就很好。

I'm not sure what version of JDBC setBinaryStream appeared in. It's been around for a while, I think.

我不确定什么版本的JDBC setBinaryStream出现了。我想这已经有一段时间了。

Regardless, your JDBC driver version (10.2.0.4.0) is quite old, I recommend upgrading it to the version that was released with 11g (download here), and try again.

无论如何,您的JDBC驱动程序版本(10.2.0.4.0)已经相当陈旧了,我建议将其升级到以11g版本发布的版本(此处下载),然后再试一次。

#2


10  

It looks that even if the driver 10.2 is compatible with the JDBC3 it may not work with JRE6 as I've found here:

看起来,即使驱动程序10.2与JDBC3兼容,它也不能与JRE6一起工作,正如我在这里发现的:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html#02_03

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html 02 _03

Which JDBC drivers support which versions of Javasoft's JDK?

哪些JDBC驱动程序支持哪些版本的Javasoft JDK?

pre-8i OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x
8.1.5 OCI and THIN Drivers - JDK 1.0.x and JDK 1.1.x
8.1.6SDK THIN Driver - JDK 1.1.x and JDK 1.2.x (aka Java2)
8.1.6SDK OCI Driver - Only JDK 1.1.x
8.1.6 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x
8.1.7 OCI and THIN Driver - JDK 1.1.x and JDK 1.2.x
9.0.1 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x and JDK 1.3.x
9.2.0 OCI and THIN Driver - JDK 1.1.x, JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x
10.1.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, and JDK 1.4.x
10.2.0 OCI and THIN Driver - JDK 1.2.x, JDK 1.3.x, JDK 1.4.x, and JDK 5.0.x
11.1.0 OCI and THIN Driver - JDK 1.5.x and JDK 1.6.x

pre-8i OCI和瘦驱动- JDK 1.0。x和JDK 1.1。x8.1.5 OCI和瘦驱动程序——JDK 1.0。x和JDK 1.1。x8.1.6 sdk THIN Driver - JDK 1.1。x和JDK 1.2。x(又名Java2) 8.1.6SDK OCI驱动程序——只有JDK 1.1。x8.1.6 OCI和瘦驱动程序- JDK 1.1。x和JDK 1.2。x8.1.7 OCI和THIN Driver - JDK 1.1。x和JDK 1.2。x9.0.1 OCI和瘦驱动程序- JDK 1.1。x,JDK 1.2。x和JDK 1.3。x9.2.0 OCI和瘦驱动程序- JDK 1.1。x,JDK 1.2。x,JDK 1.3。x,JDK 1.4。x10.1.0 OCI和瘦驱动- JDK 1.2。x,JDK 1.3。x,JDK 1.4。x10.2.0 OCI和瘦驱动程序- JDK 1.2。x,JDK 1.3。x,JDK 1.4。x,JDK 5.0。x11.1.0 OCI和瘦驱动- JDK 1.5。x和JDK 1.6.x

Oracle 10.2.0 supports:

甲骨文10.2.0支持:

Full support for JDBC 3.0
Note that there is no real change in the support for the following in the database. Allthat has changed is that some methods that previously threw SQLException now do something more reasonable instead.
result-set holdability
returning multiple result-sets.

对JDBC 3.0的完全支持说明在数据库中对以下内容的支持没有真正的改变。所有这些都改变了,一些以前抛出SQLException的方法现在做了一些更合理的事情。结果集的可保持性返回多个结果集。

#3


6  

Here's what the JDK API says about AbstractMethodError:

下面是JDK API关于abstractmethod的描述:

Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.

当应用程序试图调用抽象方法时抛出。通常,这个错误被编译器捕获;这个错误只能在运行时发生,如果某个类的定义有不兼容的变化,因为当前的执行方法是最后编译的。

Bug in the oracle driver, maybe?

可能是oracle驱动程序中的Bug ?

#4


4  

Just put ojdbc6.jar in class path, so that we can fix CallbaleStatement exception:

把ojdbc6。jar在类路径中,这样我们就可以修复CallbaleStatement exception:

oracle.jdbc.driver.T4CPreparedStatement.setBinaryStream(ILjava/io/InputStream;J)V)

in Oracle.

在Oracle。

#5


3  

As described in the API of java.sql.PreparedStatement.setBinaryStream() it is available since 1.6 so it is a JDBC 4.0 API! You use a JDBC 3 Driver so this method is not available!

按照java.sql.PreparedStatement.setBinaryStream()的API描述,它从1.6开始就可用了,所以它是一个JDBC 4.0 API!您使用JDBC 3驱动程序,因此此方法不可用!

#6


2  

In my case this was the error.

在我的例子中,这是错误。

Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:917) at org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:282) at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:356) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2306) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2289) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1532) at beans.Test.main(Test.java:24)

线程“main”java.lang中的异常。AbstractMethodError:mso - ascii - font - family: tahoma; mso - hansi - font - family: tahoma; mso - hansi - font - family: tahoma; mso - bidi - font - family: tahoma ' >, < / span > < spancaspase .dbcp.dbcp2. basicdatasource . createpoolableconnectionfactory (BasicDataSource.java:2289)在org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038)。

Solution: I just change ojdbc14.jar to ojdbc6.jar

解决方案:我只是更改ojdbc14。jar,ojdbc6.jar

#7


2  

Just use ojdb6.jar and will fix all such issues.

只使用ojdb6。jar并将解决所有这些问题。

For maven based applications:

基于maven应用程序:

  1. Download and copy ojdbc6.jar to a directory in your local machine

    下载和复制ojdbc6。jar到本地机器中的一个目录。

  2. From the location where you have copied your jar install the ojdbc6.jar in your local .M2 Repo by issuing below command C:\SRK\Softwares\Libraries>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true

    从您复制jar的位置安装ojdbc6。在本地的. m2 Repo中,通过下面的命令C:\SRK\Softwares\ library >mvn安装:installfile -DgroupId=com。oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 - dfiles =jar -Dfile=ojdbc6。jar -DgeneratePom = true

  3. Add the below in your project pom.xml as ojdbc6.jar dependency

    在项目pom中添加以下内容。xml作为ojdbc6。jar依赖项

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0.3</version>
    </dependency>
    

PS: The issue might be due to uses of @Lob annotation in JPA for storing large objects specifically in oracle db columns. Upgrading to 11.2.0.3 (ojdbc6.jar) can resolve the issue.

PS:这个问题可能是由于在JPA中使用@Lob注释来存储大型对象,特别是在oracle db列中。升级到11.2.0.3 (ojdbc6.jar)可以解决这个问题。

#8


1  

I would suggest investigating your classpath very carefully. You might have two different versions of a jar file where one invokes methods in the other and the other method is abstract.

我建议您非常仔细地调查您的类路径。您可能有两个不同版本的jar文件,其中一个调用另一个方法,另一个方法是抽象的。

#9


1  

In my case problem was at context.xml file of my project.

在我的案例中,问题在于上下文。我的项目的xml文件。

The following from context.xml causes the java.lang.AbstractMethodError, since we didn't show the datasource factory.

以下从上下文。xml使. lang。因为我们没有显示数据源工厂。

<Resource name="jdbc/myoracle"
              auth="Container"
              type="javax.sql.DataSource"
              driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@(DESCRIPTION = ... "
              username="****" password="****" maxActive="10" maxIdle="1"
              maxWait="-1" removeAbandoned="true"/> 

Simpy adding factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" solved the issue:

Simpy添加工厂= " org.apache.tomcat.jdbc.pool。DataSourceFactory”解决了这个问题:

<Resource name="jdbc/myoracle"
              auth="Container"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"  type="javax.sql.DataSource"
              driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@(DESCRIPTION = ... "
              username="****" password="****" maxActive="10" maxIdle="1"
              maxWait="-1" removeAbandoned="true"/>

To make sure I reproduced the issue several times by removing factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" from Resource

为了确保我通过删除工厂=“org.apache.tomcat.jdbc.pool”多次复制这个问题。DataSourceFactory”资源

#10


0  

I do meet this problem. use ojdbc14.jar and jdk 1.6

我遇到这个问题。使用ojdbc14。jar和jdk 1.6

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,file.length());  // got AbstractMethodError 

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,(int)file.length());  // no problem.

#11


0  

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,file.length());  

instead of this u need to use

而不是这个u需要使用。

InputStream in = new FileInputStream(file);     
cstmt.setBinaryStream(1, in,(int)file.length());  

#12


0  

The problem is due to older version of ojdbc - ojdbc14.

问题在于旧版本的ojdbc - ojdbc14。

Place the latest version of ojdbc jar file in your application or shared library. (Only one version should be there and it should be the latest one) As of today - ojdbc6.jar

在应用程序或共享库中放置最新版本的ojdbc jar文件。(只有一个版本应该在那里,而且应该是最新的版本)——ojdbc6.jar。

Check the application libraries and shared libraries on server.

在服务器上检查应用程序库和共享库。

#13


0  

I think, the reason of the error from JDBC driver, you should get suitable JDBC driver for your Oracle db. You can get it from

我认为,JDBC驱动程序错误的原因是,您应该为您的Oracle db找到合适的JDBC驱动程序。你可以从。

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

http://www.oracle.com/technetwork/database/enterprise edition/jdbc - 112010 - 090769. - html

#14


-2  

I got the same problem and resolved it.

我遇到了同样的问题并解决了。

To resolve this problem, you should upgrade commons-dbcp library to latest version (1.4). It will work with latest JDBC drivers.

要解决这个问题,您应该将common -dbcp库升级到最新版本(1.4)。它将使用最新的JDBC驱动程序。