[ https://issues.apache.org/jira/browse/TOMEE-913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13643989#comment-13643989 ]
Philippe Marschall commented on TOMEE-913: ------------------------------------------ I spoke too early. I also have it appear with 1.6.0-SNAPSHOT at the first deployment. It's a bit confusing because TomEE says it has started before the EAR is actually deployed. I'll attach an EAR to reproduce the issue. > Exception when deploying EAR with no WAR > ---------------------------------------- > > Key: TOMEE-913 > URL: https://issues.apache.org/jira/browse/TOMEE-913 > Project: TomEE > Issue Type: Bug > Affects Versions: 1.5.2 > Reporter: Philippe Marschall > Labels: ear, patch, war > Attachments: tomee.patch > > > When deploying an EAR without a WAR I get the following exception > {code} > 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 > {code} > 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira