I got the same error some days ago when trying to build a new skeleton for my 
projects.
(the m2 starter archetype did not work with 2.1 trunk)

I did not know if trunk is broken because of bigger changes going on and 
decided to try it again this week ...

Piero

Am Montag 24 September 2007 20:07:26 schrieb Wes Wannemacher:
> Hello,
>
> I am building xwork2 and struts2 from SVN and I was going to deploy
> struts2-showcase to start poking around. Unfortunately, on context
> startup, an NPE is thrown. The stack trace in the tomcat console is as
> follows -
>
> 2007-09-24 13:13:15,750 ERROR
> (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/struts2-sh
>owcase]:3639) - Exception starting filter struts
> java.lang.NullPointerException
>       at
> org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(Struts
>XmlConfigurationProvider.java:165) at
> com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(Confi
>gurationManager.java:165) at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Config
>urationManager.java:59) at
> org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:827)
> at
> org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:2
>02) at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilte
>rConfig.java:221) at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFi
>lterConfig.java:302) at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCo
>nfig.java:78) at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3
>635) at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
> org.apache.catalina.core.StandardService.start(StandardService.java:448) at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
> org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
>
> It seems this is reproducible. The offending method is fairly simple,
> but the problem appears to be in xwork's
> com.opensymphony.xwork2.ActionContext here -
>
> public static ActionContext getContext() {
>     ActionContext context = (ActionContext) actionContext.get();
>
>     // Don't do lazy context creation, as it requires container; the
> creation of which may
>     // precede the context creation
>     //if (context == null) {
>     //    ValueStack vs =
> ValueStackFactory.getFactory().createValueStack(); //    context = new
> ActionContext(vs.getContext());
>     //    setContext(context);
>     //}
>
>     return context;
> }
>
> The NPE is thrown by a class that is looking for an ActionContext but
> doesn't get one.
>
> --
> Wesley Wannemacher
> President, Head Engineer/Consultant
> WanTii, Inc.
> http://www.wantii.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to