1 2 3 Previous Next 33 Replies Latest reply on Jul 14, 2011 8:04 AM by bcn Go to original post
      • 15. Re: AS7 CR1
        prasad.deshpande

        Hi Scott, Jaikiran,

         

        I tried to deploy just one entity in ear & it failed giving following error.

         

        10:48:11,125 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.efp.efprocess.ActionPersister.\"env/com.banctec.caseware.server.actionpersister.ActionPersisterFacade/em\".jboss.deployment.subunit.\"efp.ear\".\"efprocess.jar\".component.ActionPersister.8","jboss.persistenceunit.\"efp.ear#efp\"","jboss.deployment.subunit.\"efp.ear\".\"efprocess.jar\".jndiDependencyService","jboss.deployment.subunit.\"efp.ear\".\"efprocess.jar\".component.ActionPersister.START"]}}}

         

        I've attached source-code of the bean & in efp.zip, you have directory based deployment of efp.ear. In lib directory you'll find, efpentities.jar which contains persistence.xml. additionally you'll need to create datasource required.

         

        Could you please have a look at it & whether you get same error?

         

        @Scott, I tried enabling TRACE, wasn't of much help...

         

        Thanks,

        Prasad

        • 16. Re: AS7 CR1
          prasad.deshpande

          Something seems to be not correct with persistence unit. Now, I have just EntityBean & a PU definition in a ejb.jar in ear & I get

           

          11:50:34,125 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"efp.ear/efprocess.jar#efp\""]}}}

          • 17. Re: AS7 CR1
            smarlow

            I am seeing the following error in server.log, will have to debug to see why "java" is getting doubled...

             

               New missing/unsatisfied dependencies:

                  service jboss.naming.context.java.java:jdbc/eFpDataSource (missing)

            • 18. Re: AS7 CR1
              smarlow

              looks like the double "java" isn't the issue.

               

              Instead, lets try changing the datasource name to something like "java:jboss/datasources/eFpDataSource"

              • 19. Re: AS7 CR1
                jaikiran

                There's a bug in the PersistenceUnitDeploymentProcessor. It isn't handling the jta-data-source value properly while translating it into a ServiceName. As a workaround, I changed the jta-data-source value in persistence.xml to remove the java: prefix:

                 

                <jta-data-source>jdbc/eFpDataSource</jta-data-source>

                 

                It still doesn't deploy due to (different) missing dependencies. I am not sure what it's missing yet.

                 

                P.S: Something appears to have changed just before CR1 with respect to error reporting. The errors weren't this complex earlier.

                • 20. Re: AS7 CR1
                  smarlow

                  Changing the datasource to "java:jboss/datasources/eFpDataSource" worked for me.

                  • 21. Re: AS7 CR1
                    smarlow

                    I added a jira (https://issues.jboss.org/browse/AS7-1171) for this problem.

                    • 22. Re: AS7 CR1
                      prasad.deshpande

                      Scott, I want to try with your workaround here, just to clarify, in DS definition I have :

                       

                      <xa-datasource jndi-name="java:jdbc/eFpDataSource" pool-name="eFpXADS" enabled="true" use-java-context="true" use-ccm="true">

                      & in persistence.xml

                      <jta-data-source>java:jdbc/eFpDataSource</jta-data-source>

                      What changes should I make to make it work?

                      • 23. Re: AS7 CR1
                        smarlow

                        Change from the above to:

                         

                        updated DS definition:

                        <xa-datasource jndi-name="java:jboss/datasources/eFpDataSource" pool-name="eFpXADS" enabled="true" use-java-context="true" use-ccm="true">

                         

                        updated persistence.xml:

                        <jta-data-source>java:jboss/datasources/eFpDataSource</jta-data-source>

                        1 of 1 people found this helpful
                        • 24. Re: AS7 CR1
                          prasad.deshpande

                          Thanks a lot Scott & Jaikiran!! Scott's solution worked for me too.

                           

                          I hope, I'll get issue fixed soon & would try again in may be nightly builds..

                          • 25. Re: AS7 CR1
                            bcn

                            Hi,

                             

                            I am trying to migrate from AS 6 to AS 7.0.0 Final and get a similar problem, although I changed the datasource like above suggested by Scott.

                             

                            09:51:15,845 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "myapp.war" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"myapp.war\".component.SearchHome.START missing [

                            jboss.naming.context.java.module.myapp.myapp.\"env/com.myapp.persistence.generated.SearchHome/entityManager\" ]"

                             

                            The class looks like

                             

                            @Stateless

                            public class SearchHome {

                             

                                 @PersistenceContext

                                protected EntityManager entityManager;

                             

                            In AS 6 it deployed without problems.

                             

                            Any help would be greatly appreciated

                            • 26. Re: AS7 CR1
                              jaikiran

                              Have you configured the datasource in standalone.xml? What does it look like? Also what are the contents of your persistence.xml file?

                              • 27. Re: AS7 CR1
                                bcn

                                yes, datasource is in standalone.xml:

                                 

                                <datasource jndi-name="java:jboss/datasources/MyAppDS" pool-name="MyAppDS_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true">

                                 

                                persistence.xml (relevant parts):

                                <persistence-unit name="myapp">

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

                                <jta-data-source>java:jboss/datasources/MyAppDS</jta-data-source>

                                 

                                Thanks for the quick reply!

                                • 28. Re: AS7 CR1
                                  jaikiran

                                  Does using:

                                   

                                  @PersistenceContext(unitName="myapp")

                                   

                                  make a difference? If not, can you please attach the application which reproduces this issue?

                                  • 29. Re: AS7 CR1
                                    bcn

                                    No, it doesn't make a difference. I thought it could be the location of the persistence.xml file (WEB-INF/classes/META-INF and not META-INF), but doesn't help neither.

                                    Attached a slim version of the war archive to reproduce the problem. I will delete it after a while.

                                     

                                    Thanks