Hi!
I have a really bad problem now. I hope it's me and not jBoss/JAWS who's
in error. The situation:
I have a CMP bean with is stored to a mysql database. References to
other (deployed) CMP beans are stored with SQL type BLOB and JDBC type
JAVA_OBJECT. What I do is
1) finding an existing "user" bean A and
2) creating a new "request" bean B,setting a message (which works) and
setting the "from" property to reference to A. At this last step I get
the following error on the server:
[com.polypol.user.UserRequest] [org.jboss.util.FastKey@de2c583e]
setMessage(DasIstDieNachricht)
[com.polypol.user.UserRequest] TX_REQUIRED for setMessage
[com.polypol.user.UserRequest] begin tx
[com.polypol.user.UserRequest] Tx is tx:Xid:27
[com.polypol.user.UserRequest] commit tx 27
[com.polypol.user.UserRequest] TxCapsule: just before
doBeforeCompletion()
[com.polypol.user.UserRequest] TxCapsule status: ACTIVE
[com.polypol.user.UserRequest] TxCapsule: before i=0
[com.polypol.user.UserRequest] TxCapsule status: ACTIVE
[com.polypol.user.UserRequest] beforeCompletion called
[JAWS] Store command executing: UPDATE UserRequest SET Message=? WHERE
ObjID=?
[JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=DasIstDieNachricht
[JAWS] Set parameter: idx=2, jdbcType=VARCHAR, value=970087628196
[JAWS] Rows affected = 1
[com.polypol.user.UserRequest] TxCapsule: after i=0
[com.polypol.user.UserRequest] TxCapsule status: ACTIVE
[com.polypol.user.UserRequest] TxCapsule: just before if()
[com.polypol.user.UserRequest] TxCapsule status: ACTIVE
[com.polypol.user.UserRequest] afterCompletion called
[com.polypol.user.UserRequest] [org.jboss.util.FastKey@de2c583e]
setToUser(user/User:tobi)[com.polypol.user.UserRequest] TX_REQUIRED for
setToUser
[com.polypol.user.UserRequest] begin tx
[com.polypol.user.UserRequest] Tx is tx:Xid:28
[com.polypol.user.UserRequest] commit tx 28
[com.polypol.user.UserRequest] TxCapsule: just before
doBeforeCompletion()
[com.polypol.user.UserRequest] TxCapsule status: ACTIVE
[com.polypol.user.UserRequest] TxCapsule: before i=0
[com.polypol.user.UserRequest] TxCapsule status: ACTIVE
[com.polypol.user.UserRequest] beforeCompletion called
[com.polypol.user.UserRequest] Status set to MARKED_ROLLBACK in
setRollbackOnly()
[com.polypol.user.UserRequest] TxCapsule: after i=0
[com.polypol.user.UserRequest] TxCapsule status: MARKED_ROLLBACK
[com.polypol.user.UserRequest] TxCapsule: just before if()
[com.polypol.user.UserRequest] TxCapsule status: MARKED_ROLLBACK
[com.polypol.user.UserRequest] afterCompletion called
[com.polypol.user.UserRequest] Unable to commit.
[Default] javax.transaction.RollbackException: Unable to commit.
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:260)
at org.jboss.tm.TxManager.commit(TxManager.java:212)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:84)
at
org.jboss.ejb.plugins.TxInterceptor.runWithTransactions(TxInterceptor.java:249)
at org.jboss.ejb.plugins.TxInterceptor.invoke(TxInterceptor.java:96)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:140)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:156)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:320)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:202)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
at sun.rmi.transport.Transport$1.run(Transport.java:142)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
at java.lang.Thread.run(Thread.java:484)
As you may noticed I have turned the debug variable in JAWS to true. I
also injected some debugging code into org/jboss/tm/TxCapsule.java.
The first part shows a successful update of an property of the bean.
The error occurs in the second part in TxCapsule:
The state of the transaction changes from ACTIVE to MARKED_ROLLBACK
within the commit() method.
Within this method doBeforeCompletion() is called, which changes the
state. To be more exact within the doBeforeCompletion() method there is
the call ((Synchronization)sync.get(i)).beforeCompletion() . Somehow
within this call the method
setRollbackOnly() is called from the "outside" which of course sets the
state to MARKED_ROLLBACK.
Where to go from here ? Am I making a mistake ?
<help>
The subject of this email says "urgent" as the bean should be working
today. I don't really expect to solve this problem today, but the
soonner you answer the better for my health ;-). Please help.
</help>
Tobias
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]