1 Reply Latest reply on Apr 15, 2005 6:50 PM by Gary Johnson

    Verification of Enterprise Beans failed

    Gary Johnson Newbie

      Hello All,
      I have an MDB that deploys just fine and works when it has the form

      ------------------------------------------------------------------
      import com.mycom.Obj1;
      import com.mycom.Obj2;

      public class MyMDB implements MessageDrivenBean, MessageListener {

      public void onMessage (Message msg) {
      Obj1 obj1 = someObj1ValueObjectCreatedViaDBLookup
      -
      -
      Obj2 obj2 = new Obj2(obj1.getX(),obj1.getY(),obj1.getZ(),...);
      -
      -
      }
      }
      ------------------------------------------------------------------

      But, if the following change is made:

      ------------------------------------------------------------------
      import com.mycom.Obj1;
      import com.mycom.Obj2;

      public class MyMDB implements MessageDrivenBean, MessageListener {

      public void onMessage (Message msg) {
      Obj1 obj1 = someObj1ValueObjectCreatedViaDBLookup
      -
      -
      Obj2 obj2 = getObj2FromObj1(obj1);
      -
      -
      }

      private Obj2 getObj2FromObj1 (Obj1 obj1) {
      Obj2 obj2 = new Obj2(obj1.getX(),obj1.getY(),obj1.getZ(),...);
      return obj2;
      }
      }
      ------------------------------------------------------------------

      the MDB won't deploy with the following messages:

      ------------------------------------------------------------------
      2005-04-15 14:42:08,985 INFO - main - org.jboss.deployment.EARDeployer.init(115) - Init J2EE application: file:/C:/jboss-4.0.1/server/default/deploy/My.ear
      2005-04-15 14:42:11,079 WARN - main - org.jboss.ejb.EJBDeployer.create(544) - Verify failed; continuing
      java.lang.NoClassDefFoundError: com.mycom.Obj2
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
      at java.lang.Class.getDeclaredMethod(Class.java:1262)
      at org.jboss.verifier.strategy.AbstractVerifier.hasFinalizer(AbstractVerifier.java:591)
      at org.jboss.verifier.strategy.EJBVerifier20.verifyMessageDrivenBean(EJBVerifier20.java:2747)
      at org.jboss.verifier.strategy.EJBVerifier20.checkMessageBean(EJBVerifier20.java:148)
      at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:166)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:537)
      -
      -
      -
      at org.jboss.Main.boot(Main.java:162)
      at org.jboss.Main$1.run(Main.java:423)
      at java.lang.Thread.run(Thread.java:534)
      2005-04-15 14:42:11,360 ERROR - main - org.jboss.deployment.MainDeployer.create(931) - could not create deployment: file:/C:/jboss-4.0.1/server/default/tmp/deploy/tmp50071My.ear-contents/My-ejb.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
      -
      -
      -
      at org.jboss.Main$1.run(Main.java:423)
      at java.lang.Thread.run(Thread.java:534)
      2005-04-15 14:42:11,891 ERROR - main - org.jboss.deployment.scanner.URLDeploymentScanner.scan(507) - Incomplete Deployment listing:
      Incompletely deployed packages:
      org.jboss.deployment.DeploymentInfo@ab9392f { url=file:/C:/jboss-4.0.1/server/default/deploy/My.ear }
      deployer: org.jboss.deployment.EARDeployer@9aba32
      status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
      state: FAILED
      watch: file:/C:/jboss-4.0.1/server/default/deploy/My.ear
      altDD: null
      lastDeployed: 1113590530626
      lastModified: 1113590528985
      mbeans:
      ------------------------------------------------------------------

      I've tried putting the creation of Obj2 back in onMessage with the same results. Only when method getObj2FromObj1 is commented
      out does it deploy OK. This seems strange and wonder if it's a JBoss bug. Has anyone seen this or know what might be causing it?...TIA, Gary