You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (Jira)" <ji...@apache.org> on 2022/10/06 14:09:00 UTC

[jira] [Updated] (TOMEE-3797) Misassignment webapp->host hard to detect

     [ https://issues.apache.org/jira/browse/TOMEE-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins updated TOMEE-3797:
---------------------------------
    Fix Version/s:     (was: 9.0.0-M9)

> Misassignment webapp->host hard to detect
> -----------------------------------------
>
>                 Key: TOMEE-3797
>                 URL: https://issues.apache.org/jira/browse/TOMEE-3797
>             Project: TomEE
>          Issue Type: Wish
>          Components: TomEE Core Server
>    Affects Versions: 8.0.8
>            Reporter: Bodo Pfelzer
>            Assignee: Richard Zowalla
>            Priority: Minor
>              Labels: patch-available
>             Fix For: 8.0.9
>
>         Attachments: alternativefix.patch, fix.patch, hello.ear
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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:
> {code:java}
> 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{code}
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)