David,
Summary: if commit fails at the end of a session bean method with Txn 
Required, the client caller of this method never receives notification.
In 3.0.5 and earlier, the client returned but did not receive notification 
of the problem.
In 3.2.0RC2, the session bean call never returns to the client! The server 
however is still active and ready for business.

As soon as I get this exception and stack trace, my junit client stops 
processing tests. If I kill the server, the tests continue with the 
expected failures because of no server.
This indicates the server is not returning control to the client!

2003-02-18 13:07:55,079 WARN  [org.jboss.tm.TransactionImpl] XAException: 
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=XCOM-IRL-JONATHAN//44, 
BranchQual=] errorCode=XA_UNKNOWN(0)
org.jboss.resource.connectionmanager.JBossLocalXAException: could not 
commit local tx; - nested throwable: 
(org.jboss.resource.JBossResourceException: SQLException; - nested 
throwable: (java.sql.SQLException: ORA-02091: transaction rolled back
ORA-02290: check constraint (JOCONNOR.SYS_C0025330) violated
))
        at 
org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:787)
        at 
org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1580)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:366)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:367)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:253)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
        at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
        at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
        at org.jboss.ejb.Container.invoke(Container.java:652)
        at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:338)
        at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:536)
Caused by: org.jboss.resource.JBossResourceException: SQLException; - 
nested throwable: (java.sql.SQLException: ORA-02091: transaction rolled 
back
ORA-02290: check constraint (JOCONNOR.SYS_C0025330) violated
)
        at 
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:449)
        at 
org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:95)
        at 
org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:778)
        ... 26 more
Caused by: java.sql.SQLException: ORA-02091: transaction rolled back
ORA-02290: check constraint (JOCONNOR.SYS_C0025330) violated

        at 
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
        at oracle.jdbc.oci8.OCIDBAccess.commit(OCIDBAccess.java:665)
        at 
oracle.jdbc.driver.OracleConnection.commit(OracleConnection.java:1341)
        at 
org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:91)
        ... 27 more
Ciao,
Jonathan O'Connor
Development Manager
XCOM Dublin
Phone: +353 1 872 3305
Mobile: +353 86 824 0736




Jonathan.O'[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
12.02.2003 11:04
Please respond to jboss-user

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Re: [JBoss-user] Session Bean (Txn Required) commit error not 
being sent 
back to the client


David,
I spent most of yesterday trying to download Branch_3_0, and I'm still not 

finished. However, this recent spate of emails suggests that its all under 

control. As soon as 3.0.7 is out, or a new version of 3.2, I'll test our 
code and let you know if its been fixed.

Sorry I couldn't help more, but firewalls and slowwwwww internet 
connections don't help much!
Ciao,
Jonathan O'Connor
Development Manager
XCOM Dublin
Phone: +353 1 872 3305
Mobile: +353 86 824 0736




David Jencks <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
12.02.2003 02:11
Please respond to jboss-user

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Re: [JBoss-user] Session Bean (Txn Required) 
commit error not being sent 
back to the client


Dain and I have been working to fix this farther.  He fixed the "missing
cause" you found.
I've made all these exceptions use Jason's NestedThrowable stuff so they
should print well.

Also, there is an XAExceptionFormatter thing you can do to supply special
formatting to xa exceptions: this works best with an xa driver: in 3.2
there's one for Oracle.

In 3.0 there (will be shortly) one for the "XAExceptions" generated by
jboss for the wrapped local jdbc drivers.

This should be committed very soon.

david jencks

On 2003.02.11 20:09 Gerald Turner wrote:
> Gerald Turner <[EMAIL PROTECTED]> writes:
> 
> > I'll build the latest Branch_3_0 and give that a try.
> 
> Good news!
> 
> David's changes to 3.0.7RC1 have fixed this problem!
> 
> I noticed one minor problem: neither XAException, nor SQLException are
> nested in the TransactionRolledbackException.  The exception I get is:
> 
>   java.rmi.ServerException (if remote)
>    -> org.jboss.tm.JBossTransactionRolledbackException
>        -> org.jboss.tm.JBossRollbackException
>            -> null
> 
> I looked at the code for TxCapsule and it would appear that the
> JBossRollbackException is initialialized with the XAException thrown in
> commitResources but the 'cause' field is nulled by instanceDone first!
> 
> Even if that gets fixed I think it'd be really nice if the origin of the
> XAException, in this case the commit method in LocalTxConnectionManager,
> would include information about it's linkedException in the message.  I
> inserted the following code in order to get ludicrous amounts of
> SQLException information:
> 
>             StringBuffer message =
>                 new StringBuffer("Could not commit local tx: "
>                                  + re.getMessage());
>             boolean paren = false;
>             if (re.getErrorCode() != null) {
>                 if (!paren) {
>                     message.append(" (");
>                     paren = true;
>                 }
>                 message.append("ErrorCode: ");
>                 message.append(re.getErrorCode());
>             }
>             if (re.getLinkedException() != null) {
>                 if (!paren) {
>                     message.append(" (");
>                     paren = true;
>                 }
>                 Exception linked = re.getLinkedException();
>                 message.append("LinkedException: ");
>                 message.append(linked);
>                 if (linked instanceof SQLException) {
>                     SQLException sql = (SQLException) linked;
>                     while (sql != null) {
>                         message.append("; SQLException");
>                         boolean comma = false;
>                         if (sql != linked) {
>                             if (comma)
>                                 message.append(',');
>                             message.append(" Message=");
>                             message.append(sql.getMessage());
>                             comma = true;
>                         }
> 
>                         if (comma)
>                             message.append(',');
>                         message.append(" ErrorCode=");
>                         message.append(sql.getErrorCode());
>                         comma = true;
> 
>                         if (comma)
>                             message.append(',');
>                         message.append(" SQLState=");
>                         message.append(sql.getSQLState());
>                         comma = true;
> 
>                         sql = sql.getNextException();
>                     }
>                 }
>             }
>             if (paren)
>                 message.append(')');
> 
>             XAException e = new XAException(message.toString());
>             if (re.getCause() == null && re.getLinkedException() !=
>             null)
>                 e.initCause(re.getLinkedException());
>             else
>                 e.initCause(re);
> 
> 
> An example message looks like this:
> 
>   Could not commit local tx: SQLException (LinkedException:
> java.sql.SQLException: ORA-02091: transaction rolled back\nORA-02290:
> check constraint (OMS.SYS_C004928) violated\n; SQLException
> ErrorCode=2091, SQLState=42000)
> 
> Which is cool because somebody can figure out what SYS_C004928 is made
> out of.
> 
> -- 
> Gerald Turner    Email: [EMAIL PROTECTED]    Phone: (503) 788-1720
> GPG: 0xFA8CD6D5  21D9 B2E8 7FE7 F19E 5F7D  4D0C 3FA0 810F FA8C D6D5
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to