You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/09/24 08:20:00 UTC
[jira] [Work logged] (TOMEE-3797) Misassignment webapp->host hard
to detect
[ https://issues.apache.org/jira/browse/TOMEE-3797?focusedWorklogId=654886&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-654886 ]
ASF GitHub Bot logged work on TOMEE-3797:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Sep/21 08:19
Start Date: 24/Sep/21 08:19
Worklog Time Spent: 10m
Work Description: bodop opened a new pull request #802:
URL: https://github.com/apache/tomee/pull/802
Throw exception, if deployment to unknown host is not possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tomee.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 654886)
Remaining Estimate: 0h
Time Spent: 10m
> 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
> Priority: Minor
> Labels: patch-available
> Attachments: alternativefix.patch, fix.patch, hello.ear
>
> Time Spent: 10m
> 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.3.4#803005)