Details
-
Wish
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
8.0.8
Description
TomEE allows to deploy webapps inside an EAR file to different hosts by setting a system property. If this property points to an unknown host, the error message will be hard to understand:
SEVERE: Application could not be deployed: /tmp/tomee/apps/hello
org.apache.openejb.OpenEJBException: Creating application failed: /tmp/tomee/apps/hello: null
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1104)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:759)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:637)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:494)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:245)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:169)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:137)
at org.apache.catalina.startup.Catalina.load(Catalina.java:724)
at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
Caused by: java.lang.NullPointerException
at org.apache.catalina.core.ApplicationContext.<init>(ApplicationContext.java:121)
at org.apache.catalina.core.StandardContext.getServletContext(StandardContext.java:2334)
at org.apache.tomee.catalina.security.TomcatSecurityConstaintsToJaccPermissionsTransformer.<init>(TomcatSecurityConstaintsToJaccPermissionsTransformer.java:78)
at org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:622)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1054)
... 18 more
Attached you find an example.ear. The error may be triggered by defining the system property
helloweb.host=no.such.host.com
Also attached you find two possible fixes. The first one throws a better exception. The alternative one just skips the webapp.
Attachments
Attachments
Issue Links
- links to