7 Replies Latest reply on Jan 22, 2010 6:18 AM by jfrankman

    Error on line 1 of document http:www.jboss.com

    jfrankman Novice

      An existing seam application that has not had any changes is all of the sudden failing with the following error:


      java.lang.RuntimeException: org.dom4j.DocumentException: Error on line 1 of document http://www.jboss.com/ : The markup declarations contained or pointed to by the document type declaration must be well-formed. Nested exception: The markup declarations contained or pointed to by the document type declaration must be well-formed.
              at org.jboss.seam.navigation.Pages.getDocumentRoot(Pages.java:956)
              at org.jboss.seam.navigation.Pages.parse(Pages.java:942)
              at org.jboss.seam.navigation.Pages.createPage(Pages.java:183)
              at org.jboss.seam.navigation.Pages.getPage(Pages.java:157)
              at org.jboss.seam.navigation.Pages.createPageStack(Pages.java:241)
              at org.jboss.seam.navigation.Pages.getPageStack(Pages.java:220)
              at org.jboss.seam.navigation.Pages.getScheme(Pages.java:553)
              at org.jboss.seam.navigation.Pages.encodeScheme(Pages.java:451)
              at org.jboss.seam.ui.util.ViewUrlBuilder.<init>(ViewUrlBuilder.java:27)
              at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:37)
              at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
              at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
      



      I have seen similar problems posted in this forum where this error occurred when jboss.com was down. However, it appears that JBoss.com is up.  I have also tried to update my .page.xml from:


      <!DOCTYPE page PUBLIC
                "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
                "http://jboss.com/products/seam/pages-1.2.dtd">



      to:


      <?xml version="1.0" encoding="UTF-8"?>
      <page xmlns="http://jboss.com/products/seam/pages"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
      



      but I still get the same error. Can someone explain what the basic problem is here and what needs to be done to make it go away? Do I need to upgrade seam, change my .pages.xml, or both?


      Seam is at version: Seam 2.0.1.GA

        • 1. Re: Error on line 1 of document http:www.jboss.com
          Dennis Bohnstedt Hansen Newbie

          Has anyone found a solution to this problem? After restart of an existing installation, this problem has happend to our site as well.


          Should http://jboss.com/products/seam/pages-2.0.xsd be redirecting to http://www.jboss.com/??!?


          /Dennis

          • 2. Re: Error on line 1 of document http:www.jboss.com
            Nico de Wet Newbie

            I'm getting the same thing happening here on Seam 2.0.1GA

            • 3. Re: Error on line 1 of document http:www.jboss.com
              Nico de Wet Newbie

              Ok. I have found the error of my ways, and possibly the ways of the authors above (check the relevant xml files as detailed below) thanks to this thread


              I have actually had this problem for years, my application would bomb out whenever I was developing offline, but I was rarely offline, so just left it. It was of my doing though. As background, if Seam can't find an .xsd file on jboss.com, it will look locally. If you open jboss-seam.jar, you'll see the files.


              What I had failed to do though, when upgrading from an earlier version of Seam to Seam 2.0.1GA was to update both components.xml and web.xml, so this is what the top of my corrected pages.xml and web.xml now looks like:


              components.xml:


              <?xml version="1.0" encoding="UTF-8"?>
              <components xmlns="http://jboss.com/products/seam/components"
                          xmlns:core="http://jboss.com/products/seam/core"
                          xmlns:security="http://jboss.com/products/seam/security"
                          xmlns:transaction="http://jboss.com/products/seam/transaction"
                          xmlns:mail="http://jboss.com/products/seam/mail"
                          xmlns:persistence="http://jboss.com/products/seam/persistence"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xmlns:async="http://jboss.com/products/seam/async"           
                          xsi:schemaLocation=
                              "http://jboss.com/products/seam/components
              http://jboss.com/products/seam/components-2.0.xsd
                               http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
                               http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                               http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
                               http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                               http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
                               http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.0.xsd">


              pages.xml:


              <?xml version="1.0" encoding="UTF-8"?>
              <pages xmlns="http://jboss.com/products/seam/pages"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
                     no-conversation-view-id="/conversation_ended.xhtml"
                               login-view-id="/home.xhtml">


              So, now I can happily test while offline, and I know my production application won't bomb out (a total disaster for most people) if the link to jboss.com is severed for myriad possible reasons.


               

              • 4. Re: Error on line 1 of document http:www.jboss.com
                jfrankman Novice
                Thanks for posting the solution. I tried it and got the following:



                08:38:41,561 ERROR [[/nexus2]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                java.lang.RuntimeException: error while reading /WEB-INF/components.xml
                     at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:154)
                     at org.jboss.seam.init.Initialization.create(Initialization.java:104)
                     at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
                     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
                     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
                     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
                     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
                     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                     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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                     at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
                     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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                     at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                     at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                     at org.jboss.web.WebModule.startModule(WebModule.java:83)
                     at org.jboss.web.WebModule.startService(WebModule.java:61)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                     at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                     at $Proxy0.start(Unknown Source)
                     at org.jboss.system.ServiceController.start(ServiceController.java:417)
                     at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy44.start(Unknown Source)
                     at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                     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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                     at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                     at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                     at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                     at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy45.start(Unknown Source)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                     at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy9.deploy(Unknown Source)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                     at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                     at $Proxy0.start(Unknown Source)
                     at org.jboss.system.ServiceController.start(ServiceController.java:417)
                     at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy4.start(Unknown Source)
                     at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                     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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy5.deploy(Unknown Source)
                     at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                     at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                     at org.jboss.Main.boot(Main.java:200)
                     at org.jboss.Main$1.run(Main.java:508)
                     at java.lang.Thread.run(Thread.java:595)
                Caused by: org.dom4j.DocumentException: Error on line 23 of document  : The prefix "drools" for element "drools:rule-base" is not bound. Nested exception: The prefix "drools" for element "drools:rule-base" is not bound.
                     at org.dom4j.io.SAXReader.read(SAXReader.java:482)
                     at org.dom4j.io.SAXReader.read(SAXReader.java:343)
                     at org.jboss.seam.util.XML.getRootElement(XML.java:21)
                     at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:150)
                     ... 138 more


                Any ideas?

                • 5. Re: Error on line 1 of document http:www.jboss.com
                  jfrankman Novice

                  Update. I removed the drools element from my components.xml since I did not need it anyway. Unfortunately, once I did this, the same error occurred even after changing my components.xml and pages.xml as suggested.

                  • 6. Re: Error on line 1 of document http:www.jboss.com
                    Nico de Wet Newbie

                    James I'm not sure, sorry, its unclear to me why the one error message would still refer to drools if you removed that element.

                    • 7. Re: Error on line 1 of document http:www.jboss.com
                      jfrankman Novice

                      By same error I meant the original error I posted on this thread not the drools error. Anyway, I was able to finally solve this issue. Besides changing the components.xml and pages.xml files I also had to change all my .page.xml files. The project I am working on was originally generated with Seam 1.2 so all the .page.xml files had the following:




                      <!DOCTYPE page PUBLIC
                                "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
                                "http://jboss.com/products/seam/pages-1.2.dtd">




                      Once I removed the text above the error went away. I had to do it to ALL pages since this is how the jsf views are defined. So if your home page was home.xhtml with home.page.xml. Even if you fixed home.page.xml you would still get the error if home.xhtml had a link to any view that still had the above 1.2 dtd declaration. This is why it took me a while to identify this as the problem, because even when I removed it from one page.xml file, the error still occured since the page I was testing still had links to other views.