https://bz.apache.org/bugzilla/show_bug.cgi?id=65397
Bug ID: 65397
Summary: NullPointerException during jar scanning with jar
symlinked into WEB-INF/lib
Product: Tomcat 9
Version: 9.0.48
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: Util
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -----
Symlinking a jar into WEB-INF/lib results in a NullPointerException during
scanning for web fragments:
Caused by: java.lang.NullPointerException
at
org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:382)
at
org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:195)
at
org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:2136)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1289)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:986)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 38 more
This behaviour can be reproduced with the following steps:
wget
https://apache.mirrors.nublue.co.uk/tomcat/tomcat-9/v9.0.48/bin/apache-tomcat-9.0.48.tar.gz
tar -xzf apache-tomcat-9.0.48.tar.gz
mkdir -p apache-tomcat-9.0.48/webapps/symlink-problem/WEB-INF/lib
wget
https://repo.spring.io/artifactory/libs-release-local/org/springframework/cloud/spring-cloud-bindings/1.7.1/spring-cloud-bindings-1.7.1.jar
ln -s spring-cloud-bindings-1.7.1.jar
apache-tomcat-9.0.48/webapps/symlink-problem/WEB-INF/lib
apache-tomcat-9.0.48/bin/catalina.sh run
I don't believe that the specific jar that's symlinked is important, any jar
will reproduce the failure. The problem also occurs with <Resources
allowLinking="true"/> added to conf/context.xml.
We've also seen a similar problem with embedded Tomcat when scanning for tag
libraries. Please see
https://github.com/spring-projects/spring-boot/issues/27075 for some further
details.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]