I've been debugging a startup error deploying a WAR in an EAR.
After downloading the source and debugging, I can see that the Instance
Manager is null
which causes line 108 to NullPointerException out.
org.apache.catalina.core.ApplicationFilterConfig.java from catalina.jar. The
version is Tomcat 8.0.5:
108: getInstanceManager().newInstance(filter);
341: private InstanceManager getInstanceManager() {
342: if (instanceManager == null) {
343: if (context instanceof StandardContext) {
344: instanceManager =
((StandardContext)context).getInstanceManager(); // <----- THIS RETURNS NULL
345: } else {
346: instanceManager = new DefaultInstanceManager(null,
347: new HashMap<String, Map<String, String>>(),
348: context,
349: getClass().getClassLoader());
350: }
350: }
352: return instanceManager;
353: }
Why would Instance Manager be null? Must be a configuration problem?
Application Background:
=======================
I have this in tomee/apps/myappEAR/webModuleOne/WEB-INF/web/xml:
<display-name>webModuleOne</display-name>
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>com.widgets.CustomThrowableMapper</param-value>
</context-param>
<context-param>
<param-name>resteasy.resources</param-name>
<param-value>
[a comma separated list of classes omitted]
</param-value>
</context-param>
The exception is can't find com.widgets.CustomThrowableMapper:
java.lang.ClassNotFoundException: com.widgets.CustomThrowableMapper
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at
org.apache.tomee.catalina.TomEEWebappClassLoader.loadWithDelegate(TomEEWebappClassLoader.java:211)
at
org.apache.tomee.catalina.TomEEWebappClassLoader.loadClass(TomEEWebappClassLoader.java:201)
at
The root cause is:
Caused by: java.lang.NullPointerException
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
... 29 more
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html