geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Java_James <james-j...@rogers.com>
Subject JPA issue when migrating to geronimo 2.0.1
Date Wed, 29 Aug 2007 16:43:16 GMT

I was wondering if anyone could help me with a problem I am having after
migrating to geronimo 2.0.1 (from m6).

I have a basic web app that uses openejb/openjpa for persistence.  It is
also using JTA.  

When using M6, I would call entityManager.persist(entityobj);

The value would be stored in the database just fine (Flush Type was set to
AUTO).

However, once I moved to 2.0.1, the value would not be stored.  I added
entityManager.flush() to force the commit, and now I get the following
exception:

11:02:48,362 ERROR [OpenEJB] The bean instances business method encountered
a system exception: null                    <1.0.0-r561970-r561970 fatal
general error> org.apache.openjpa.persistence.PersistenceException: null              
           
at
org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.getConnection(AbstractJDBCSeq.java:162)   
                          
at
org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.nextInternal(NativeJDBCSeq.java:209)        
                          
at
org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)             
                          
at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:159)                 
                             
at
org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:143)               
                          
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)   
                          
at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:438)                
                             
at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:423)                
                             
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)
                          
at
org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
                   
at
org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:501)     
                          
at
org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2763)          
                          
at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)                    
                             
at
org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:933)        
                          
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1919)                      
                             
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1879)                  
                             
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1650)                      
                             
at
org.apache.openjpa.kernel.DelegatingBroker.flush(DelegatingBroker.java:978)              
                          
at
org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:489)       
                          
at
org.apache.geronimo.persistence.CMPEntityManagerTxScoped.flush(CMPEntityManagerTxScoped.java:153)
           


I after tracing through the code, I found that the exception is coming from
the following code in OpenJPAs AbstractJDBCSeq.java:

            try {
                TransactionManager tm = getConfiguration()
                    .getManagedRuntimeInstance().getTransactionManager();
                _outerTransaction = tm.suspend();
                tm.begin();
                return store.getConnection();
            } catch (Exception e) {
                throw new StoreException(e);
            }

Upon further investigatoin, I found that the TransactionManager seems to be
an instance of RegistryManagedRuntime.java, which throws an exception when
suspend is called.

This is where I am stuck, and not sure how to continue.  Has anyone else had
a similar problem, or would anyone know what the problem might be?

Thanks in advance for your help.
-- 
View this message in context: http://www.nabble.com/JPA-issue-when-migrating-to-geronimo-2.0.1-tf4348941s134.html#a12390954
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message