Bug 56045 - Cannot start embedded container without Jasper
Summary: Cannot start embedded container without Jasper
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Jasper (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-01-21 09:43 UTC by Dave Syer
Modified: 2014-01-24 10:26 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Dave Syer 2014-01-21 09:43:18 UTC
If I don't have a web.xml and I'm not using JSPs I shoudln't need Jasper on the classpath (it worked in 7.0.47)

Caused by: java.lang.ExceptionInInitializerError: null
	at org.apache.catalina.startup.TldConfig.createTldDigester(TldConfig.java:94)
	at org.apache.catalina.startup.TldConfig.init(TldConfig.java:576)
	at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:559)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
	... 7 common frames omitted
Caused by: java.lang.NullPointerException: null
	at org.apache.tomcat.util.descriptor.DigesterFactory.idFor(DigesterFactory.java:107)
	at org.apache.tomcat.util.descriptor.DigesterFactory.<clinit>(DigesterFactory.java:59)
	... 15 common frames omitted
Comment 1 Konstantin Kolinko 2014-01-23 18:46:26 UTC
You do not need Jasper, but you need the JSP APIs - the "jsp-api.jar" file.

1. The common XML Schema for the Servlet 3.0 deployment descriptor does depend on the XML Schema for the JSP 2.2 deployment descriptor.

2. Tomcat processes tag libraries and instantiates Listeners defined in their TLD files regardless of whether you use Jasper. This may need the schema for TLD files.

Note that both of these issues have been fixed in Tomcat 8.
Re: 1: in Tomcat 8 the schemas are bundled in servlet-api.jar
Re: 2: in Tomcat 8 the listeners are initialized by Jasper and are injected into web application via ServletContext.addListener() API.
Comment 2 Dave Syer 2014-01-23 20:07:37 UTC
Good to know that jasper is a sufficient but not necessary dependency, but that doesn't really help if you don't want anything to do with JSPs.

I did raise this issue specifically against Tomcat 7. It's a regression (and a pretty significant one) between 7.0.47 and 7.0.50, so I'm kind of hoping it might be fixable.
Comment 3 Mark Thomas 2014-01-24 10:26:22 UTC
Fixed in trunk and will be included in 7.0.51 onwards.