-->
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: could not initialize a collection:
PostPosted: Wed Aug 18, 2010 4:23 am 
Newbie

Joined: Wed Aug 18, 2010 3:54 am
Posts: 3
I am getting this exception when I am trying to call a Stateless Session EJB remote multiple times from a single thread.
nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not initialize a collection:

Basically I have an API which returns data based on start index, end index and sort column.
After fetching around 8K to 9K records, This exception comes up.
All records in database are identical except key columns so there is no question of inconsistency in database because already 9 K records fetched out of 20 K.
All One to many relationship are early loaded.

Sometimes, I see same issue for loading OneToOne mapped entity.
Below is whole stacktrace..

log4j:WARN No such property [conversionPattern] in com.avaya.common.logging.client.CommonLoggingLayout.
Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not initialize a collection: [com.avaya.panther.config.rts.service.common.entity.ApplicationSystemEntity.portList#26819]; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not initialize a collection: [com.avaya.panther.config.rts.service.common.entity.ApplicationSystemEntity.portList#26819]
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not initialize a collection:
[com.avaya.panther.config.rts.service.common.entity.ApplicationSystemEntity.portList#26819]
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
at com.avaya.panther.config.rts.service.model.db.DataManager.getApplicationSystems(DataManager.java:4260)
at com.avaya.panther.config.rts.service.RTSServiceImpl.searchApplicationSystems(RTSServiceImpl.java:597)
at sun.reflect.GeneratedMethodAccessor955.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at com.avaya.panther.config.rts.service.auth.AuthInterceptor.checkPermissionView(AuthInterceptor.java:163)
at com.avaya.panther.config.rts.service.auth.AuthInterceptor.validate(AuthInterceptor.java:109)
at sun.reflect.GeneratedMethodAccessor820.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:862)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:609)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:407)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:174)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
at $Proxy0.searchApplicationSystems(Unknown Source)



Please help me to analyze this issue. Thanks,Ashish


Top
 Profile  
 
 Post subject: Re: could not initialize a collection:
PostPosted: Thu Aug 19, 2010 2:27 am 
Newbie

Joined: Wed Aug 18, 2010 3:54 am
Posts: 3
I even tried login out and login in after exporting 1000 records but no help.

Any pointer is greatly appreciated.


Top
 Profile  
 
 Post subject: Re: could not initialize a collection:
PostPosted: Thu Aug 19, 2010 7:12 am 
Newbie

Joined: Tue Jul 20, 2010 1:53 am
Posts: 18
Add ojdbc14.jar file in our computer environment variables after say commit keyword in DB level s/w . .


Top
 Profile  
 
 Post subject: Re: could not initialize a collection:
PostPosted: Fri Aug 20, 2010 9:04 am 
Newbie

Joined: Wed Aug 18, 2010 3:54 am
Posts: 3
Issue has been resolved by using postgres 8.4.4
Earlier we were using 8.4.1 and making SSL true, this was giving SSL renegotiation error in postgres log which we ignored earlier.

After upgrading postgres to 8.4.4 this issue is gone.

Thanks,


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.