Search
Calendar
March 2024
S M T W T F S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Your widget title
Archives

PostHeaderIcon (long tweet) JOnAS / GenIC / Method … of interface … should NOT throw RemoteException

Case

On generating Locals and Remotes of EJBs (let’s say JonathanBean) to be deployed on JOnAS, the GenIC raises:

GenIC.fatalError : GenIC fatal error: Cannot read the Deployment Descriptors from /foo/goo/jonathan-server.jar: Method foo of interface lalou.jonathan.JonathanLocal should NOT throw RemoteException

Within the EJB2, the method foo is declared to be Local and to throw RemoteException

Quickfix

The error is explicit.

A Local EJB cannot throw RemoteException.
Especially, the considered method can be declared with the right XDocLet tag, ie:

* @ejb.interface-method view-type="remote"

but can with neither:

* @ejb.interface-method view-type="both"

nor:

* @ejb.interface-method view-type="local"

As a quickfix, I suggest to surround with a try/catch block a throw a RuntimeException if needed.

Leave a Reply