Friday, February 24, 2012

ArrayIndexOutOfBoundsException during Connection.commit()

Hi,
using SQL Server 2000 SP3a, and JDBC driver SP3 (Version 2.2.0040), and
SelectMethod=cursor I keep on getting the following during
Connection.commit():
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
com.microsoft.util.UtilBufferedDataProvider.getArr ayOfBytes(Unknown
Source)
at
com.microsoft.util.UtilDepacketizingDataProvider.g etArrayOfBytes(Unknown
Source)
at
com.microsoft.util.UtilDepacketizingDataProvider.e mpty(Unknown Source)
at com.microsoft.util.UtilByteOrderedDataReader.empty (Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.clearR eplyChannel(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest .submitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplConnecti on.commitTransaction(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.commit(Unkn own Source)
at
org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.java:238)
at
org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.java:238)
at
org.apache.commons.dbcp.PoolingDriver$PoolGuardCon nectionWrapper.commit(PoolingDriver.java:262)
at
org.jpox.NonmanagedTransaction.releaseConnection(N onmanagedTransaction.java:290)
Does anybody have an idea what this might be related to?
Thanks for any hints,
Jrg.
Maybe a Connection cannot be reliably committed when there is no open
transaction? Before the Exception occurs, a few thousand commit()s have
happened on Connections without an open transaction, though...
Joerg von Frantzius schrieb:

> Hi,
> using SQL Server 2000 SP3a, and JDBC driver SP3 (Version 2.2.0040),
> and SelectMethod=cursor I keep on getting the following during
> Connection.commit():
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at
> com.microsoft.util.UtilBufferedDataProvider.getArr ayOfBytes(Unknown
> Source)
> at
> com.microsoft.util.UtilDepacketizingDataProvider.g etArrayOfBytes(Unknown
> Source)
> at
> com.microsoft.util.UtilDepacketizingDataProvider.e mpty(Unknown Source)
> at com.microsoft.util.UtilByteOrderedDataReader.empty (Unknown
> Source)
> at
> com.microsoft.jdbc.sqlserver.tds.TDSRequest.clearR eplyChannel(Unknown
> Source)
> at
> com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest .submitRequest(Unknown
> Source)
> at
> com.microsoft.jdbc.sqlserver.SQLServerImplConnecti on.commitTransaction(Unknown
> Source)
> at com.microsoft.jdbc.base.BaseConnection.commit(Unkn own Source)
> at
> org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.java:238)
> at
> org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.java:238)
> at
> org.apache.commons.dbcp.PoolingDriver$PoolGuardCon nectionWrapper.commit(PoolingDriver.java:262)
> at
> org.jpox.NonmanagedTransaction.releaseConnection(N onmanagedTransaction.java:290)
> Does anybody have an idea what this might be related to?
> Thanks for any hints,
> Jrg.
|||Interestingly, again this one does not happen while in debug-mode
(slower execution).
Joerg von Frantzius schrieb:

> Maybe a Connection cannot be reliably committed when there is no open
> transaction? Before the Exception occurs, a few thousand commit()s
> have happened on Connections without an open transaction, though...
> Joerg von Frantzius schrieb:
>
>
|||Hi. This is definitely a JVM/driver bug. It has nothing to do with
what you are doing, even if what you are doing is semantically wrong
or not. Is there any chance you are using this same connection or
objects from it, in more than one thread at a time?
Joe Weinstein at BEA
Joerg von Frantzius wrote:

> Hi,
> using SQL Server 2000 SP3a, and JDBC driver SP3 (Version 2.2.0040), and
> SelectMethod=cursor I keep on getting the following during
> Connection.commit():
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at
> com.microsoft.util.UtilBufferedDataProvider.getArr ayOfBytes(Unknown
> Source)
> at
> com.microsoft.util.UtilDepacketizingDataProvider.g etArrayOfBytes(Unknown
> Source)
> at
> com.microsoft.util.UtilDepacketizingDataProvider.e mpty(Unknown Source)
> at com.microsoft.util.UtilByteOrderedDataReader.empty (Unknown
> Source)
> at
> com.microsoft.jdbc.sqlserver.tds.TDSRequest.clearR eplyChannel(Unknown
> Source)
> at
> com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest .submitRequest(Unknown
> Source)
> at
> com.microsoft.jdbc.sqlserver.SQLServerImplConnecti on.commitTransaction(Unknown
> Source)
> at com.microsoft.jdbc.base.BaseConnection.commit(Unkn own Source)
> at
> org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.java:238)
> at
> org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.java:238)
> at
> org.apache.commons.dbcp.PoolingDriver$PoolGuardCon nectionWrapper.commit(PoolingDriver.java:262)
> at
> org.jpox.NonmanagedTransaction.releaseConnection(N onmanagedTransaction.java:290)
> Does anybody have an idea what this might be related to?
> Thanks for any hints,
> Jrg.
|||Hi Joe,
I'm using commons-dbcp for connection pooling now, and I know that it
opens a Thread, but I don't know what exactly it is doing there... My
process is not multi-threaded otherwise.
Joe Weinstein schrieb:

> Hi. This is definitely a JVM/driver bug. It has nothing to do with
> what you are doing, even if what you are doing is semantically wrong
> or not. Is there any chance you are using this same connection or
> objects from it, in more than one thread at a time?
> Joe Weinstein at BEA
> Joerg von Frantzius wrote:
>
>
|||Hi,
do you per chance know where I can file a bug report for this one? I'm
not sure whether this group is monitored by any MS developers.
Thanks,
Jrg.
Joe Weinstein schrieb:

> Hi. This is definitely a JVM/driver bug. It has nothing to do with
> what you are doing, even if what you are doing is semantically wrong
> or not. Is there any chance you are using this same connection or
> objects from it, in more than one thread at a time?
> Joe Weinstein at BEA
> Joerg von Frantzius wrote:
>
>
|||| Message-ID: <41DE5EED.8030405@.artnology.REMOVE.com>
| Date: Fri, 07 Jan 2005 11:05:33 +0100
| From: Joerg von Frantzius <joerg.von.frantzius@.artnology.REMOVE.com>
| User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
| X-Accept-Language: en-us, de-de, de, en
| MIME-Version: 1.0
| CC: joe@.bea.com
| Subject: Re: ArrayIndexOutOfBoundsException during Connection.commit()
| References: <uHFjJkB9EHA.1408@.TK2MSFTNGP10.phx.gbl>
<41DD8071.3040806@.bea.com>
| In-Reply-To: <41DD8071.3040806@.bea.com>
| Content-Type: text/plain; charset=ISO-8859-15; format=flowed
| Content-Transfer-Encoding: 8bit
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: 195.143.217.178
| Lines: 1
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6587
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| Hi,
| do you per chance know where I can file a bug report for this one? I'm
| not sure whether this group is monitored by any MS developers.
|
| Thanks,
| Jrg.
|
| Joe Weinstein schrieb:
|
| > Hi. This is definitely a JVM/driver bug. It has nothing to do with
| > what you are doing, even if what you are doing is semantically wrong
| > or not. Is there any chance you are using this same connection or
| > objects from it, in more than one thread at a time?
| >
| > Joe Weinstein at BEA
| >
| > Joerg von Frantzius wrote:
| >
| >> Hi,
| >>
| >> using SQL Server 2000 SP3a, and JDBC driver SP3 (Version 2.2.0040),
| >> and SelectMethod=cursor I keep on getting the following during
| >> Connection.commit():
| >>
| >> java.lang.ArrayIndexOutOfBoundsException
| >> at java.lang.System.arraycopy(Native Method)
| >> at
| >> com.microsoft.util.UtilBufferedDataProvider.getArr ayOfBytes(Unknown
| >> Source)
| >> at
| >>
| >>
com.microsoft.util.UtilDepacketizingDataProvider.g etArrayOfBytes(Unknown
| >> Source)
| >> at
| >> com.microsoft.util.UtilDepacketizingDataProvider.e mpty(Unknown
| >> Source)
| >> at com.microsoft.util.UtilByteOrderedDataReader.empty (Unknown
| >> Source)
| >> at
| >>
| >> com.microsoft.jdbc.sqlserver.tds.TDSRequest.clearR eplyChannel(Unknown
| >> Source)
| >> at
| >>
| >>
com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest .submitRequest(Unknown
| >> Source)
| >> at
| >>
| >>
com.microsoft.jdbc.sqlserver.SQLServerImplConnecti on.commitTransaction(Unkno
wn
| >>
| >> Source)
| >> at com.microsoft.jdbc.base.BaseConnection.commit(Unkn own
Source)
| >> at
| >>
| >>
org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.jav
a:238)
| >>
| >> at
| >>
| >>
org.apache.commons.dbcp.DelegatingConnection.commi t(DelegatingConnection.jav
a:238)
| >>
| >> at
| >>
| >>
org.apache.commons.dbcp.PoolingDriver$PoolGuardCon nectionWrapper.commit(Pool
ingDriver.java:262)
| >>
| >> at
| >>
| >>
org.jpox.NonmanagedTransaction.releaseConnection(N onmanagedTransaction.java:
290)
| >>
| >>
| >> Does anybody have an idea what this might be related to?
| >>
| >> Thanks for any hints,
| >> Jrg.
| >
| >
|
Hello Jrg,
Can you post the code used to reproduce the error? Please also include the
table schema and stored proc definitions (if any) that are used. I can
file the bug with the developers once I receive this information.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|||Joe Weinstein wrote:
> Hi. This is definitely a JVM/driver bug. It has nothing to do with
> what you are doing, even if what you are doing is semantically wrong
> or not.
It's definitely a driver bug, not a JVM problem. It could be a
synchronization issue or a much simpler problem but it's caused by the
driver.
Alin,
The jTDS Project.

No comments:

Post a Comment