Weblogic wrap application exception in javax.ejb.EJBException

▼魔方 西西 提交于 2019-12-05 23:52:37

I was able to solve the issue by adding the application exception in the "throw" clause of ejb method signature.

Previously all ejb classes and application exception class was in the same jar file. But later the application exception class and ejb remote interfaces were put to another jar file called "api" jar file and the relevant ejb files were kept in the previous jar file.

It seems it is enough to declare an application exception with @ApplicationException, if we need it to treat as an application excpetion when all classes are in the same jar file. But if the application exception class is in a separate jar file, we need to add this application exception in the "throw" clause of the ejb method signature to interpret it as an application exception by the weblogic server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!