Errors deploying enterprise beans
What kind of error are you seeing?
- ConnectionFac E J2CA0102E: Invalid EJB component: Cannot use an EJB module with version 1.1 using The Relational Resource Adapter
- WSVR0040E: addEjbModule failed for MyApp-EJB.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl] java.lang.NoClassDefFoundError: com/ibm/ejs/ras/Tr
If neither of these errors matches the ones you are seeing...
- Browse the appserver log files for the server containing the application for clues.
- Look up any error or warning messages in the message table.
- If the appserver is part of a Network Deployment or a multiple-server configuration, verify that you followed the steps for adding the application server to the configuration.
- If the problems began after WAS security was enabled, view the topic Errors and access problems after enabling security, in the information center.
- Get help from IBM.
WSVR0040E: addEjbModule failed for MyApp-EJB.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl] java.lang.NoClassDefFoundError: com/ibm/ejs/ras/Tr
Possible causes of this error include...
- Security permissions are not given for the application in
$WAS_INSTALL/properties/server.policy fileCheck the server.policy file to see if the security permissions are given for the application.
Give permissions for the application in the server.policy file. For example
//purchaseOrder permission grant codeBase "file:${was.install.root}/installedApps/myApp.ear/-"{ permission java.security.AllPermission; };where myApp.ear is the application name.
- A was.policy file does not exist in the application/META-INF directory, while deploying the application to the server.
- Check for syntax errors in the was.policy file in theapplication\META-INF directory and make sure the application ear file name is given correctly.
- Create a was.policy file in the EAR of the application containing the problem enterprise bean, under the application\META-INF directory with the following contents
// WAS Security Policy for the application // you are running grant codeBase "file:myApp.ear" { permission java.security.AllPermission; }; .