-->
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.  [ 3 posts ] 
Author Message
 Post subject: Transaction problems with Spring+Hibernate+weblogic
PostPosted: Wed Apr 19, 2006 6:47 pm 
Newbie

Joined: Wed Apr 19, 2006 6:25 pm
Posts: 3
I have what seems to be a very strange problem.

I can run anywhere from 1 to 7 inserts against the database. Then I throw the following exception. I've even tried to make the business component anon-singleton to force a new transaction every time.


Code:
[b]Hibernate version:[/b]

3.0.3

[b]Mapping documents:[/b]

<beans>

        <bean id="dataSource" singleton="true" class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName">
                        <value>ACE</value>
                </property>
        </bean>
        <bean id="wlsTm" class="org.springframework.transaction.jta.WebLogicServerTransactionManagerFactoryBean"/>

<bean id="transactionManager" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager">
<property name="transactionManager"><ref local="wlsTm"/></property>
</bean>
       
        <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" singleton="true">
                <property name="dataSource">
                        <ref bean="dataSource" />
                </property>
                <property name="exposeTransactionAwareSessionFactory" value="true"></property>
                <property name="configLocation">
                        <value>classpath:hibernate.cfg.xml</value>
                </property>
                <property name="useTransactionAwareDataSource" value="true" />
                <property name="hibernateProperties">
                        <props>
                                <prop key="hibernate.current_session_context_class">jta</prop>
                                <prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</prop>
                                <prop key="hibernate.dialect">org.hibernate.dialect.InformixDialect</prop>
                                <prop key="show_sql">true</prop>
                <prop key="connection.isolation">1</prop>
        <prop key="transaction.factory_class">org.hibernate.transaction.JCATransactionFactory</prop>
        <prop key="connection.release_mode">auto</prop>
                <prop key="connection.isolation">1</prop>
                        </props>
                </property>
        </bean>
</beans>



[b]Code between sessionFactory.openSession() and session.close():[/b]
        TransactionManager tm = null;
        InitialContext ic = null;
               try {
                   log.debug("Threadlocal:"+ (new ThreadLocal()));
            ic = getInitialContext();
            tm = (TransactionManager) ic
            .lookup("weblogic.transaction.TransactionManager");
           // javax.transaction.Transaction t = tm.getTransaction();
           
            tm.begin();
            createNoValidate(reservation);
           
         } catch (Exception ex) {
            log.error("ERROR with creating transaction", ex);
         } finally {
             try {
                 ic.close();
                 ic = null;
             } catch (NamingException ne) {
                 log.error("Naming Exception in CreateReservationBo: ", ne);
             }
             
             if(tm != null){
                 try {
               log.debug("User Transaction ended status [" +tm.getStatus()+"]");
               tm.commit();
               
               log.debug("User Transaction ended status [" +tm.getStatus()+"]");
               tm = null;
           } catch (Exception e1) {
               log.error("User Transaction ended status:", e1);
           }




[b]Full stack trace of any exception that occurs:[/b]

java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.
        at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:219)
        at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:228)
        at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:356)
        at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:544)
        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:168)
        at $Proxy8.prepareStatement(Unknown Source)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:396)
        at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:82)
        at org.hibernate.persister.entity.BasicEntityPersister.getDatabaseSnapshot(BasicEntityPersister.java:864)
        at org.hibernate.engine.PersistenceContext.getDatabaseSnapshot(PersistenceContext.java:302)
        at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:189)
        at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:409)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:82)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
        at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:468)
        at org.hibernate.engine.Cascades$5.cascade(Cascades.java:154)
        at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:771)
        at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
        at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:895)
        at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:792)
        at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
        at org.hibernate.engine.Cascades.cascade(Cascades.java:847)
        at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:363)
        at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
        at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
        at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
        at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
        at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
        at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
        at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
        at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476)
        at com.intercall.resapi.hibernate.ObjectManager.save(ObjectManager.java:120)
        at com.intercall.resapi.dal.ReservationDAO.save(ReservationDAO.java:108)
        at com.intercall.resapi.business.CreateReservationBo.createNoValidate(CreateReservationBo.java:175)
        at com.intercall.resapi.business.CreateReservationBo.create(CreateReservationBo.java:118)
        at com.intercall.resapi.business.CreateReservation.create(CreateReservation.java:96)
        at com.intercall.resapi.facade.Facade.createReservation(Facade.java:136)
        at com.intercall.resapi.facade.FacadeWS.createReservation(FacadeWS.java:65)
        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:324)
        at weblogic.webservice.component.javaclass.JavaClassInvocationHandler.invoke(JavaClassInvocationHandler.java:133)
        at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:104)
        at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
        at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:535)
        at weblogic.webservice.server.Dispatcher.process(Dispatcher.java:204)
        at weblogic.webservice.server.Dispatcher.doDispatch(Dispatcher.java:176)
        at weblogic.webservice.server.Dispatcher.dispatch(Dispatcher.java:96)
        at weblogic.webservice.server.WebServiceManager.dispatch(WebServiceManager.java:100)
        at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebServiceServlet.java:297)
        at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:485)
        at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)



[b]Name and version of the database you are using:[/b]
informix 10
[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]
18:16:23 DEBUG Creating instance of bean 'createReservationBus' with merged definition [Root bean: class [com.intercall.resapi.business.CreateReservation]; abstract=false; singleton=false; lazyInit
=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [resapi.xml]]
18:16:23 DEBUG Invoking BeanPostProcessors before instantiation of bean 'createReservationBus'
18:16:23 DEBUG Using cached introspection results for class [com.intercall.resapi.business.CreateReservation]
18:16:23 DEBUG Resolving reference from property 'logger' in bean 'createReservationBus' to bean 'logger'
18:16:23 DEBUG Returning cached instance of singleton bean 'logger'
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setRegexMM(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReserv
ation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setRegexMM(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setRegexAM(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReserv
ation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setRegexAM(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setRegexDE(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReserv
ation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setRegexDE(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setRegexRS(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReserv
ation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setRegexRS(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setCreateMM(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReser
vation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setCreateMM(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setCreateAM(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReser
vation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setCreateAM(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setCreateDE(java.lang.String)] on object of class [com.intercall.resapi.business.CreateReser
vation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setCreateDE(java.lang.String)] with value of type [java.lang.String]
18:16:23 DEBUG About to invoke write method [public void com.intercall.resapi.business.CreateReservation.setLogger(org.apache.log4j.Logger)] on object of class [com.intercall.resapi.business.Create
Reservation]
18:16:23 DEBUG Invoked write method [public void com.intercall.resapi.business.CreateReservation.setLogger(org.apache.log4j.Logger)] with value of type [org.apache.log4j.Logger]
18:16:23 DEBUG Invoking BeanPostProcessors before initialization of bean 'createReservationBus'
18:16:23 DEBUG Invoking setApplicationContext on ApplicationContextAware bean 'createReservationBus'
18:16:23 DEBUG Invoking BeanPostProcessors after initialization of bean 'createReservationBus'
18:16:23 DEBUG Returning cached instance of singleton bean 'createMM'
18:16:23 DEBUG Getting transaction for com.intercall.resapi.dal.DnisDAO.getBridge
18:16:23 DEBUG Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@3f475d]
18:16:23 DEBUG Creating new transaction with name [com.intercall.resapi.dal.DnisDAO.getBridge]
18:16:23 DEBUG Initializing transaction synchronization
18:16:23 DEBUG Getting Bridge Id for number [8887999999]
18:16:23 DEBUG Executing SQL query [select bridge_id from bridge b, number_association na  where b.bridge = na.home_bridge and na.dnis = ?]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Registering transaction synchronization for JDBC Connection
18:16:23 DEBUG Bound value [org.springframework.jdbc.datasource.ConnectionHolder@666a65] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] to thread [ExecuteThread: '14' for queue: 'web
logic.kernel.Default']
18:16:23 DEBUG Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@666a65] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] bound to thread [ExecuteThread: '14' for q
ueue: 'weblogic.kernel.Default']
18:16:23 DEBUG Setting SQL statement parameter value: column index 1, parameter value [8887999999], value class [java.lang.String], SQL type unknown
18:16:23 DEBUG Falling back to [java.util.LinkedHashMap] for linked case-insensitive map
18:16:23 DEBUG Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@666a65] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] bound to thread [ExecuteThread: '14' for q
ueue: 'weblogic.kernel.Default']
18:16:23 DEBUG Invoking commit for transaction on com.intercall.resapi.dal.DnisDAO.getBridge
18:16:23 DEBUG Triggering beforeCommit synchronization
18:16:23 DEBUG Triggering beforeCompletion synchronization
18:16:23 DEBUG Removed value [org.springframework.jdbc.datasource.ConnectionHolder@666a65] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] from thread [ExecuteThread: '14' for queue:
'weblogic.kernel.Default']
18:16:23 DEBUG Returning JDBC Connection to DataSource
18:16:23 DEBUG Initiating transaction commit
18:16:23 DEBUG Triggering afterCompletion synchronization
18:16:23 DEBUG Clearing transaction synchronization
18:16:23 DEBUG Executing site_call_date with 4 args: {call informix.get_site_call_date(?,? ,?, ?) }
18:16:23 DEBUG Executing site_call_date with 4 args: Owner ID [29]
Date: [2006-04-19 06:15:45] TimeZone [ET ] bridge id [159
18:16:23 DEBUG Executing SQL query [{call informix.get_site_call_date(?,? ,?, ?) }]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Setting SQL statement parameter value: column index 1, parameter value [29], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 2, parameter value [2006-04-19 06:15:45], value class [java.lang.String], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 3, parameter value [ET], value class [java.lang.String], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 4, parameter value [159], value class [java.lang.String], SQL type unknown
18:16:23 DEBUG Returning JDBC Connection to DataSource
++++++++++++++++++++2006-04-19 06:15:45.0
++++++++++++++++++++ET 
++++++++++++++++++++null
++++++++++++++++++++2006-04-19 06:15:45.0
18:16:23 DEBUG Owner Id: [29] Date: [2006-04-19 06:15:45] TimeZone :[ET] Bridge Id: [159]
18:16:23 WARN  Setting placed_via to W for owner_id[29] Date: [Wed Apr 19 18:15:45 EDT 2006]
18:16:23 DEBUG Searching for FeatureId: [1]
18:16:23 DEBUG Searching for OptionId: [0]
18:16:23 DEBUG Validating Feature: [1]
18:16:23 DEBUG Executing SQL query [select account_number from owner where owner.owner_number = ?]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Setting SQL statement parameter value: column index 1, parameter value [29], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Returning JDBC Connection to DataSource
18:16:23 DEBUG Executing SQL query [ { call  informix.res_prembill(?,?,?,?,?,?) }]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Setting SQL statement parameter value: column index 1, parameter value [265250], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 2, parameter value [0], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 3, parameter value [0], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 4, parameter value [0], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 5, parameter value [0], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Setting SQL statement parameter value: column index 6, parameter value [0], value class [java.lang.Integer], SQL type unknown
18:16:23 DEBUG Returning JDBC Connection to DataSource
18:16:23 DEBUG Threadlocal:java.lang.ThreadLocal@1d31c7a
18:16:23 DEBUG Getting transaction for com.intercall.resapi.dal.KeysDAO.getKey
18:16:23 DEBUG Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@d4ea21]
18:16:23 DEBUG Suspending current transaction
18:16:23 DEBUG Initializing transaction synchronization
18:16:23 DEBUG Executing SQL query [ { call  informix.get_key (?) }]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Registering transaction synchronization for JDBC Connection
18:16:23 DEBUG Bound value [org.springframework.jdbc.datasource.ConnectionHolder@57524b] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] to thread [ExecuteThread: '14' for queue: 'web
logic.kernel.Default']
18:16:23 DEBUG Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@57524b] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] bound to thread [ExecuteThread: '14' for q
ueue: 'weblogic.kernel.Default']
18:16:23 DEBUG Setting SQL statement parameter value: column index 1, parameter value [reservation], value class [java.lang.String], SQL type unknown
18:16:23 DEBUG Falling back to [java.util.LinkedHashMap] for linked case-insensitive map
18:16:23 DEBUG Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@57524b] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] bound to thread [ExecuteThread: '14' for q
ueue: 'weblogic.kernel.Default']
18:16:23 DEBUG Invoking commit for transaction on com.intercall.resapi.dal.KeysDAO.getKey
18:16:23 DEBUG Triggering beforeCommit synchronization
18:16:23 DEBUG Triggering beforeCompletion synchronization
18:16:23 DEBUG Removed value [org.springframework.jdbc.datasource.ConnectionHolder@57524b] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] from thread [ExecuteThread: '14' for queue:
'weblogic.kernel.Default']
18:16:23 DEBUG Returning JDBC Connection to DataSource
18:16:23 DEBUG Triggering afterCompletion synchronization
18:16:23 DEBUG Clearing transaction synchronization
18:16:23 DEBUG Resuming suspended transaction
18:16:23 DEBUG Getting transaction for com.intercall.resapi.dal.ConferenceIdDAO.getConferenceId
18:16:23 DEBUG Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@dbf492]
18:16:23 DEBUG Suspending current transaction
18:16:23 DEBUG Initializing transaction synchronization
18:16:23 DEBUG Executing SQL query [{ call informix.get_conf_id () }]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Registering transaction synchronization for JDBC Connection
18:16:23 DEBUG Bound value [org.springframework.jdbc.datasource.ConnectionHolder@95bf88] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] to thread [ExecuteThread: '14' for queue: 'web
logic.kernel.Default']
18:16:23 DEBUG Removed value [org.springframework.jdbc.datasource.ConnectionHolder@57524b] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] from thread [ExecuteThread: '14' for queue:
'weblogic.kernel.Default']
18:16:23 DEBUG Returning JDBC Connection to DataSource
18:16:23 DEBUG Triggering afterCompletion synchronization
18:16:23 DEBUG Clearing transaction synchronization
18:16:23 DEBUG Resuming suspended transaction
18:16:23 DEBUG Getting transaction for com.intercall.resapi.dal.ConferenceIdDAO.getConferenceId
18:16:23 DEBUG Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@dbf492]
18:16:23 DEBUG Suspending current transaction
18:16:23 DEBUG Initializing transaction synchronization
18:16:23 DEBUG Executing SQL query [{ call informix.get_conf_id () }]
18:16:23 DEBUG Fetching JDBC Connection from DataSource
18:16:23 DEBUG Registering transaction synchronization for JDBC Connection
18:16:23 DEBUG Bound value [org.springframework.jdbc.datasource.ConnectionHolder@95bf88] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] to thread [ExecuteThread: '14' for queue: 'web
logic.kernel.Default']
18:16:23 DEBUG Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@95bf88] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] bound to thread [ExecuteThread: '14' for q
ueue: 'weblogic.kernel.Default']
18:16:23 DEBUG Falling back to [java.util.LinkedHashMap] for linked case-insensitive map
18:16:23 DEBUG Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@95bf88] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] bound to thread [ExecuteThread: '14' for q
ueue: 'weblogic.kernel.Default']
18:16:23 DEBUG Invoking commit for transaction on com.intercall.resapi.dal.ConferenceIdDAO.getConferenceId
18:16:23 DEBUG Triggering beforeCommit synchronization
18:16:23 DEBUG Triggering beforeCompletion synchronization
18:16:23 DEBUG Removed value [org.springframework.jdbc.datasource.ConnectionHolder@95bf88] for key [weblogic.jdbc.common.internal.RmiDataSource@1768b0a] from thread [ExecuteThread: '14' for queue:
'weblogic.kernel.Default']
18:16:23 DEBUG Returning JDBC Connection to DataSource
18:16:23 DEBUG Triggering afterCompletion synchronization
18:16:23 DEBUG Clearing transaction synchronization
18:16:23 DEBUG Resuming suspended transaction
18:16:23 DEBUG saving transient instance
18:16:23 DEBUG generated identifier: 39755128, using strategy: org.hibernate.id.Assigned
18:16:23 DEBUG saving [com.intercall.resapi.vo.ReservationVo#39755128]
18:16:23 DEBUG processing cascade ACTION_SAVE_UPDATE for: com.intercall.resapi.vo.ReservationVo
18:16:23 DEBUG done processing cascade ACTION_SAVE_UPDATE for: com.intercall.resapi.vo.ReservationVo
18:16:23 DEBUG Wrapped collection in role: com.intercall.resapi.vo.ReservationVo.features
18:16:23 DEBUG Wrapped collection in role: com.intercall.resapi.vo.ReservationVo.dnis
18:16:23 DEBUG deepCopy null
18:16:23 DEBUG Attempt to copy Null SeriesId SeriesIdVoType
18:16:23 DEBUG processing cascade ACTION_SAVE_UPDATE for: com.intercall.resapi.vo.ReservationVo
18:16:23 DEBUG cascade ACTION_SAVE_UPDATE for collection: com.intercall.resapi.vo.ReservationVo.features
18:16:23 DEBUG cascading to saveOrUpdate: com.intercall.resapi.vo.FeatureVo
18:16:23 DEBUG id unsaved-value strategy UNDEFINED
18:16:23 DEBUG Getting current persistent state for: [com.intercall.resapi.vo.FeatureVo#component[resId,productId,accessoryId,accessoryOptionId]{resId=39755128, accessoryId=1, productId=1, accessor
yOptionId=0}]
18:16:23 DEBUG about to open PreparedStatement (open PreparedStatements: 2, globally: 8)
18:16:23 DEBUG select featurevo_.res_id, featurevo_.product_id, featurevo_.accessory_id, featurevo_.accsy_option_id, featurevo_.gen_fld1 as gen5_72_, featurevo_.fax_recipient as fax6_72_, featurevo
_.fax_number as fax7_72_, featurevo_.playback_conf_id as playback8_72_, featurevo_.notify_quantity as notify9_72_, featurevo_.email as email72_, featurevo_.trans_option as trans11_72_ from informix
.res_accsy_option featurevo_ where featurevo_.res_id=? and featurevo_.product_id=? and featurevo_.accessory_id=? and featurevo_.accsy_option_id=?
18:16:23 DEBUG preparing statement
18:16:23 DEBUG SQL Exception
java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 10:02 pm 
Newbie

Joined: Wed Apr 19, 2006 6:25 pm
Posts: 3
I'm have tried the following as a work around:

Code:
try{
                Transaction mtx = objectManager.currentSession().beginTransaction();
                objectManager.save(res);
                objectManager.currentSession().flush();
                mtx.commit();
}catch(Exception e){
    log.error("Exception in Transcation Manager" , e);
}finally{
    objectManager.currentSession().close().close();

}



It's still only able to insert between 5 and 7 records before crashing.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 1:54 am 
Newbie

Joined: Wed Apr 19, 2006 6:25 pm
Posts: 3
rlrutherford wrote:
I'm have tried the following as a work around:

Code:
try{
                Transaction mtx = objectManager.currentSession().beginTransaction();
                objectManager.save(res);
                objectManager.currentSession().flush();
                mtx.commit();
}catch(Exception e){
    log.error("Exception in Transcation Manager" , e);
}finally{
    objectManager.currentSession().close().close();

}



It's still only able to insert between 5 and 7 records before crashing.


After making the above code change, and pushing the transaction further back into the database, I got the following stack trace snippit:

Quote:
00:06:37 ERROR Exception in Transcation Manager
org.hibernate.SessionException: Session is closed
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:131)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)



A quick change to my session manager and everything seems to be working. I added an isOpen() check in addition to the null check and its now working.

I'm still not sure why the session is getting closed to begin with.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.