Bug 58490 - Webapp does not start when using web-fragments icw unpackWARs="false"
Summary: Webapp does not start when using web-fragments icw unpackWARs="false"
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: PC All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 59274 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-09 08:57 UTC by Rob Gansevles
Modified: 2016-04-05 12:08 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Gansevles 2015-10-09 08:57:44 UTC
When I deploy a webapp that uses web-fragments it does not start when the host is configured with unpackWARs="false".

With unpackWARs="true" the same webapp starts fine.

This can be shown on a clean install of tomcat8, deploy webfragments sample from apache-geronimo.

The war can be downloaded from maven central:
http://search.maven.org/remotecontent?filepath=org/apache/geronimo/samples/javaee6/webfragment-javaee6-war/3.0.0/webfragment-javaee6-war-3.0.0.war

The only change in conf/server.xml is unpackWARs setting from true to false:

 <Host name="localhost"  appBase="webapps"
            unpackWARs="false" autoDeploy="true">



INFO: Deploying web application archive /crypt/apache/tomcat/trunk/output/build/webapps/webfragment-javaee6-war-3.0.0.war
Oct 09, 2015 10:07:56 AM org.apache.catalina.startup.ContextConfig processServletContainerInitializers
SEVERE: Failed to process JAR found at URL [/webfragment-javaee6-war-3.0.0] for ServletContainerInitializers for context with name [{1}]
java.net.MalformedURLException: no !/ in spec
	at java.net.URL.<init>(URL.java:619)
	at java.net.URL.<init>(URL.java:482)
	at java.net.URL.<init>(URL.java:431)
	at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:179)
	at java.net.JarURLConnection.<init>(JarURLConnection.java:162)
	at sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:81)
	at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:41)
	at java.net.URL.openConnection(URL.java:971)
	at java.net.URL.openStream(URL.java:1037)
	at org.apache.catalina.startup.WebappServiceLoader.parseConfigFile(WebappServiceLoader.java:161)
	at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:118)
	at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1616)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1128)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:771)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5080)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1798)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	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:744)
Caused by: java.lang.NullPointerException: no !/ in spec
	at sun.net.www.protocol.jar.Handler.parseAbsoluteSpec(Handler.java:170)
	at sun.net.www.protocol.jar.Handler.parseURL(Handler.java:150)
	at java.net.URL.<init>(URL.java:614)
	... 28 more
Comment 1 Violeta Georgieva 2015-10-23 08:27:38 UTC
Hi,

Thanks for the report and the test case.
The fix is available in trunk and 8.0.x (for 8.0.29 onwards)

Regards,
Violeta
Comment 2 Violeta Georgieva 2016-04-05 12:08:08 UTC
*** Bug 59274 has been marked as a duplicate of this bug. ***