1 Reply Latest reply on Jul 29, 2009 5:26 PM by Peter Johnson

    Entity Beans EJB3 not able to deploy

    sandeep gatla Newbie

      Hi,

      I have the following configuration IDE: JBoss Developer Studio Version: 2.0.0.GA and jboss server
      Jboss EAP 4.3 CP 04. and my sql version 5.0

      I am trying to do a sample EJB3 application. I could deploy a session bean correctly but when it comes to entity beans I am not able to get it right. I get the following error log each time i try to deploy a ejb.jar file on the server.


      16:07:04,391 DEBUG [DTDEntityResolver] trying to resolve system-id [file:///C:/home2/jboss-as/bin/persistence_1_0.xsd]
      16:07:04,391 DEBUG [EJB3DTDEntityResolver] recognized EJB3 ORM namespace; attempting to resolve on classpath under org/hibernate/ejb
      16:07:04,391 DEBUG [EJB3DTDEntityResolver] located [file:///C:/home2/jboss-as/bin/persistence_1_0.xsd] in classpath
      16:07:04,406 WARN [PersistenceUnitHandler] Could not find PU dependency for persistence.units:unitName=shoestringPU. Waiting for dependency to resolve
      16:07:04,406 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
      16:07:04,406 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=TestInstallation-ejb3.jar,name=TestStatelessBean,service=EJB3 with dependencies:
      16:07:04,406 INFO [JmxKernelAbstraction] persistence.units:unitName=shoestringPU
      16:07:04,406 INFO [EJB3Deployer] Deployed: file:/C:/home2/jboss-as/server/ais/deploy/TestInstallation-ejb3.jar
      16:07:04,422 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: persistence.units:unitName=shoestringPU
      State: NOTYETINSTALLED
      I Depend On:
      jboss.jca:name=jdbc/ShoestringDS,service=DataSourceBinding

      ObjectName: jboss.j2ee:jar=TestInstallation-ejb3.jar,name=TestStatelessBean,service=EJB3
      State: NOTYETINSTALLED
      I Depend On:
      persistence.units:unitName=shoestringPU

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.jca:name=jdbc/ShoestringDS,service=DataSourceBinding
      State: NOTYETINSTALLED
      Depends On Me:
      persistence.units:unitName=shoestringPU

      ObjectName: persistence.units:unitName=shoestringPU
      State: NOTYETINSTALLED
      Depends On Me:
      jboss.j2ee:jar=TestInstallation-ejb3.jar,name=TestStatelessBean,service=EJB3


      I have put persistence.xml in META-INF folder and following is the code in it.


      <?xml version="1.0" encoding="UTF-8"?>
      <persistence:persistence version="1.0" xmlns:persistence="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd ">
      <persistence:persistence-unit name="shoestringPU" transaction-type="JTA">
      <persistence:description>none</persistence:description>
      <persistence:jta-data-source>java:/jdbc/ShoestringDS</persistence:jta-data-source>
      <persistence:properties>
      <persistence:property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
      </persistence:properties>
      </persistence:persistence-unit>
      </persistence:persistence>

      What should be done.