...
Code Block |
---|
SEVERE: Exception starting filter struts2 Unable to load configuration. - action - file:/home/giaz/code/.metadata/.plugins/ com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/webui/WEB-INF/classes/struts.xml:39:98 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:370) ... Caused by: Error building results for action ScheduleJob in namespace - action - file:/home/giaz/code/.metadata/.plugins/ com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/webui/WEB-INF/classes/struts.xml:39:98 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:372) ... 30 more Caused by: There is no result type defined for type 'redirect-action' mapped with name 'success' - result - file:/home/giaz/code/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/webui/ WEB-INF/classes/struts.xml:40:50 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:616) ... 35 more |
...
Code Block |
---|
<action name="ScheduleJob" class="com.sag.optimizer.ui.web.action.scheduler.ScheduleJobAction"> <result name="success" type="redirect-action"> <param name="actionName">ListDisplayOptimizationJobStatus</param> </result> <result name="error" type="tiles">webui.requestFailed</result> </action> |
To resolve the issue modify the struts.xml action definition to:
...
Code Block |
---|
Nov 22, 2007 11:38:11 AM org.apache.tiles.impl.BasicTilesContainer init INFO: Initializing Tiles2 container. . . Nov 22, 2007 11:38:11 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 2 column 19: Document is invalid: no grammar found. org.xml.sax.SAXParseException: Document is invalid: no grammar found. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131) |
This is due to the fact that Tiles 2.0.5 now turns validation on as default.
The tiles.xml page before:
...
Code Block |
---|
Nov 22, 2007 1:54:51 PM freemarker.log.JDK14LoggerFactory$JDK14Logger error SEVERE: Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl. The problematic instruction: ---------- ==> ${parameters.parseContent?string} [on line 45, column 26 in template/ajax/head.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134) |
Use a different theme e.g. <s:head theme="xhtml" />
ajax ui tags were moved to dojo plugin, use /struts-dojo-tags taglib instead of (or in
...
addition to) /struts-tags:
Problem Symptom:
Accessing a page containing ajax UI tags through using the struts 2 taglib will produce the following error:
...
Code Block |
---|
WARNING: Could not find property [struts.valueStack]
ognl.OgnlException: target is null for setProperty(null, "preventCache", [Ljava.lang.String;@5f262a85)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1651)
at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.ASTChain.setValueBody(ASTChain.java:172)
|
Resolution is to change set devMode to false in struts.xml e.g.
...
Code Block |
---|
<constant name="struts.devMode" value="true" />
|
to
Code Block |
---|
<constant name="struts.devMode" value="false" />
|