My struts config is using a sub request processor
and as a consequence i use some personal property in struts config for each mapping like 'application':
<action path="/appVersion" type="com.sgs.fwrk.web.version.VersionAction" parameter="jboevent" scope="session">
<set-property property="application" value="Root"/>
<set-property property="releasemode" value="Stateful"/>
<forward name="success" path="/tradeworks/appVersion.jsp"/>
</action>
It causes the following error when i tried to launch my first testcase:
<Bean has no property named application>
Does the problem really come from this different request processor ?
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull
=true
[ERROR] Digester - -Begin event threw exception <java.lang.NoSuchMethodException: Bean has no property named a
pplication>java.lang.NoSuchMethodException: Bean has no property named application
at org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:192)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1173)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:294)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:261)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:147)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:303)
at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:371)
at login.TestLogin.testSuccessfulLogin(TestLogin.java:21)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at junit.textui.TestRunner.run(TestRunner.java:72)
at junit.textui.TestRunner.run(TestRunner.java:57)
at login.TestLogin.main(TestLogin.java:42)
[ERROR] ActionServlet - -Parsing error processing resource path <java.lang.NoSuchMethodException: Bean has no
property named application>java.lang.NoSuchMethodException: Bean has no property named application
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My struts config is using a sub request processor
and as a consequence i use some personal property in struts config for each mapping like 'application':
<action path="/appVersion" type="com.sgs.fwrk.web.version.VersionAction" parameter="jboevent" scope="session">
<set-property property="application" value="Root"/>
<set-property property="releasemode" value="Stateful"/>
<forward name="success" path="/tradeworks/appVersion.jsp"/>
</action>
It causes the following error when i tried to launch my first testcase:
<Bean has no property named application>
Does the problem really come from this different request processor ?
tanx Maxime
.[INFO] ServletContextSimulator - -ActionServlet: init
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull
=true
[ERROR] Digester - -Begin event threw exception <java.lang.NoSuchMethodException: Bean has no property named a
pplication>java.lang.NoSuchMethodException: Bean has no property named application
at org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:192)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1173)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:294)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:261)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:147)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:303)
at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:371)
at login.TestLogin.testSuccessfulLogin(TestLogin.java:21)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.doRun(TestRunner.java:109)
at junit.textui.TestRunner.run(TestRunner.java:72)
at junit.textui.TestRunner.run(TestRunner.java:57)
at login.TestLogin.main(TestLogin.java:42)
[ERROR] ActionServlet - -Parsing error processing resource path <java.lang.NoSuchMethodException: Bean has no
property named application>java.lang.NoSuchMethodException: Bean has no property named application
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)