[ http://issues.apache.org/jira/browse/BEEHIVE-30?page=all ]

Jeremiah Johnson reassigned BEEHIVE-30:
---------------------------------------

    Assign To: Jeremiah Johnson  (was: Bryan Che)

I'll take this one to verify and close out.

> generated jpf xml files don't have doctype, causing server startup errors
> -------------------------------------------------------------------------
>
>          Key: BEEHIVE-30
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-30
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Alpha
>  Environment: beehive trunk tip on jonas/tomcat
>     Reporter: Bryan Che
>     Assignee: Jeremiah Johnson
>     Priority: Blocker
>      Fix For: V1Alpha

>
> Deploying a Beehive app on Jonas/Tomcat leads to a startup error like:
> 27 Oct 2004 15:37:55,718 ERROR Digester        []: Parse Error at line 3 
> column 15: Document root element "struts-config", must match DOCTYPE root 
> "null".
> org.xml.sax.SAXParseException: Document root element "struts-config", must 
> match DOCTYPE root "null".
>       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.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
> Source)
>       at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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:1548)
>       at 
> org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.initModuleConfig(AutoRegisterActionServlet.java:406)
>       at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
>       at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>       at 
> org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:152)
>       at 
> org.apache.beehive.netui.pageflow.PageFlowActionServlet.init(PageFlowActionServlet.java:104)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at 
> org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>       at 
> org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
>       at 
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
>       at 
> org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:110)
>       at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1024)
>       at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
>       at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
>       at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
>       at 
> org.objectweb.jonas.web.catalina50.JOnASStandardContext.start(Unknown Source)
>       at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
>       at 
> org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:121)
>       at 
> org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
>       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
>       at 
> org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar(Unknown
>  Source)
>       at 
> org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(Unknown 
> Source)
>       at org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doStart(Unknown 
> Source)
>       at 
> org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart(Unknown
>  Source)
>       at org.objectweb.jonas.service.AbsServiceImpl.start(Unknown Source)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at 
> org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.invoke(Unknown
>  Source)
>       at 
> org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.start(Unknown
>  Source)
>       at org.objectweb.jonas.service.ServiceManager.startServices(Unknown 
> Source)
>       at org.objectweb.jonas.server.Server.start(Unknown Source)
>       at org.objectweb.jonas.server.Server.main(Unknown Source)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.objectweb.jonas.server.Bootstrap.main(Unknown Source)
> This is because the generated jpf-struts-config.xml and 
> jpf-struts-config--global.xml files do not have a doctype or reference to 
> their grammars.  For example, jpf-struts-config.xml starts off like:
> <?xml version="1.0" encoding="UTF-8"?>
> <!--Generated from /Controller.jpf on Wed Oct 27 15:34:31 EDT 2004-->
> <struts-config>
> ...
> I looked at org.apache.beehive.netui.compiler.model.writeXml() and saw that 
> it was setting the doctype properties when generating xml.  But, the doctype 
> wasn't being written out to the xml file.  I hardcoded the doctype into my 
> xml files by adding
> <!DOCTYPE struts-config PUBLIC
>   "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> to them.  That fixed the Jonas/Tomcat startup errors.
> I took a look through the XmlBeans API's and source to see if there was a way 
> to force generating the doctype but didn't find one.  I'm not sure why the 
> doctype isn't being written out.

-- 
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

Reply via email to