Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

problem working with the Spring plugin with Struts 2.0.3+

Daniel Amadei

2007-02-06

Replies:

Hi All,

I'm getting the following exception when using Struts 2.0.3+ (tested with
0.4 and 0.5). Looking at the XWork source code I could see this is being
caused because the Spring Application Context is not being set, so it is
null.

Does anybody knows how to fix this as my code used to work with release
2.0.1???

Tks,
Daniel C. Amadei
*

java.lang.NullPointerException
*

at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(*
SpringObjectFactory.java:188*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType
(*XmlConfigurationProvider.java:433*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes
(*XmlConfigurationProvider.java:404*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage
(*XmlConfigurationProvider.java:362*)

at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages
(*XmlConfigurationProvider.java:239*)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(*
StrutsXmlConfigurationProvider.java:111*)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
DefaultConfiguration.java:151*)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(*
ConfigurationManager.java:52*)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
Dispatcher.java:394*)

at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:450*)

at org.apache.struts2.dispatcher.FilterDispatcher.init(*
FilterDispatcher.java:201*)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
ApplicationFilterConfig.java:223*)
<user@(protected)>
©2008 junlu.com - Jax Systems, LLC, U.S.A.