You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (Created) (JIRA)" <ji...@apache.org> on 2012/03/15 21:42:38 UTC

[jira] [Created] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

@GeneratedValue fails to work in some situations with OpenJPA
-------------------------------------------------------------

                 Key: OPENEJB-1798
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
             Project: OpenEJB
          Issue Type: Bug
            Reporter: David Blevins
             Fix For: 4.0.0-beta-3




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "Romain Manni-Bucau (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230602#comment-13230602 ] 

Romain Manni-Bucau commented on OPENEJB-1798:
---------------------------------------------

forgotten to precise this issue appeared in polling-web module of polling sample (trunk of openejb)
                
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0-beta-3
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "Romain Manni-Bucau (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230528#comment-13230528 ] 

Romain Manni-Bucau commented on OPENEJB-1798:
---------------------------------------------

by default OpenJPA was using RegistryManagedRuntime and the implementation of org.apache.openjpa.ee.RegistryManagedRuntime#doNonTransactionalWork (which is invocated when OpenJPA tries to get the id value) simply makes the operation fail.

using invocation(TransactionManagerMethod=org.apache.openejb.OpenEJB.getTransactionManager) for openjpa.ManagedRuntime makes it working.
                
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0-beta-3
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264770#comment-13264770 ] 

David Blevins commented on OPENEJB-1798:
----------------------------------------

2012-03-15 - http://svn.apache.org/viewvc?view=revision&revision=1301191 - dblevins

                
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-1798.
----------------------------------

    Resolution: Fixed
    
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "Romain Manni-Bucau (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230576#comment-13230576 ] 

Romain Manni-Bucau commented on OPENEJB-1798:
---------------------------------------------

here is the stack:

org.apache.openjpa.ee.RegistryManagedRuntime.doNonTransactionalWork(RegistryManagedRuntime.java:203)
	at org.apache.openjpa.ee.AutomaticManagedRuntime.doNonTransactionalWork(AutomaticManagedRuntime.java:315)
	at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:445)
	at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:300)
	at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)
	at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)
	at org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:756)
	at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:493)
	at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:469)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:740)
	at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:135)
	at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:612)
	at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2977)
	at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:40)
	at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:1054)
	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2112)
	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2072)
	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1990)
	at org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:527)
	at org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:512)
	at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:413)
	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:262)
	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
	at org.apache.openejb.core.transaction.JtaTransactionPolicy.completeTransaction(JtaTransactionPolicy.java:328)
	at org.apache.openejb.core.transaction.TxRequired.commit(TxRequired.java:75)
	at org.apache.openejb.core.transaction.EjbTransactionUtil.afterInvoke(EjbTransactionUtil.java:73)
	at org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:245)
	at org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:193)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:260)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:240)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:91)
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:284)
                
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0-beta-3
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "Romain Manni-Bucau (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230532#comment-13230532 ] 

Romain Manni-Bucau commented on OPENEJB-1798:
---------------------------------------------

by default OpenJPA was using RegistryManagedRuntime and the implementation of org.apache.openjpa.ee.RegistryManagedRuntime#doNonTransactionalWork (which is invocated when OpenJPA tries to get the id value of an entity id annotated with @GeneratedValue) simply makes the operation fail. OpenJPA expects being able to suspend the transaction to go to the database to get it sequence id value but as the method throws an exception if doesn't work.

using invocation(TransactionManagerMethod=org.apache.openejb.OpenEJB.getTransactionManager) for openjpa.ManagedRuntime makes it working.
                
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0-beta-3
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OPENEJB-1798) @GeneratedValue fails to work in some situations with OpenJPA

Posted by "Romain Manni-Bucau (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau updated OPENEJB-1798:
----------------------------------------

    Comment: was deleted

(was: by default OpenJPA was using RegistryManagedRuntime and the implementation of org.apache.openjpa.ee.RegistryManagedRuntime#doNonTransactionalWork (which is invocated when OpenJPA tries to get the id value) simply makes the operation fail.

using invocation(TransactionManagerMethod=org.apache.openejb.OpenEJB.getTransactionManager) for openjpa.ManagedRuntime makes it working.)
    
> @GeneratedValue fails to work in some situations with OpenJPA
> -------------------------------------------------------------
>
>                 Key: OPENEJB-1798
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1798
>             Project: OpenEJB
>          Issue Type: Bug
>            Reporter: David Blevins
>             Fix For: 4.0.0-beta-3
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira