Bugs item #458277, was opened at 2001-09-03 22:23
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=458277&group_id=22866
Category: None
Group: v2.4 (stable)
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Andreas Schaefer (schaefera)
Summary: EJBException not being propogated
Initial Comment:
In some instances an EJBException that is thrown from within a business method on a
session bean is not being displayed at the JBoss console. Furthermore the error that
the client calling the business method receives does not contain any reference to the
EJB Exception text as follows:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception
is:
java.rmi.ServerException: Transaction rolled back
java.rmi.ServerException: Transaction rolled back
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown
Source)
at
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:357)
at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
at $Proxy1.queryNewFeeCode(Unknown Source)
at FeeManagerUnitTest.testGenerateFeeCode(FeeManagerUnitTest.java:128)
at FeeManagerUnitTest.main(FeeManagerUnitTest.java:144)
The EJBException was thrown from the following code:
// Run this sequence to obtain a fresh fee code.
try {
connection = EjbToolkit.getConnection();
statement = connection.createStatement();
resultSet = statement.executeQuery(FEE_CODE_QUERY);
if (!resultSet.next())
newFeeCode = resultSet.getString(1);
else {
System.out.println("No result!");
<--------- HERE --------->
throw new EJBException("Failed to generate Fee Code from fee_code_seq
sequence.");
}
}
catch(SQLException se) {
throw new EJBException("Failed to query Fee data: ", se);
}
finally {
try {
if (resultSet != null) resultSet.close();
if (statement != null) statement.close();
if (connection != null) connection.close();
}
catch(Exception e) {}
}
The code executes through '<----- HERE ----->' then throws the EJBException. The
console output is
[Defaullt] No result!
With no mention of the EJBException...
Dave Elliot
----------------------------------------------------------------------
>Comment By: Andreas Schaefer (schaefera)
Date: 2001-11-02 15:53
Message:
Logged In: YES
user_id=70434
The EJB spec. 1.1 says that when a "System Exception" is
thrown the container rolls back the transaction or mark it
for a rollback. The "System Exception" is either a
RuntimeException or RemoteException or any of their
subclasses inclusive EJBException.
Therefore JBoss works correctly and this is not a bug.
----------------------------------------------------------------------
Comment By: Andreas Schaefer (schaefera)
Date: 2001-10-29 21:33
Message:
Logged In: YES
user_id=70434
Can you give the entire code of the EJB, please !
----------------------------------------------------------------------
Comment By: Andreas Schaefer (schaefera)
Date: 2001-10-29 21:32
Message:
Logged In: YES
user_id=70434
Can you give the entire code of the EJB, please !
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=458277&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development