[
https://issues.apache.org/struts/browse/WW-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Don Brown resolved WW-2239.
---------------------------
Resolution: Not A Problem
Fix Version/s: (was: 2.1.4)
The tag tests are ran as unit tests and not as a web application
> Not able to execute tag related unit test cases
> -----------------------------------------------
>
> Key: WW-2239
> URL: https://issues.apache.org/struts/browse/WW-2239
> Project: Struts 2
> Issue Type: Bug
> Components: Unit Tests
> Affects Versions: 2.0.9
> Environment: All
> Reporter: Mahesh
>
> When i execute the tag related test cases ( Eg DateTagTest.java,
> ActionErrorTagTest.java) i am getting the following exception.
> Exception :
> -----------------
> java.lang.NullPointerException
> at
> com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:188)
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:479)
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:450)
> at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:407)
> 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:152)
> at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> at
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> at
> org.apache.struts2.util.StrutsTestCaseHelper.initDispatcher(StrutsTestCaseHelper.java:49)
> at
> org.apache.struts2.StrutsTestCase.initDispatcher(StrutsTestCase.java:45)
> at org.apache.struts2.StrutsTestCase.setUp(StrutsTestCase.java:41)
> at
> org.apache.struts2.views.jsp.AbstractTagTest.setUp(AbstractTagTest.java:79)
> at
> org.apache.struts2.views.jsp.ui.DateTagTest.setUp(DateTagTest.java:242)
>
> Also some messages are getting printed on the console.
> SEVERE: ********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION
> **********
> Looks like the Spring listener was not configured for your web app!
> Nothing will work until WebApplicationContextUtils returns a valid
> ApplicationContext.
> You might need to add the following to web.xml:
> <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> Do we need this configuration for executing UT test cases ?? There is no
> "web.xml" file.
> Thanks in Advance,
> Mahesh
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.