2 Replies Latest reply on Aug 4, 2005 12:16 PM by mroosendaal

    EJB spec violation when deploying MDB

      Hi,

      I've created a simple MDB which i'm trying to deploy but i get the following error:
      15:52:27,460 WARN [verifier] EJB spec violation:
      Bean : TestMDB
      Section: 22.2
      Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business
      methods in the <ejb-class> element.
      Info : Class not found on 'nl.ictu.jms.TestMDB': No ClassLoaders found for: nl.ictu.jms.TestMDB

      15:52:27,475 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.0.2/server/spg_node1/deploy/mdb.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.deployment.MainDeployer.deploy(MainDeployer.java:774)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
      at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)....

      Here's my ejb-jar.xml:
      <ejb-jar>
      <enterprise-beans>
      <message-driven>
      <ejb-name>TestMDB</ejb-name>
      <ejb-class>nl.ictu.jms.TestMDB</ejb-class>
      <transaction-type>Container</transaction-type>
      <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>
      </message-driven>
      </enterprise-beans>
      </ejb-jar>

      and my jboss-ejb.xml

      <enterprise-beans>
      <message-driven>
      <ejb-name>TestMDB</ejb-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      <destination-jndi-name>queue/MaartenTestQueue</destination-jndi-name>
      <resource-ref>
      <res-ref-name>jms/QCF</res-ref-name>
      <jndi-name>ConnectionFactory</jndi-name>
      </resource-ref>
      </message-driven>
      </enterprise-beans>


      Nothing spectaculair but i have no idea where this comes from. The jar is simple with a META-INF directory and the class in the package.

      Any ideas

        • 1. Re: EJB spec violation when deploying MDB
          jaikiran

          Execute the following command and post the output:
          jar -tf jarfilename.jar

          where jarfilename.jar is the jar containing oyur beans

          • 2. Re: EJB spec violation when deploying MDB

            It's working now, some typo which i overlooked but i still have problems:
            javax.management.InstanceNotFoundException: jboss.j2ee:jndiName=local/TestMDB@11013223,service=EJB is not registered.

            And also it does not seem to see the Queue i defined in the jboss-jar.xml which is present in JBoss.

            Can i specify the JNDI name of an EJB or should JBoss take the ejb-name element?

            Thanks,
            Maarten