9 Replies Latest reply on Jun 4, 2013 8:32 AM by Michael McGovern

    Too many dependencies

    Michael McGovern Newbie

      Hi,

       

      I'm trying an app that deploys on AS 7.1.1, EAP 6.1 etc but on WidlFly I get the following (W7 64 bit):

       

      Caused by: java.lang.IllegalArgumentException: Too many dependencies specified (max is 16383)

                at org.jboss.msc.service.ServiceBuilderImpl.doAddDependency(ServiceBuilderImpl.java:216) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

                at org.jboss.msc.service.ServiceBuilderImpl.addDependenciesNoCheck(ServiceBuilderImpl.java:158) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

                at org.jboss.msc.service.ServiceBuilderImpl.addDependencies(ServiceBuilderImpl.java:152) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

                at org.jboss.msc.service.ServiceBuilderImpl.addDependencies(ServiceBuilderImpl.java:142) [jboss-msc-1.1.2.Final.jar:1.1.2.Final]

                at org.jboss.as.naming.deployment.JndiNamingDependencyProcessor.deploy(JndiNamingDependencyProcessor.java:59)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Alpha1.jar:8.0.0.Alpha1]

       

       

      It's a large app with ~ 1000 SLSB and numerous JPA entities.

       

      Perhaps there is a setting I can change?

       

      Thanks

       

      Michael

        • 1. Re: Too many dependencies
          jaikiran pai Master

          More than 16K dependencies for a  component? What kind of a bean/application is tha which adds that many dependencies and are you sure you need those dependencies?

          • 2. Re: Too many dependencies
            Michael McGovern Newbie

            No single coponent SLSB has any where near that number of dependencies.

            • 3. Re: Too many dependencies
              jaikiran pai Master

              Actually, I was wrong. What the code is doing is it's adding a dependency on each of the applicable component JNDI binding services, to the deployment unit. Hmmm 16K is a huge set of dependencies but since you say you have 1000 SLSBs it looks like there isn't much that can be done to prevent that huge dependency set. How do you manage those 1000 SLSBs in code? Are those auto generated? Why are there so many of those? I'm just curious.

              • 4. Re: Too many dependencies
                jaikiran pai Master

                Michael McGovern wrote:

                 

                 

                 

                Caused by: java.lang.IllegalArgumentException: Too many dependencies specified (max is 16383)

                 

                ...

                Perhaps there is a setting I can change?

                 

                There isn't any, at this point.

                • 5. Re: Too many dependencies
                  Michael McGovern Newbie

                  They are individual transaction handling SLSB for each transaction in a banking system (but with inheritance for common code etc)

                   

                  Input tran code looked up in table to get JNDI name of processor, jndi lookup done and then template methods executed.

                   

                  All works fine in AS7/EAP6.

                   

                  It was very slow in 5 (it never actually completed deployment), 4.2 was fine but a bit slow, AS7 takes 25 seconds to deploy/startup.

                  • 6. Re: Too many dependencies
                    Stuart Douglas Master

                    Can you file a JIRA about this and assign it to me? I have an idea about how we may be able to fix this.

                    • 7. Re: Too many dependencies
                      Michael McGovern Newbie

                      OK A2 snapshot fixes the "Too many dependencies" issue

                       

                      but I still have an issue around procesing the large number of SLSB (a bit like AS5 used to behave - and I never got that to work)

                       

                      I now get:

                       

                      20:03:15,809 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) JBAS018210: Register web context: /wssimple

                      20:04:09,306 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.subunit."Capital.ear"."beans.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Capital.ear"."beans.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "beans.jar" of deployment "Capital.ear"

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1942) [jboss-msc-1.2.0.Beta1.jar:1.2.0.Beta1]

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1875) [jboss-msc-1.2.0.Beta1.jar:1.2.0.Beta1]

                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]

                                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]

                      Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

                                at org.jboss.msc.inject.Injectors.cast(Injectors.java:44) [jboss-msc-1.2.0.Beta1.jar:1.2.0.Beta1]

                                at org.jboss.msc.service.ServiceBuilderImpl.addDependency(ServiceBuilderImpl.java:198) [jboss-msc-1.2.0.Beta1.jar:1.2.0.Beta1]

                                at org.jboss.msc.service.ServiceBuilderImpl.addDependency(ServiceBuilderImpl.java:192) [jboss-msc-1.2.0.Beta1.jar:1.2.0.Beta1]

                                at org.jboss.as.naming.deployment.ContextNames$BindInfo.setupLookupInjection(ContextNames.java:313)

                                at org.jboss.as.ee.component.LookupInjectionSource.getResourceValue(LookupInjectionSource.java:71)

                                at org.jboss.as.ee.component.ComponentDescription$InjectedConfigurator.configureDependency(ComponentDescription.java:544)

                                at org.jboss.as.ee.component.ComponentDescription$InjectedConfigurator.configureDependency(ComponentDescription.java:523)

                                at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:151)

                                at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:101)

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]

                                ... 5 more

                       

                      It's got plenty of memory (well 1.5GB and it starts on AS7 in less than 1)

                       

                      Note also the timing - it spent a minute or so churning away - AS7 would have completed well inside that time.

                       

                      There is also this coming out amongst tthe above memory issues:

                      20:04:14,481 ERROR [org.jboss.remoting.remote.connection] (Remoting "coodmax:MANAGEMENT" I/O-1) JBREM000200: Remote connection failed: java.io.IOException: An established connection was aborted by the software in your host machine

                       

                      I suppose I should open a new thread?

                      • 8. Re: Too many dependencies
                        Stuart Douglas Master

                        20:04:14,481 ERROR [org.jboss.remoting.remote.connection] (Remoting "coodmax:MANAGEMENT" I/O-1) JBREM000200: Remote connection failed: java.io.IOException: An established connection was aborted by the software in your host machine

                         

                        That is probably caused by the memory issues.

                         

                        Any chance you could take a memory snapshot so we can see what is causing the issues?

                        • 9. Re: Too many dependencies
                          Michael McGovern Newbie

                          ok, is there a recommended Eclipse plugin to do this?