1 Reply Latest reply on Mar 29, 2013 3:36 AM by chandramoulee18

    ** UNRESOLVED Demands 'persistence.unit:unitName=#

    chandramoulee18

      Hi,

           I' m new in Jboss. I'm trying to create a JPA project using -

      1. Jboss 6.0

      2. Eclipse Helios

      3. Oracle 10g Database.

       

      I have created a Oracle local transaction Datasource and used that in my persistence.xml. Here is my persistence.xml -

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence version="2.0" xmlns="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 http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

          <persistence-unit name="roster" transaction-type="JTA">

          <provider>org.hibernate.ejb.HibernatePersistence</provider>

              <jta-data-source>java:/RDMS</jta-data-source>

              <class>com.roster.ejb.jpa.League</class>

              <class>com.roster.ejb.jpa.Player</class>

              <class>com.roster.ejb.jpa.Team</class>

              <class>com.roster.ejb.jpa.WinterLeague</class>

              <class>com.roster.ejb.jpa.SummerLeague</class>

              <properties>

                  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

                  <property name="hibernate.transaction.manager_lookup_class"

                      value="org.hibernate.transaction.JBossTransactionManagerLookup" />

                  <property name="hibernate.show_sql" value="true"/>

                    <property name="hibernate.format_sql" value="true"/>

              </properties>

         

          </persistence-unit>

      </persistence>

       

       

      The Data Source created successfully. But, when I am deploying my project [Roster.jar], it is fiving me below error -

       

      java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3" is missing the following dependencies:

          Dependency "<UNKNOWN jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#roster' **")

        Deployment "jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3_endpoint" is missing the following dependencies:

          Dependency "jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")

       

      DEPLOYMENTS IN ERROR:

        Deployment "persistence.unit:unitName=#roster" is in error due to the following reason(s): org.hibernate.PropertyNotFoundException: Could not find a setter for property teams in class com.roster.ejb.jpa.Player

        Deployment "<UNKNOWN jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#roster' **

       

              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)

              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:189)

              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)

              at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)

              at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:155)

              at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(AbstractManagedDeploymentComponent.java:173)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)

              at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

              at java.util.concurrent.FutureTask.run(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

              at java.lang.Thread.run(Unknown Source)

      Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3" is missing the following dependencies:

          Dependency "<UNKNOWN jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#roster' **")

        Deployment "jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3_endpoint" is missing the following dependencies:

          Dependency "jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")

       

      DEPLOYMENTS IN ERROR:

        Deployment "persistence.unit:unitName=#roster" is in error due to the following reason(s): org.hibernate.PropertyNotFoundException: Could not find a setter for property teams in class com.roster.ejb.jpa.Player

        Deployment "<UNKNOWN jboss.j2ee:jar=Roster.jar,name=RequestBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#roster' **

       

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1002)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:948)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:870)

              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)

              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:295)

              at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:207)

              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)

              at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)

              at org.jboss.remoting.Client.invoke(Client.java:1917)

              at org.jboss.remoting.Client.invoke(Client.java:768)

              at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304)

              ... 15 more

       

       

      The persistence.xml file in in the META-INF directory in my project. SO, it does not looks to be a file missing issue. And the syntax of the persistence.xml looks to be correct to me. Still not getting any clue for this issue. Can Anyonce PLEASE HELP?

        • 1. Re: ** UNRESOLVED Demands 'persistence.unit:unitName=#
          chandramoulee18

          The RCA of above error is as follows -

          1. Setter and Getter Method in Player class was not properly refactored.

          2. However, after removing aabove error, Another error was encountered - "NameAlreadyBoundException", this is due to following reason -

            a. in the same Jboss AS there is another deployment unit[Order.jar] which is containing 1 remote Stateful EJB3 Interface called "Request" and 1 remote Stateful EJB3 class "RequestBean".

            b. My new deployment unit[Roster.jar] also containing same remote Stateful EJB3 units[Request.java and RequestBean.java]

           

          I resolved this by refactring the remote Stateful EJB3 units by RosterRequest.java and RosterRequestBean.java.

           

          But, can anybody tell me why JBOSS AS can not differentiate 2 separate classes in 2 different deployment unit?