Search
Calendar
August 2017
S M T W T F S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031  
Your widget title
Archives

Posts Tagged ‘xdoclet’

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.