Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2232

Inconsistent handling of deployer suffix ordering needs to be fixed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-4.0.3 Final
    • JBossAS-4.0.3RC2
    • Deployers
    • None

    Description

      Changes between 4.0.3RC1 and 4.0.3RC2 are stopping the deployment of my application.
      Deploying one EJB .jar and one Hibernate .har.
      The ejb jar depends on classes in the .har the deployment order should be ok but the JAR file gets deployed before the HAR file.

      After some investigation, I believe that I have found the problem. Something between RC1 and RC2 has indeed changed.

      The change is on line 342 of MainDeployer.java
      The following line was introduced in version 1.74.2.2 by andd. This version was immediately after RC1

      suffixOrderHelper.addSuffixes(deployer.getSuffixes(), deployer.getRelativeOrder());

      The following lines were also added:
      suffixOrderHelper.removeSuffixes(deployer.getSuffixes(), deployer.getRelativeOrder());

      and
      suffixOrderHelper.init();

      The consequence of the first line is that it CHANGES the order of sorting whilst it is deploying. When the scan starts in URLDeploymentScanner, the following order is stipulated:

      15:12:00,027 INFO [DeploymentSorter] ====> ORIGINAL SUFFIX ORDER
      15:12:00,037 INFO [DeploymentSorter] 0/ .deployer
      15:12:00,047 INFO [DeploymentSorter] 1/ -deployer.xml
      15:12:00,057 INFO [DeploymentSorter] 2/ .sar
      15:12:00,067 INFO [DeploymentSorter] 3/ -service.xml
      15:12:00,077 INFO [DeploymentSorter] 4/ .rar
      15:12:00,087 INFO [DeploymentSorter] 5/ -ds.xml
      15:12:00,097 INFO [DeploymentSorter] 6/ .har
      15:12:00,107 INFO [DeploymentSorter] 7/ .jar
      15:12:00,107 INFO [DeploymentSorter] 8/ .war
      15:12:00,127 INFO [DeploymentSorter] 9/ .wsr
      15:12:00,127 INFO [DeploymentSorter] 10/ .ear
      15:12:00,137 INFO [DeploymentSorter] 11/ .zip
      15:12:00,147 INFO [DeploymentSorter] 12/ .bsh
      15:12:00,157 INFO [DeploymentSorter] 13/ .last

      Which is the default one and where you can see that .har is before .jar

      The first item to be deployed is then:
      Deploying file:/C:/java/jboss-4.0.3RC2/server/default/deploy/jboss-aop-jdk50.deployer/

      which is fine BUT this deployment calls the suffixOrderHelper.addSuffixes and that seems to modify the order to:

      15:19:13,400 INFO [DeploymentSorter][main] ====> NEW SUFFIX ORDER
      15:19:13,410 INFO [DeploymentSorter][main] 0/ .deployer
      15:19:13,410 INFO [DeploymentSorter][main] 1/ -deployer.xml
      15:19:13,420 INFO [DeploymentSorter][main] 2/ .aop
      15:19:13,430 INFO [DeploymentSorter][main] 3/ -aop.xml
      15:19:13,440 INFO [DeploymentSorter][main] 4/ .sar
      15:19:13,450 INFO [DeploymentSorter][main] 5/ -service.xml
      15:19:13,460 INFO [DeploymentSorter][main] 6/ .rar
      15:19:13,470 INFO [DeploymentSorter][main] 7/ -ds.xml
      15:19:13,480 INFO [DeploymentSorter][main] 8/ .jar
      15:19:13,480 INFO [DeploymentSorter][main] 9/ .sar/
      15:19:13,490 INFO [DeploymentSorter][main] 10/ .har
      15:19:13,500 INFO [DeploymentSorter][main] 11/ .har/
      15:19:13,520 INFO [DeploymentSorter][main] 12/ .deployer/
      15:19:13,520 INFO [DeploymentSorter][main] 13/ service.xml
      15:19:13,530 INFO [DeploymentSorter][main] 14/ deployer.xml
      15:19:13,540 INFO [DeploymentSorter][main] 15/ .war
      15:19:13,550 INFO [DeploymentSorter][main] 16/ .wsr
      15:19:13,560 INFO [DeploymentSorter][main] 17/ .ear
      15:19:13,570 INFO [DeploymentSorter][main] 18/ .zip
      15:19:13,580 INFO [DeploymentSorter][main] 19/ .last

      Where now the .jar is BEFORE .har!
      I believe that the suffixOrderHelper is incorrect but the fact that it was NOT called at that particular point in RC1 did hide the problem.

      Further down, I enclose the stacktrace of where the setSuffixOrder is called.

      I believe this is a bug and would be very grateful if you could pass this information onto the appropriate development team.

      I am not sure how to fix either the SuffixOrderHelper or the MainDeployer, so I shall leave that to the specialists? However, for my purpose, commenting out the 3 lines:
      suffixOrderHelper.addSuffixes(deployer.getSuffixes(), deployer.getRelativeOrder()); in MainDeployer.java seems to revert to the working state that I had with RC1.

      However, I believe that the SuffixOrderHelper.java should NOT have commented out:
      SubDeployer.RELATIVE_ORDER_400 + ":.har",
      then it keeps the HAR before JAR.

      I hope that this will help? I knew there was something strange?

      Many thanks for your help,

      Benoit

      15:13:03,028 ERROR [STDERR][main] at org.jboss.deployment.DeploymentSorter.setSuffixOrder(DeploymentSorter.java:73)
      15:13:03,028 ERROR [STDERR][main] at org.jboss.deployment.SuffixOrderHelper.addSuffixes(SuffixOrderHelper.java:167)
      15:13:03,038 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.addDeployer(MainDeployer.java:334)
      15:13:03,048 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:13:03,058 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:13:03,068 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:13:03,078 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:13:03,088 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:13:03,088 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:13:03,108 ERROR [STDERR][main] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      15:13:03,108 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      15:13:03,118 ERROR [STDERR][main] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      15:13:03,128 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      15:13:03,138 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:13:03,148 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:13:03,158 ERROR [STDERR][main] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      15:13:03,168 ERROR [STDERR][main] at $Proxy8.addDeployer(Unknown Source)
      15:13:03,178 ERROR [STDERR][main] at org.jboss.deployment.SubDeployerSupport.startService(SubDeployerSupport.java:107)
      15:13:03,178 ERROR [STDERR][main] at org.jboss.aop.deployment.AspectDeployer.startService(AspectDeployer.java:233)
      15:13:03,188 ERROR [STDERR][main] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:287)
      15:13:03,198 ERROR [STDERR][main] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:236)
      15:13:03,208 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:13:03,218 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:13:03,228 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:13:03,238 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:13:03,238 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:13:03,248 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:13:03,258 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      15:13:03,268 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:13:03,278 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:13:03,288 ERROR [STDERR][main] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      15:13:03,298 ERROR [STDERR][main] at $Proxy0.start(Unknown Source)
      15:13:03,298 ERROR [STDERR][main] at org.jboss.system.ServiceController.start(ServiceController.java:453)
      15:13:03,308 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:13:03,318 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:13:03,328 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:13:03,338 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:13:03,348 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:13:03,358 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:13:03,358 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      15:13:03,368 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:13:03,378 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:13:03,388 ERROR [STDERR][main] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      15:13:03,398 ERROR [STDERR][main] at $Proxy4.start(Unknown Source)
      15:13:03,408 ERROR [STDERR][main] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:276)
      15:13:03,418 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
      15:13:03,418 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
      15:13:03,428 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      15:13:03,448 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:13:03,448 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:13:03,458 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:13:03,468 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:13:03,478 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:13:03,478 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:13:03,488 ERROR [STDERR][main] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      15:13:03,498 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      15:13:03,508 ERROR [STDERR][main] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      15:13:03,518 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      15:13:03,528 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:13:03,538 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:13:03,548 ERROR [STDERR][main] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      15:18:22,177 ERROR [STDERR][main] at $Proxy6.deploy(Unknown Source)
      15:18:22,187 ERROR [STDERR][main] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:320)
      15:18:22,197 ERROR [STDERR][main] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:540)
      15:18:22,197 ERROR [STDERR][main] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.ja
      192)
      15:18:22,207 ERROR [STDERR][main] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
      15:18:22,227 ERROR [STDERR][main] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:287)
      15:18:22,237 ERROR [STDERR][main] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:236)
      15:18:22,247 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:18:22,247 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:18:22,257 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:18:22,267 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:18:22,277 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:18:22,287 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:18:22,297 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      15:18:22,317 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:18:22,317 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:18:22,327 ERROR [STDERR][main] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      15:18:22,327 ERROR [STDERR][main] at $Proxy0.start(Unknown Source)
      15:18:22,337 ERROR [STDERR][main] at org.jboss.system.ServiceController.start(ServiceController.java:453)
      15:18:22,347 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:18:22,357 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:18:22,367 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:18:22,377 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:18:22,387 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:18:22,387 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:18:22,397 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      15:18:22,407 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:18:22,417 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:18:22,427 ERROR [STDERR][main] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      15:18:22,437 ERROR [STDERR][main] at $Proxy4.start(Unknown Source)
      15:18:22,447 ERROR [STDERR][main] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:276)
      15:18:22,447 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
      15:18:22,457 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
      15:18:22,467 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      15:18:22,477 ERROR [STDERR][main] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:721)
      15:18:22,487 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      15:18:22,497 ERROR [STDERR][main] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      15:18:22,497 ERROR [STDERR][main] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:18:22,507 ERROR [STDERR][main] at java.lang.reflect.Method.invoke(Method.java:585)
      15:18:22,517 ERROR [STDERR][main] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      15:18:22,527 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      15:18:22,537 ERROR [STDERR][main] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      15:18:22,547 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      15:18:22,547 ERROR [STDERR][main] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      15:18:22,567 ERROR [STDERR][main] at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      15:18:22,567 ERROR [STDERR][main] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      15:18:22,577 ERROR [STDERR][main] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      15:18:22,587 ERROR [STDERR][main] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      15:18:22,597 ERROR [STDERR][main] at $Proxy5.deploy(Unknown Source)
      15:18:22,607 ERROR [STDERR][main] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:451)
      15:18:22,607 ERROR [STDERR][main] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:328)
      15:18:22,617 ERROR [STDERR][main] at org.jboss.Main.boot(Main.java:187)
      15:18:22,627 ERROR [STDERR][main] at org.jboss.Main$1.run(Main.java:438)
      15:18:22,637 ERROR [STDERR][main] at java.lang.Thread.run(Thread.java:595)

      Attachments

        Issue Links

          Activity

            People

              starksm64 Scott Stark (Inactive)
              benoitx_jira Benoit Xhenseval (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: