4 Replies Latest reply on Jan 25, 2015 12:25 PM by rafachies

    Error caused by 'Circular dependency installing ...' when upgrade from JBoss 5.1 to JBoss EAP 6.1

    yi1zhao

      Hi everyone,

       

      I'm a JBoss newbie and have run into an issue I can't figure out.

       

      I'm deploying a EAR (a.ear) with a WAR inside (b.war).  The error I get during deployment is the following and is related to b.war:

       

      00:29:09,981 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-15) MSC000001: Failed to start service jboss.deployment.subunit."a.ear"."b.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."a.ear"."b.war".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "b.war" of deployment "a.ear"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_16]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_16]

        at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_16]

      Caused by: java.lang.IllegalArgumentException: JBAS011043: Circular dependency installing java:module/env/myappDatasource

        at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:241)

        at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:120)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        ... 5 more

       

      This looks to be the same type of error as mentioned in this thread: Circular dependency error while deploying ear

       

      The solution mentioned in that thread is to change the JNDI namespace in the jboss-web.xml.  In my app, there is no jboss-web.xml.  I have attached the contents of b.war's WEB-INF dir.  I'm pretty sure, the error has to do w/ the JNDI but I just don't know what.  Can someone see if I'm missing something.  Any help would be appreciated!

        • 1. Re: Error caused by 'Circular dependency installing ...' when upgrade from JBoss 5.1 to JBoss EAP 6.1
          ctomc

          any chance you can try with newer version of EAP? Currently last version is EAP 6.4 alpha or 6.3.0.GA

          • 2. Re: Error caused by 'Circular dependency installing ...' when upgrade from JBoss 5.1 to JBoss EAP 6.1
            rafachies

            Why do you need to define the datasource in your web.xml?
            If you are using it through lookup in your Java code, yu don't need to declare ir in your web.xml, is a matter of having the datasource created in EAP. Trye to remove it.

            Have you created the datasource in your EAP? What is the jndi name you gave?!

            • 3. Re: Error caused by 'Circular dependency installing ...' when upgrade from JBoss 5.1 to JBoss EAP 6.1
              yi1zhao

              Rafael, removing the datasource from web.xml worked!  Thanks.

               

              To answer your question, I created two datasources in standalone.xml:

                              <datasource jndi-name="java:/aDatasource" pool-name="aDatasource" enabled="true" use-java-context="true">

                                  <connection-url>jdbc:oracle:thin:@myapp_db:1521:xyz</connection-url>

                                  <driver>OracleJDBCDriver</driver>

                                  <security>

                                      <user-name>userA</user-name>

                                      <password>***</password>

                                  </security>

                              </datasource>

                              <datasource jndi-name="java:/bDatasource" pool-name="bDatasource" enabled="true" use-java-context="true">

                                  <connection-url>jdbc:oracle:thin:@myapp_db:1521:xyz</connection-url>

                                  <driver>OracleJDBCDriver</driver>

                                  <security>

                                      <user-name>userB</user-name>

                                      <password>***</password>

                                  </security>

                              </datasource>

                              <drivers>

                                  <driver name="OracleJDBCDriver" module="oracle.jdbc"/>

                              </drivers>

               

              So now, I will need to look through all the Java code and config files to replace the old JNDI path with the new ones?

              • 4. Re: Error caused by 'Circular dependency installing ...' when upgrade from JBoss 5.1 to JBoss EAP 6.1
                rafachies

                Yes, but if the code was well designed, it should be just one or two generic classes responsible for the look up

                1 of 1 people found this helpful