• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to throw back Custom Exception from EJB (3.0 version) to Web layer

 
Greenhorn
Posts: 13
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI

I am throwing Custom Exceptions from EJB class as below

I am throwing


my class definitions for custom exceptions are as below.




in web layer I am getting it as an instance of javax.ejb.EJBException
I want to it as an instance of XmlParsingException

any suggestions please....
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

You need to extend any checked exception from custom exception class. Only then the application exception will be propageted to web layer. Since you are extending Runtime exception, all runtime exception will be wrapped by EJBException and propagated.

Thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic