I have a stateless session bean which accesses an EJB3 entity. When I use
entitymanager.find() it works fine, but when i do persist() i get the following
error:
org.jboss.tm.JBossRollbackException: Unable to commit,
tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=jupiter/31, BranchQual=,
localId=31] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch
update)
|
|
| java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to
commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=jupiter/31,
BranchQual=, localId=31] status=STATUS_NO_TRANSACTION; - nested throwable:
(javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch
update) at
org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180) at
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87) at
org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:275)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor!
.java:62) at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at
| etc etc
the method i am calling is:
@TransactionAttribute(TransactionAttributeType.REQUIRES_
| public String mymethod() {
| ...
| entitymanager.persist(mybean);
| }
where mybean is as follows:
anonymous wrote :
| public class Mybean implements Serializable {
|
| @Id
| @Column (unique=true, nullable=false, length=32)
| private String name;
|
| public MyBean() {...}
|
| ..........
|
any ideas why! it is driving me insane!
i have been working on it for a week now... no success!
thanks guys!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996878#3996878
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996878
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user