-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Getting Exception when seesion.get(entity, id) method call.
PostPosted: Wed Nov 20, 2013 2:47 am 
Newbie

Joined: Wed Nov 20, 2013 2:33 am
Posts: 3
The Environment details,

Jboss infinispan as secound level cache.

Hibernate 3.5.0 final release.

It is intermittent issue appear only in prod not able to reproduce in dev environment any help(point me to correct direction) would be appreciated.

The Stack Trace:-

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 3
at com.txn.dao.DaoImpl.getById(DaoImpl.java:184)
at com.txn.dao.TxnManager.getTxnDetails(TxnManager.java:200)
at com.txn.dao.TxnManager.getTxnDetails(TxnManager.java:189)
at com.txn.dao.TxnManager.getTxnDetails(TxnManager.java:57)
at com.txn.TxnQueryServiceImpl.getTxnDetails(TxnQueryServiceImpl.java:92)
at com.servlet.TxnQueryServlet.doGet(TxnQueryServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:478)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:119)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:105)
at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:650)
at
org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:604)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:459)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1028)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:623)
at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:250)
at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:482)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:119)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:105)
at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:650)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:604)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:459)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
:
Extra info
==========
The DaoImpl.getById call the hibernate session.get(String , Integer) method.

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Getting Exception when seesion.get(entity, id) method call.
PostPosted: Wed Nov 20, 2013 6:00 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi shadab_123,

looking at the code of Hibernate 3.5 through https://fisheye2.atlassian.com
we can set that the exception raises in a deprecated method:


...
* @deprecated see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
*/
public static Object[] assemble(
final Serializable[] row,
final Type[] types,
final SessionImplementor session,
final Object owner) {
Object[] assembled = new Object[row.length];
for ( int i = 0; i < types.length; i++ ) {
if ( row[i] == LazyPropertyInitializer.UNFETCHED_PROPERTY || row[i] == BackrefPropertyAccessor.UNKNOWN ) {
assembled[i] = row[i];
}
else {
assembled[i] = types[i].assemble( row[i], session, owner );
}
}
return assembled;
}



HHH-5138 was fixed in Hibernate 3.6.0 so I guess you need to upgrade Hibernate to get rid of this problem.


Top
 Profile  
 
 Post subject: Re: Getting Exception when seesion.get(entity, id) method call.
PostPosted: Wed Nov 20, 2013 9:58 pm 
Newbie

Joined: Wed Nov 20, 2013 2:33 am
Posts: 3
Thanks for your quick reply.

You are Right. But still I am wondering why I have got the ,

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException

During the assembling time from 2nd Cache. Any Idea?


Top
 Profile  
 
 Post subject: Re: Getting Exception when seesion.get(entity, id) method call.
PostPosted: Mon Dec 02, 2013 5:37 am 
Newbie

Joined: Wed Nov 20, 2013 2:33 am
Posts: 3
Have changed the hibernate jar too 3.6, the error is still there!!!

Interestingly, just before error I get Hibernate warning
below,

org.hibernate.engine.loading.LoadContexts fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@10b55d7<rs=com.sybase.jdbc3.jdbc.SybResultSet@ca8c0e>


org.hibernate.engine.loading.CollectionLoadContext] On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries,

Then above Error's start bombarding in log file, pls help!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.