Details
-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
Description
It looks like org.jboss.tutorial.stateful.client.Client is catching the wrong exception:
[java] Should throw an object not found exception by invoking on cart after @Remove method
[java] Exception in thread "main" javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 5c4o130-g6x2qx-eaa2p3au-1-eaa2sp2k-5
Instead it's catching java.rmi.NoSuchObjectException:
import java.rmi.NoSuchObjectException;
....
if (e.getCausedByException() instanceof NoSuchObjectException)
System.out.println("Successfully caught no such object exception.");
else
throw e;
So I guess the import just needs to be changed from java.rmi. to javax.ejb?