oracle.jdbc.driver.T4CTTIrxd.readBitVector(T4CTTIrxd.java:135)处的java.lang.ArrayIndexOutOfBoundsException [英] java.lang.ArrayIndexOutOfBoundsException at oracle.jdbc.driver.T4CTTIrxd.readBitVector(T4CTTIrxd.java:135)

查看:278
本文介绍了oracle.jdbc.driver.T4CTTIrxd.readBitVector(T4CTTIrxd.java:135)处的java.lang.ArrayIndexOutOfBoundsException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用Hibernate3用Spring和Driver 12.1.0.2 oracle 11.2.0.4.0。下面是错误日志。

  java.lang.ArrayIndexOutOfBoundsException 
at oracle.jdbc.driver.T4CTTIrxd.readBitVector( T4CTTIrxd.java:135)美元,oracle.jdbc.driver.T4C8TTIrxh.unmarshalV10(T4C8TTIrxh.java:123 b $ b)
在oracle.jdbc.driver.T4C8Oall.readRXH(T4C8Oall.java:678)
。在oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
在oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
在oracle.jdbc.driver .T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java :在oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3716 1066)

在oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:1015)
。在oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(不敏感ScrollableResultSet.java:979)美元,oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:579 B $ B)
在com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.next(WSJdbcResultSet.java: 3120)
在org.hibernate.loader.Loader.doQuery(Loader.java:697)
在org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
。在组织.hibernate.loader.Loader.loadCollection(Loader.java:1994)
在org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
在org.hibernate.persister.collection .AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl .java:1716)
在org.hibernate.collection.AbstractPersistentCollection.initial IZE(AbstractPersistentCollection.java:344)
在org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
在org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)在org.apache.commons.collections.CollectionUtils.select(CollectionUtils.java:515)

在com.cmt.acq.service.AcqCampaignService.getGrid(AcqCampaignService.java:1245)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)在java.lang.reflect.Method.invoke(Method.java:611)

在org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
。在组织.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.spring framework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
处org.springframework.aop org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
。 framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
位于org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:126)
位于org.springframework.aop.framework。 ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation。继续在org.springframework.aop.fram(ReflectiveMethodInvocation.java:171)
在org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
ework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
位于org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
位于org.springframework.aop.framework.ReflectiveMethodInvocation。继续(ReflectiveMethodInvocation.java:171)
在org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
。在com.sun.proxy。$ Proxy157.getGrid(来源不明)
at com.cmt.acq.action.AcqManageCampaignAction.generateXMLResponse(AcqManageCampaignAction.java:1073)


解决方案

这几乎可以肯定是由于行压缩。数据库识别顺序重复的列值,而不是再次发送值,只是从概念上发送同上。所以这个问题高度依赖于返回的数据。除非查询包含ORDER BY,否则即使重复执行单个数据库上的单个查询也可能以不同的顺序返回行,所以这个问题很难再现。



有在最近的版本中已经有几个补丁。我隐约记得看到这个问题,但我找不到它的错误。尽管最近代码已经发生了很大变化,所以我建议尝试使用 Oracle 12.2.0.1.0 Maven的。如果它复制12.2.0.1.0请提交bug。


Trying to access collection using lazy loading and facing below issue, I'm not able to figure out what is the cause of this issue.

I am using Hibernate3 with Spring and Driver 12.1.0.2 oracle 11.2.0.4.0. Below is the error log.

java.lang.ArrayIndexOutOfBoundsException
     at oracle.jdbc.driver.T4CTTIrxd.readBitVector(T4CTTIrxd.java:135)
     at oracle.jdbc.driver.T4C8TTIrxh.unmarshalV10(T4C8TTIrxh.java:123)
     at oracle.jdbc.driver.T4C8Oall.readRXH(T4C8Oall.java:678)
     at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
     at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
     at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
     at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
     at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1066)
     at oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3716)
     at oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:1015)
     at oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(InsensitiveScrollableResultSet.java:979)
     at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:579)
     at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.next(WSJdbcResultSet.java:3120)
     at org.hibernate.loader.Loader.doQuery(Loader.java:697)
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
     at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
     at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
     at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
     at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
     at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
     at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
     at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
     at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
     at org.apache.commons.collections.CollectionUtils.select(CollectionUtils.java:515)
     at com.cmt.acq.service.AcqCampaignService.getGrid(AcqCampaignService.java:1245)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
     at java.lang.reflect.Method.invoke(Method.java:611)
     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:126)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
     at com.sun.proxy.$Proxy157.getGrid(Unknown Source)
     at com.cmt.acq.action.AcqManageCampaignAction.generateXMLResponse(AcqManageCampaignAction.java:1073)

解决方案

This is almost certainly due to row compression. The database recognizes sequential duplicate column values and instead of sending the value again just sends "ditto" conceptually. So this problem is highly dependent on the data returned. Unless the query contains ORDER BY even repeat executions of a single query on a single database can return the rows in a different order so this problem can be difficult to reproduce.

There have been several patches to this code in recent releases. I vaguely recall seeing this problem but I can't find a bug for it. Still the code has changed a lot recently so I suggest trying 12.2.0.1.0 which is available on Oracle Maven. If it reproduces with 12.2.0.1.0 please file a bug.

这篇关于oracle.jdbc.driver.T4CTTIrxd.readBitVector(T4CTTIrxd.java:135)处的java.lang.ArrayIndexOutOfBoundsException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆