ejb 3.0 - getting remote exception while calling an ejb3 method -


method(){ try{ code.. } catch(exception e) { throw new userdefineexception(); } } 

// while calling above method java client gettine remote exception expecting userdefineexception.

ejb container wrap undeclared (system) exceptions in remoteexception (or ejbexception local views). avoid this, should either:

  1. change userdefineexception extend exception rather runtimeexception, , add userdefineexception throws clause of remote interface.

  2. annotation userdefineexception @applicationexception, or specify <application-exception>com.example.userdefineexception</application-exception> in ejb-jar.xml.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -