1 Reply Latest reply on May 14, 2009 11:14 AM by peterj

    Unable to deploy an Entity Bean

      When i am deploying apllication in jboss-4.2.2.GA i am getting the exception.

      Problem creating service jboss.j2ee:service=EJB3,module=BookEx.jar
      java.lang.NoClassDefFoundError: org/hibernate/cfg/EJB3DTDEntityResolver
      at org.jboss.ejb3.Ejb3Deployment.initializePersistenceUnits(Ejb3Deployment.java:535)
      at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:329)
      at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:77)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.create(Unknown Source)

      - MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:service=EJB3,module=BookEx.jar
      State: FAILED
      Reason: java.lang.NoClassDefFoundError: org/hibernate/cfg/EJB3DTDEntityResolver

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.j2ee:service=EJB3,module=BookEx.jar
      State: FAILED
      Reason: java.lang.NoClassDefFoundError: org/hibernate/cfg/EJB3DTDEntityResolver




      persistence.xml is

      <persistence-unit name="BookEntity" transaction-type="JTA">
      <jta-data-source>java:/EntityMySqlDS</jta-data-source>




      </persistence-unit>


      even i include these jars in the manifest file
      1.jbossall-client.jar
      2.ejb3-persistence.jar
      3.jboss-ejb3x.jar

      Any help ?








        • 1. Re: Unable to deploy an Entity Bean
          peterj

           

          even i include these jars in the manifest file


          Which manifest file? You should not package any of these files with the deployed app.

          Also, when posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.