您的位置:首页 > 其它

An EJB Exception:The user-provided class "XXXX" needed by the EnterpriseBean could not be found or loaded.

2012-02-14 15:41 771 查看
----------

Problem:
----------

After delpoy an EJB application to Websphere server 7, there was an exception: "The user-provided class "XXXX" needed by the EnterpriseBean could not be found or loaded."

----------
Cause:
----------
this problem occurs because the stub/skeleton files of the EJB are no more compatable with the other code.If you do not regenerate the RMIC code every time you change either classes that are called inside the EJB, you get this problem, in some extreme cases delete the stub and skeleton classes for the EJB and generate them again, this should totally remove exception you are getting.

----------
Solution:
----------
1) Deploy your EJB.Jar from your ear file separately in WAS. This will generate deployment code in your EJB.jar.
2) Take the deployed EJB.Jar and put it in your original .ear file, overwriting the original EJB.Jar.
3) Now start up the .ear file and it should work.

----------
Note:
----------
"Deploy" the EJB in RAD7:
1. Select the EJB Project in the J2EE perspective view;
2. Righ-click on the EJB project;
3. Select "Prepare for preparement" in the context menu;

----------
Reference:
----------
http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14064226
http://objectmix.com/websphere/640882-how-resolve-ejb-issue.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐