[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2009-03-06 Thread Joe Bohn (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12679706#action_12679706
 ] 

Joe Bohn commented on GERONIMO-3907:


I created http://issues.apache.org/jira/browse/GERONIMO-4576 to address the 
further enhancements that are mentioned in this JIRA so that it can be closed 
as it appears the original problem was resolved in Geronimo 2.1.1.

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Assignee: David Jencks
Priority: Minor
 Fix For: 2.1.4, 2.2

   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-12-22 Thread Geoff Callender (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12658512#action_12658512
 ] 

Geoff Callender commented on GERONIMO-3907:
---

It's useful for more than unit testing - it's essential to be able to inform 
the client what's wrong with the request.  I've added some examples of this to 
https://issues.apache.org/jira/browse/OPENEJB-782 .

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Assignee: David Jencks
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-11-06 Thread Vincent MATHON (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12645446#action_12645446
 ] 

Vincent MATHON commented on GERONIMO-3907:
--

I agree that exceptions on the server side should not be thrown to the client 
side since such exceptions types might not be known by the client. However, for 
unit testing purpose, it is useful to attach the root cause to the 
RollBackException. I have modified a few lines in 
org.apache.geronimo.transaction.manager.TransactionImpl.java to attach the root 
cause in case of RollBackException and it works for my unit testing purpose (I 
have not enough background on the java transaction architecture topic to submit 
a patch for production). It would be great to define a configuration parameter 
that permits to provide the root cause to the client and keep the current 
behaviour that does not by default.

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Assignee: David Jencks
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-05-06 Thread Ralf Baumhof (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12594577#action_12594577
 ] 

Ralf Baumhof commented on GERONIMO-3907:


Today if have tested the new Geronimo release 2.1.1 (published on 28.04.2008). 
The problem is now fixed. If the server gets an error on trying a commit, this 
error is now thrown to the web bean. 

Exception text: 
javax.ejb.EJBTransactionRolledbackException: Transaction was rolled back, 
presumably because setRollbackOnly was called during a synchronization: Unable 
to commit: transaction marked for rollback Root Cause: 
javax.transaction.TransactionRolledbackException : Transaction was rolled back, 
presumably because setRollbackOnly was called during a synchronization: Unable 
to commit: transaction marked for rollback

Unfortunately there is no proper root cause attached to the exception. So the 
cause can only be seen in the server console, but can not be reported to the 
user. It would be very nice if you could change this in a later release.

Thanks for your help.




 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Assignee: David Jencks
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-18 Thread David Jencks (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12579739#action_12579739
 ] 

David Jencks commented on GERONIMO-3907:


Prospective fix committed to openejb in rev 638225.  Can you check that this 
fixes this problem?

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Assignee: David Jencks
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
 at javax.faces.component.UICommand.broadcast(UICommand.java:121)
 at 
 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-17 Thread Ralf Baumhof (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12579354#action_12579354
 ] 

Ralf Baumhof commented on GERONIMO-3907:


Of course entityManager.flush() works. But this is not an appropriate solution. 
We have a big project and we can not rely on the programmers always to write 
flush after each persist call. What i mean is a configuration setting that 
always forces the EntityManager to write changes through to databse. I have 
tried to disable caching but this does not work. Now, i'am currently 
evaluating: property name=openjpa.DataCacheTimeout value=0 /. This seems 
to work. This means, data in the cache will expire at once.  But will there be 
any serious side effects if we enable this setting I consider this 
problem as very serious because container transaction managment must be 
reliable. It's the main point for using an application server. 

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-17 Thread Ralf Baumhof (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12579356#action_12579356
 ] 

Ralf Baumhof commented on GERONIMO-3907:


Sorry, i was wrong. The setting property name=openjpa.DataCacheTimeout 
value=0 / does not work. So, if there is no nearby solution for this 
problem, we must think about stopping the project and first port to an another 
application container.

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
  

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-17 Thread David Jencks (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12579576#action_12579576
 ] 

David Jencks commented on GERONIMO-3907:


I wasn't suggesting that flush was a solution, just a temporary workaround.

Preliminary investigation suggests that there may be a problem with 
org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction.  
Hopefully we can investigate and fix this shortly.  IIRC the spec rules about 
what to do in this situation are a little hard to understand.

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-17 Thread David Jencks (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12579679#action_12579679
 ] 

David Jencks commented on GERONIMO-3907:


Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException 
or maybe RemoteException here.

See https://issues.apache.org/jira/browse/OPENEJB-782.

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
 at javax.faces.component.UICommand.broadcast(UICommand.java:121)
 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-13 Thread Ralf Baumhof (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12578208#action_12578208
 ] 

Ralf Baumhof commented on GERONIMO-3907:


I have just upgraded my geronimo 2.1 with a new openjpa (1.0.2) version. The 
error is the same. The situation always occurs if you have only one insert on 
the database. So, the physical insert on database is performed AFTER the 
stateless session bean is executed (by ejb container on performing the commit 
with the jta datasource). If i throw an exception by myself it is recognized. 
Did you try this situation in your environment?  The situation does not occur 
if i have several inserts on dependant objects. In this case OpenJPA writes to 
database earlier and the exception is thrown during one of the persist calls. 
The database is a postgresql 8.2 database. Is there a possibility to force 
OpenJPA always write through to the database on each persist call?? Much thanks 
in advance!!

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-13 Thread David Jencks (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12578356#action_12578356
 ] 

David Jencks commented on GERONIMO-3907:


Have you tried entityManager.flush()?

 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
 at javax.faces.component.UICommand.broadcast(UICommand.java:121)
 at 
 javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:292)
 at 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-12 Thread Ralf Baumhof (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12577805#action_12577805
 ] 

Ralf Baumhof commented on GERONIMO-3907:


The same proble occurs, if i correct the annotations, but have an invalid 
foreign key in one column. The persist method is successfully, and later the 
commit fails. The call stack, the first line is from the DAO class which 
reports that the persist method was ok, the last line is from the JSF bean. 

[de.nrw.hagen.ggrz.bv.benutzer.db.BenutzerDAOImpl]  $$ BenutzerDAO::generated 
id = 32
12:36:12,337 WARN  [Transaction] Unexpected exception from beforeCompletion; 
transaction will roll back
openjpa-1.0.1-r420667:592145 fatal general error 
org.apache.openjpa.persistence.PersistenceException: The transaction has been 
rolled back.  See the nested exceptions for details on the errors that occurred.
at 
org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
at 
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
at 
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
at 
org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
at 
org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
at 
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
at 
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
at 
org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
at 
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
at 
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
at 
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
at 
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
at 
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
at $Proxy78.anlegenBenutzer(Unknown Source)
at 
de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
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.el.parser.AstValue.invoke(AstValue.java:131)
at 
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at 
org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at 
javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
at javax.faces.component.UICommand.broadcast(UICommand.java:121)
at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:292)
at javax.faces.component.UIViewRoot.process(UIViewRoot.java:209)
at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:117)
at 
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-12 Thread Ralf Baumhof (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12577846#action_12577846
 ] 

Ralf Baumhof commented on GERONIMO-3907:


More over. Two nearly identical situations. In both cases the insert fails 
because of invalid foreign keys. In both cases the persist method first does 
not throw an exception. But in the first case (the working case) there are some 
additional inserts and updates which may force that the data is written to 
database a little bit earlier. In this case the exception is visible and 
catchable at the level of the service fassace. In the second case (the case 
described above) it is not visible - neither at the service fassade, nor at the 
JSF bean. 

This works (the exception can be caught at the service fassade):
javax.ejb.EJBTransactionRolledbackException: The transaction has been marked 
rollback only because the bean encountered a non-application exception 
:javax.ejb.EJBTransactionRolledbackException : The transaction has been marked 
rollback only because the bean encountered a non-application exception 
:org.apache.openjpa.persistence.PersistenceException : The transaction has been 
rolled back.  See the nested exceptions for details on the errors that occurred.
at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:348)
at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:323)
at 
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
at $Proxy97.anlegenSchuldnerEintrag(Unknown Source)
at 
de.nrw.hagen.ggrz.vesuv.schuldner.services.SchuldnerServiceManagerImpl.AnlegenSchuldnerJuristischePersonZSV(SchuldnerServiceManagerImpl.java:49)
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.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
at 
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
at 
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
at 
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
at 
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
at 
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
at $Proxy96.AnlegenSchuldnerJuristischePersonZSV(Unknown Source)
at 
de.nrw.hagen.ggrz.vesuv.schuldner.controler.SRegControlerBean.anlegenJPerson(SRegControlerBean.java:115)
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.el.parser.AstValue.invoke(AstValue.java:131)
at 
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at 
org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at 
javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
at javax.faces.component.UICommand.broadcast(UICommand.java:121)
at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:292)
at javax.faces.component.UIViewRoot.process(UIViewRoot.java:209)
at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:117)
at 
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)
at 

[jira] Commented: (GERONIMO-3907) Persistence Exception is not visible/lost for client.

2008-03-12 Thread Donald Woods (JIRA)

[ 
https://issues.apache.org/jira/browse/GERONIMO-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12577961#action_12577961
 ] 

Donald Woods commented on GERONIMO-3907:


Have you tried one of the 2.1.1-SNAPSHOT or 2.2-SNAPSHOT daily builds from 
20080312 or later?
I upgraded both to use OpenJPA 1.0.2 yesterday, which had some bug fixes in 
it.



 Persistence Exception is not visible/lost for client. 
 --

 Key: GERONIMO-3907
 URL: https://issues.apache.org/jira/browse/GERONIMO-3907
 Project: Geronimo
  Issue Type: Bug
  Security Level: public(Regular issues) 
  Components: persistence
Affects Versions: 2.0.2, 2.1
 Environment: Linux, Windows
Reporter: Ralf Baumhof
Priority: Blocker
   Original Estimate: 0.08h
  Remaining Estimate: 0.08h

 I am trying an insert on a table. The Entity class is wrong annotated, one 
 column was renamed in the table. Then the following situation occurs.  
 The call to persist(entity) is successfully, no exception is thrown. On 
 leaving the ejb container and returning to tomact a commit is performed (it's 
 a managed datasource, so container performs commit). This leads to the insert 
 on database. This insert fails, a rollback is performed. On return to the JSF 
 bean no exception can be seen by the bean. In the same class i have got a 
 query method. If i replace the call to persist with the call to the query 
 method everything works ok. The exception is thrown and is visible at the 
 client site. 
 This is the geronimo console output. The last line comes from the JSB bean 
 which reports a successful insert.
 11:58:04,390 WARN  [Transaction] Unexpected exception from beforeCompletion; 
 transaction will roll back
 openjpa-1.0.1-r420667:592145 fatal general error 
 org.apache.openjpa.persistence.PersistenceException: The transaction has been 
 rolled back.  See the nested exceptions for details on the errors that 
 occurred.
 at 
 org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2107)
 at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1954)
 at 
 org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
 at 
 org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
 at 
 org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
 at 
 org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
 at 
 org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
 at 
 org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
 at 
 org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
 at 
 org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 at 
 org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 at 
 org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
 at 
 org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 at $Proxy75.anlegenBenutzer(Unknown Source)
 at 
 de.nrw.hagen.ggrz.benutzer.controler.BenutzerControler.anlegenBenutzer(BenutzerControler.java:44)
 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.el.parser.AstValue.invoke(AstValue.java:131)
 at 
 org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
 at 
 org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
 at 
 javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:75)
 at 
 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:54)
 at