-->
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.  [ 1 post ] 
Author Message
 Post subject: GenericJDBCException:could not initialize a collection batch
PostPosted: Thu Apr 03, 2008 4:30 am 
Newbie

Joined: Fri Sep 30, 2005 12:45 am
Posts: 8
Hibernate version:3.0

Hi,
Quote:
I am getting the below exception when the object tries to load the collection:


Quote:
Caused by: org.hibernate.exception.GenericJDBCException: could not initialize a collection batch: [gov.ma.eohhs.newmmis.clm.model.PdPhysicianDetailAIM00.PaymentInfos#<component[sakClaim,numDetails]{sakClaim=400012628, numDetails=1}, component[sakClaim,numDetails]{sakClaim=400012628, numDetails=2}>]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2030)
at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:47)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454)
at gov.ma.eohhs.newmmis.clm.view.DetailPaymentInfoController.loadData(DetailPaymentInfoController.java:156)
at gov.ma.eohhs.newmmis.base.view.BaseMaintenanceController.setParentControllerName(BaseMaintenanceController.java:321)
at gov.ma.eohhs.newmmis.base.view.BaseNavigationController.recursiveShowPanel(BaseNavigationController.java:439)
at gov.ma.eohhs.newmmis.base.view.BaseNavigationController.showItemPanel(BaseNavigationController.java:406)
at gov.ma.eohhs.newmmis.base.view.BaseNavigationController.handleEvents(BaseNavigationController.java:364)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
at gov.ma.eohhs.newmmis.base.view.components.navigator.Navigator.broadcast(Navigator.java:1013)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:281)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:257)
at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:412)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:232)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at gov.ma.eohhs.newmmis.base.view.HibernateSessionFilter.doFilterInternal(HibernateSessionFilter.java:332)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at gov.ma.eohhs.newmmis.base.servlet.PreferencesFilter.doFilter(PreferencesFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at gov.ma.eohhs.newmmis.base.servlet.NoMultipleSubmitFilter.doFilter(NoMultipleSubmitFilter.java:99)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at gov.ma.eohhs.newmmis.base.servlet.SecurityFilter.doFilter(SecurityFilter.java:162)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3229)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: java.sql.SQLException: Io exception: End of TNS data channel
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:815)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3361)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:100)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2023)
at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:47)



Quote:
Root Cause:Caused by: java.sql.SQLException: Io exception: End of TNS data channel


Quote:
The object model is as foll:

    Claim -1-M - ClaimDetails - 1-M -PaymentInfos
    There is a relation between Cliam 1-M- PaymentInfos
    The error occurs only when there are >2 ClaimDetails
    I have validated the mapping against db, it is o.k

Quote:
Below is the mapping between Claim-ClaimDetails:


Code:
<bag name="Details" embed-xml="true"  inverse="true" cascade="all,delete-orphan">
     <key>
        <column name="sak_claim" />
    </key>
    <one-to-many class="PdPhysicianDetailAIM00" />
  </bag>


Quote:
mapping between ClaimDetails-PaymentInfos:


Code:
<bag name="PaymentInfos" embed-xml="true" inverse="true" cascade="all,delete-orphan">
         <key>
            <column name="sak_claim"/>
            <column name="num_dtl"/>
         </key>
         <one-to-many class="PaymentInfoAIM00" />
      </bag>

Quote:
It is able to load other collections mapped similarly except this. After the getPaymentInfos() is called in ClaimDetails obj, it throws the above exception

Quote:
Any help/pointers is very much appreciated,
Thank you in advance.


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

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.