Errors deploying enterprise beans

What kind of error are you seeing?

  1. ConnectionFac E J2CA0102E: Invalid EJB component: Cannot use an EJB module with version 1.1 using The Relational Resource Adapter

  2. 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...

  1. Browse the appserver log files for the server containing the application for clues.

  2. Look up any error or warning messages in the message table.

  3. 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.

  4. If the problems began after WAS security was enabled, view the topic Errors and access problems after enabling security, in the information center.

  5. 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...

  1. Security permissions are not given for the application in

    $WAS_INSTALL/properties/server.policy file

    Check 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.

  2. A was.policy file does not exist in the application/META-INF directory, while deploying the application to the server.

    1. 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.

    2. 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; 
      }; 
      .