Hi, did a mvn clean tomcat7:run-war which raised the following NPE:
java.lang.NullPointerException at org.apache.wiki.ui.WikiJSPFilter.<init>(WikiJSPFilter.java:71) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:138) [...] m_engine is initialized in the super.init( config ) call inside the WikiJSPFilter.init( FilterConfig config ) method, so I moved the call to m_engine from line 71 (init at class level) to line 77, (below super.init(config)) Didn't test on a standalone tomcat, so it could be an issue on the tomcat7 plugin, the it modules were throwing the exception too. As an aside, the UndefinedPagesPluginTest#testCount test is failing again on CI. Last time I did workspace clean up at build.a.o and the build went back to ok, so it seems that test is reading stale data somewhere. Don't know yet if the stale data is on the jenkins node, still having some ant-specific build data, or the test being dependent on the execution order itself br, juan pablo On Sun, Jun 2, 2013 at 3:22 PM, Harry Metske <harry.met...@gmail.com> wrote: > JP, > > which scenario gave this NPE ? > It didn't show up in unit tests, nor in my manual (limited) testing for the > related JIRA issue ? > > regards, > Harry > > > > On 2 June 2013 12:54, <juanpa...@apache.org> wrote: > > > Author: juanpablo > > Date: Sun Jun 2 10:54:56 2013 > > New Revision: 1488660 > > > > URL: http://svn.apache.org/r1488660 > > Log: > > fixed runtime NPE on WikiJSPFilter (m_engine used before having been > > initialized) > > > > Modified: > > > > > incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java > > > > Modified: > > > incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java > > URL: > > > http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java?rev=1488660&r1=1488659&r2=1488660&view=diff > > > > > ============================================================================== > > --- > > > incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java > > (original) > > +++ > > > incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/WikiJSPFilter.java > > Sun Jun 2 10:54:56 2013 > > @@ -68,12 +68,13 @@ import org.apache.wiki.util.WatchDog; > > public class WikiJSPFilter extends WikiServletFilter > > { > > private Boolean m_useOutputStream; > > - private String m_wiki_encoding = > > m_engine.getWikiProperties().getProperty(WikiEngine.PROP_ENCODING); > > + private String m_wiki_encoding; > > > > /** {@inheritDoc} */ > > public void init( FilterConfig config ) throws ServletException > > { > > super.init( config ); > > + m_wiki_encoding = > > m_engine.getWikiProperties().getProperty(WikiEngine.PROP_ENCODING); > > ServletContext context = config.getServletContext(); > > m_useOutputStream = UtilJ2eeCompat.useOutputStream( > > context.getServerInfo() ); > > } > > > > > > >