Bug#756137: java.io.IOException: Failed to access resource /WEB-INF/lib/jstl.jar

Brian Burch brian at PingToo.com
Sat Jul 26 16:59:20 UTC 2014


Package: tomcat7-examples
Version: 7.0.52-1
Severity: normal

Dear Maintainer,

The tomcat7 examples webapp does not start after a clean install. The stack trace follows:

2014-07-26 17:35:43,952 ERROR [org.apache.catalina.loader.WebappLoader] LifecycleException 
java.io.IOException: Failed to access resource /WEB-INF/lib/jstl.jar
        at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:981)
        at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:604)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5332)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        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:632)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        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: javax.naming.NameNotFoundException: Resource jstl.jar not found
        at org.apache.naming.resources.BaseDirContext.lookup(BaseDirContext.java:498)
        at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:979)
        ... 14 more
2014-07-26 17:35:43,964 ERROR [org.apache.catalina.core.ContainerBase] ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[www2.pingtoo.com].StandardContext[/examples]]
        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:632)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        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: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[/examples]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5332)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 10 more
Caused by: org.apache.catalina.LifecycleException: start: 
        at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:630)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 12 more
Caused by: java.io.IOException: Failed to access resource /WEB-INF/lib/jstl.jar
        at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:981)
        at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:604)
        ... 13 more
Caused by: javax.naming.NameNotFoundException: Resource jstl.jar not found
        at org.apache.naming.resources.BaseDirContext.lookup(BaseDirContext.java:498)
        at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:979)
        ... 14 more
2014-07-26 17:35:43,968 ERROR [org.apache.catalina.startup.HostConfig] Error deploying configuration descriptor /etc/tomcat7/Catalina/www2.pingtoo.com/examples.xml

This is because the standard tomcat7 distribution no longer ships a copy of jstl.jar. Instead,
/usr/share/tomcat7-examples/examples/WEB-INF/lib/jstl.jar is a symlink to
../../../../java/jstl1.1.jar. (The same applies to standard.jar).

The solution is simple. When I add allowLinking="true" to the Context element
of examples.xml then the webapp starts normally. 


-- System Information:
Debian Release: jessie/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: i386 (i686)

Kernel: Linux 3.13.0-32-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tomcat7-examples depends on:
ii  libjakarta-taglibs-standard-java  1.1.2-2ubuntu1
ii  libjstl1.1-java                   1.1.2-2ubuntu1
ii  tomcat7-common                    7.0.52-1

tomcat7-examples recommends no packages.

tomcat7-examples suggests no packages.

-- no debconf information



More information about the pkg-java-maintainers mailing list