(long tweet) JOnAS / GenIC / Method … of interface … should NOT throw RemoteException
Case
On generating Local
s and Remote
s 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.