Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-913

Exception when deploying EAR with no WAR

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 1.5.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      When deploying an EAR without a WAR I get the following exception

      SEVERE: ContainerBase.addChild: start: 
      org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/osgi-remoting-ejb-sample-ear-0.2.0-SNAPSHOT]]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:604)
      	at java.util.ArrayList.get(ArrayList.java:382)
      	at org.apache.tomee.catalina.TomcatWebAppBuilder.loadWebModule(TomcatWebAppBuilder.java:1919)
      	at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:1907)
      	at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1073)
      	at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1033)
      	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:124)
      	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	... 11 more
      

      looking at the source of TomcatWebAppBuilder#loadWebModule it seems to assume there is always exactly one web module. This isn't always true, an EAR can contain no or many WARs.

        Attachments

        1. tomee.patch
          4 kB
          Philippe Marschall
        2. osgi-remoting-ejb-sample-ear-0.2.0-SNAPSHOT.ear
          8 kB
          Philippe Marschall

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marschall Philippe Marschall
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: