cancel
Showing results for 
Search instead for 
Did you mean: 

instance document root tag name invalid error

dipu_cs
Champ in-the-making
Champ in-the-making
Hi all,

I am trying to do a common webform for some of my wicket pages.

I am getting the folloing error User:admin ERROR [ui.common.Utils] instance document root tag name invalid.  expected alf:extend, got html

this is my xsd

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:alf="http://www.alfresco.org"
                 targetNamespace="http://www.alfresco.org"
           elementFormDefault="qualified"
           xmlns:wicket="http://wicket.sourceforge.net">
       

  <xs:element name="extend" type="xs:string">
   
    <xs:annotation>
      <xs:appinfo>
        <alf:appearance>full</alf:appearance>
      </xs:appinfo>
    </xs:annotation>

  </xs:element>
   
</xs:schema>

my ftl file

<#ftl ns_prefixes={"wicket", "http://wicket.sourceforge.net"}>

<html xmlns:xalan="http://xml.apache.org/xalan"
      xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
      xmlns:trn="http://www.alfresco.org"
      xmlns:alf="http://www.alfresco.org"
      xmlns:wicket="http://wicket.sourceforge.net">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
   <wicket:head>
   </wicket:head>
</head>
<body>
<wicket:extend>${extend}</wicket:extend>
</body>
</html>


and one of my sample html file

<html xmlns:wicket="http://wicket.sourceforge.net/">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
   <wicket:head>
   </wicket:head>
</head>
<body>
<wicket:extend>
<div id="wrapper">
   <div id="top-strip"><div class="stripes"><!– keep this comment for IE6 –></div></div>
   <div class="top-line">
               <div id="info">8,123  members online <!–| <a href="http://signin/">sign in</a>–></div>
   </div>

    <div class="header">
       <div class="logo"><a href="" class="logoHome"><img src="staticresources/images/omnisearchfiles/logo106x52.gif" alt="Home" title="" id="logo" height="52" width="106"></img></a></div>
         <div class="strapline"><img src="staticresources/images/omnisearchfiles/strapline300x17.gif" alt=" title="Software " height="17" width="300"></img></div>
    </div>
    <div wicket:id="tabPanel"></div>
  <!– /header –>

      <wicket:child/>

   <div class="footer">
         </div>
   <div class="copyright" wicket:id="baseInfoPanel">baseInfoPanel</div>

</div>


</wicket:extend>
</body>
</html>


when i try to edit i get error i mentioned. Can anyone help  me with what is going wrong.

I am pasting the stacktrace below.

thanks
–dipu

13:48:24,468 User:admin ERROR [ui.common.Utils] instance document root tag name invalid.  expected alf:extend, got html
java.lang.IllegalArgumentException: instance document root tag name invalid.  expected alf:extend, got html
        at org.alfresco.web.forms.xforms.Schema2XForms.buildXForm(Schema2XForms.java:251)
        at org.alfresco.web.forms.xforms.XFormsBean.getXFormsDocument(XFormsBean.java:687)
        at org.alfresco.web.forms.xforms.XFormsBean.setXFormsSession(XFormsBean.java:228)
        at org.alfresco.web.forms.xforms.XFormsProcessor.process(XFormsProcessor.java:141)
        at org.alfresco.web.forms.xforms.XFormsProcessor.process(XFormsProcessor.java:122)
        at org.alfresco.web.ui.wcm.component.UIFormProcessor.encodeBegin(UIFormProcessor.java:123)
        at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
        at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:320)
        at org.apache.jsp.jsp.wcm.create_002dweb_002dcontent_002dwizard.create_002dxml_jsp._jspx_meth_wcm_005fformProcessor_005
7)
        at org.apache.jsp.jsp.wcm.create_002dweb_002dcontent_002dwizard.create_002dxml_jsp._jspService(create_002dxml_jsp.java:
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
        at org.apache.jsp.jsp.wizard.container_jsp._jspService(container_jsp.java:532)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:595)
3 REPLIES 3

robain
Champ in-the-making
Champ in-the-making
Did you find anything further on this ?  Seems like soon as I have two xsd files, by default the first one is choosen for some reason and hence the error. Thanks.Robain

steventux
Champ in-the-making
Champ in-the-making
Did anyone find the solution to this? I notice that logging out of Alfresco allows me to create content from another schema so it's a workaround for now but probably not ideal when in full production use by a editorial team.
Tested on Labs v 3.0
Seems something in the XFormSession in XFormsBean is hanging onto the schema and the previous form instance, I also get duplicated content (mentioned in another post) caused and alleviated in the same way - log out and the problem goes.

andyoll
Champ in-the-making
Champ in-the-making
Is there any specific Jira ticket for this?
I've had the same problems and have added some comments to https://issues.alfresco.com/jira/browse/ALFCOM-212, as the symptoms seem similar.
The result is that web-forms seem to be unusable for now.
This thread seems to be discussing the same item as http://forums.alfresco.com/en/viewtopic.php?f=29&t=14433, suggest we mirate the discussion to there.