Whenever any unchecked runtime exeption (For Ex Nullpointer) is thrown from beyond the EJB layer in our application, it is getting converted to Corba Unknown Exception (org.omg.CORBA.portable.UnknownException) and shown to the user on the error screen.
This is misleading as the actual error gets lost. This happens in WSAD as well as WAS server (Version 5.1) where the application is deployed.
Early investigation shows that there is some problem with the stubs and ties being generated by websphere.
Has anybody faced similar problem using Websphere 5.1 and is there a fix or workaround.
An application exception class must be a subclass (direct or indirect) of java.lang.Exception. An application exception class must not be defined as a subclass of the java.lang.RuntimeException, or of the java.rmi.RemoteException. These are reserved for system exceptions. (See next subsection).
The Bean Provider is also responsible for using the standard EJB application exceptions (javax.ejb.CreateException, javax.ejb.RemoveException, javax.ejb.FinderException, and subclasses thereof) as described in Subsections 10.5.8 and 12.1.8.
Joined: Jun 17, 2003
Thanks for your response. The exceptions I am talking about would come under the 18.2.2 System exceptions section of the specs.
What is happening is, if a NullPointer comes for some unknown reason, it is to be thrown as is .. it gets propagated across the tiers of the application till it reaches EJB stubs and skeleton, which are supposed to convert it to remote exception.
"The Container catches a non-application exception; logs it (which can result in alerting the SystemAdministrator); and, unless the bean is a message-driven bean, throws the java.rmi.RemoteException(or subclass thereof) to the client if the client is a remote client, or throws the javax.ejb.EJBException (or subclass thereof) to the client if the client is a local client. TheBean Provider can rely on the Container to perform the following tasks when catching a non-applicationexception: The transaction in which the bean method participated will be rolled back. No other method will be invoked on an instance that threw a non-application exception.
But sth goes wrong, and all we get is Corba Unknown Exception (org.omg.CORBA.portable.UnknownException)