• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

UnknownException

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Many Thanks
Anupreet
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB 2.0 specification says that RuntimeExceptions should no be thrown across the EJB layer:

Found this in the ejb 2.0 specification (Chapter 18, downloaded from http://java.sun.com/products/ejb/docs.html 2.0 Final Release Specification):

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.
 
Anupreet Arora
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dileep..

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)
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic