Exception when initializing a page flow with a sparsely-populated Struts Merge
file
-----------------------------------------------------------------------------------
Key: BEEHIVE-967
URL: http://issues.apache.org/jira/browse/BEEHIVE-967
Project: Beehive
Type: Bug
Components: NetUI
Versions: V1
Reporter: Rich Feit
Assigned to: Rich Feit
Fix For: 1.1
Repro:
- Create the following page flow controller:
@Jpf.Controller(
strutsMerge = "merge-struts-config.xml",
simpleActions={
@Jpf.SimpleAction(name="begin", path="index.jsp")
}
)
public class Controller extends PageFlowController
{
}
- Create the following merge-struts-config.xml in the same directory:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<action-mappings>
</action-mappings>
</struts-config>
- Build, and hit the page flow.
EXPECTED: works fine
ACTUAL: see the following error in the logs. This is because the
<action-mappings> element in the generated struts config file is in the wrong
place.
07 Oct 2005 10:13:56,740 ERROR Digester []: Parse Error at line
34 column 17: The content of element type "struts-config" must match
"(data-sources?,form-beans?,global-exceptions?,global-forwar
ds?,action-mappings?,controller?,message-resources*,plug-in*)".
org.xml.sax.SAXParseException: The content of element type "struts-config" must
match
"(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,pl
ug-in*)".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.initModuleConfig(AutoRegisterActionServlet.java:398)
at
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.registerModule(AutoRegisterActionServlet.java:550)
at
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.ensureModuleRegistered(AutoRegisterActionServlet.java:770)
at
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.getModuleConfig(AutoRegisterActionServlet.java:715)
at
org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:598)
at
org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:156)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira