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
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
相关文章推荐
- DevExpress Exception Solution - The target "X" for the callback could not be found or did not implement ICallbackEventHandler
- 关于The MBean class could not be loaded by the default loader repository的解决方法
- java.io.FileNotFoundException: class path resource [bean/test/User.hbm.xml] cannot be opened because it does not exist
- .net4 wpf App 使用log4net 错误:The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)
- The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly refere
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- The type or namespace name '***' could not be found (are you missing a using directive or an asse
- The file or Assembly "BMC.arnettoc.dll" or a dependency could not be found.
- 如何解决The type or namespace name 'ScriptService' could not be found (are you missing a using directive or an assembly reference?)
- System.Security.SecurityException The source was not found, but some or all event logs could not be searched.Inaccessible logs Security.
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- http:101249 .jsp could not be loaded because the requested class was not found the classpath
- 解决:ould not find a getter for porDate in class com.bc.bean.PortalSheet Caused by: org.hibernate.PropertyNotFoundException: Could
- The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an asse
- "The target '__Page' for the callback could not be found or did not implement ICallbackEventHandler."的解决办法
- java.io.FileNotFoundException: class path resource [bean.xml] cannot be opened because it does not e
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.”
- Driver class ‘org.gjt.mm.mysql.Driver‘ could not be found, make sure the ‘MySQL‘ driver (jar file) i
- Cannot complete the install because one or more required items could not be found.
- An endpoint configuration section for contract "serviceReferenc.service" could not be loaded