cancel
Showing results for 
Search instead for 
Did you mean: 

WCM content creation error...

harsha
Champ in-the-making
Champ in-the-making
Hi

i am trying to create sample WCM with the help of sample war file given by alfresco….
i am trying to create the content under the press-release.
but i am getting the above error…
plz try to fix my problem ASAP.

thanks in advance.


org.alfresco.web.forms.FormProcessor$ProcessingException: org.alfresco.web.forms.xforms.FormBuilderException: error parsing schema: at line 51 column 114: src-resolve: Cannot resolve the name 'pr:company_footer_choices' to a(n) 'type definition' component.

In tomcat console
=========================
16:06:30,468 User:mark ERROR [forms.xforms.XFormsProcessor] org.alfresco.web.forms.xforms.FormBuilderException: error parsing
at line 51 column 114: src-resolve: Cannot resolve the name 'pr:company_footer_choices' to a(n) 'type definition' component.

16:06:30,486 User:mark ERROR [ui.common.Utils] org.alfresco.web.forms.xforms.FormBuilderException: error parsing schema:
at line 51 column 114: src-resolve: Cannot resolve the name 'pr:company_footer_choices' to a(n) 'type definition' component.

org.alfresco.web.forms.FormProcessor$ProcessingException: org.alfresco.web.forms.xforms.FormBuilderException: error parsing s
at line 51 column 114: src-resolve: Cannot resolve the name 'pr:company_footer_choices' to a(n) 'type definition' component.

        at org.alfresco.web.forms.xforms.XFormsProcessor.process(XFormsProcessor.java:150)
        at org.alfresco.web.forms.xforms.XFormsProcessor.process(XFormsProcessor.java:126)
        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_0
        at org.apache.jsp.jsp.wcm.create_002dweb_002dcontent_002dwizard.create_002dxml_jsp._jspService(create_002dxml_jsp.jav
        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:331)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        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:331)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        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:213)
        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:874)
        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:689)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.web.forms.xforms.FormBuilderException: error parsing schema:
at line 51 column 114: src-resolve: Cannot resolve the name 'pr:company_footer_choices' to a(n) 'type definition' component.

        at org.alfresco.web.forms.xforms.SchemaUtil.parseSchema(SchemaUtil.java:265)
        at org.alfresco.web.forms.xforms.Schema2XForms.buildXForm(Schema2XForms.java:148)
        at org.alfresco.web.forms.xforms.XFormsBean.getXFormsDocument(XFormsBean.java:699)
        at org.alfresco.web.forms.xforms.XFormsBean.setXFormsSession(XFormsBean.java:225)
        at org.alfresco.web.forms.xforms.XFormsProcessor.process(XFormsProcessor.java:145)
        … 53 more
17:22:40,491 User:mark ERROR [forms.xforms.XFormsProcessor] org.alfresco.web.forms.xforms.FormBuilderException: error parsing
at line 51 column 114: src-resolve: Cannot resolve the name 'pr:company_footer_choices' to a(n) 'type definition' component.
5 REPLIES 5

pmonks
Star Contributor
Star Contributor
Please refer to the reply to your earlier post: http://forums.alfresco.com/viewtopic.php?t=12395

Cheers,
Peter

harsha
Champ in-the-making
Champ in-the-making
Hi,

i have checked each and every line of xsd , xsl and xml files but still i am gettting the same error
i am using the svn edition here are my files

Company-footer.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlnsSmiley Tonguer="http://www.alfresco.org/alfresco/pr"
           targetNamespace="http://www.alfresco.org/alfresco/pr"
           elementFormDefault="qualified">
  <!– defines the form for creating a company footer –>
  <xs:element name="company_footer">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="name" type="xs:normalizedString"/>
        <xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

press-release.xml

<alfrescoSmiley Tongueress-release xmlns:alfresco="http://www.alfresco.org/alfresco">
  <alfresco:title>t</alfresco:title>
  <alfresco:abstract>a</alfresco:abstract>
  <alfresco:location>l</alfresco:location>
  <alfresco:body>b1</alfresco:body>
  <alfresco:body>b2</alfresco:body>
  <alfresco:body>b2</alfresco:body>
  <alfresco:body>b2</alfresco:body>
  <alfresco:body>b2</alfresco:body>
  <alfresco:body>b2</alfresco:body>
  <alfresco:body>b55</alfresco:body>
  <alfresco:include_company_footer>Alfresco</alfresco:include_company_footer>
  <alfresco:include_media_contacts>true</alfresco:include_media_contacts>
  <alfresco:keywords>k</alfresco:keywords>
  <alfresco:category>Event</alfresco:category>
  <alfresco:launch_date>1978-08-08</alfresco:launch_date>
  <alfresco:expiration_date>1978-08-08</alfresco:expiration_date>
</alfrescoSmiley Tongueress-release>

press-release.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlnsSmiley Tonguer="http://www.alfresco.org/alfresco/pr"
           targetNamespace="http://www.alfresco.org/alfresco/pr"
           elementFormDefault="qualified">

  <!– dynamically loads the company footer choices simple type –>
  <xs:include schemaLocation="/media/releases/get_company_footer_choices_simple_type.jsp"/>

  <xs:simpleType name="category">
    <xs:restriction base="xs:normalizedString">
      <xs:enumeration value="Product"/>
      <xs:enumeration value="Partnership"/>
      <xs:enumeration value="Company"/>
      <xs:enumeration value="Event"/>
      <xs:enumeration value="Training"/>
    </xs:restriction>
  </xs:simpleType>

  <!– defines the form for creating a press release –>
  <xs:element name="press_release">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="title" type="xs:normalizedString"/>
        <xs:element name="abstract" type="xs:normalizedString"/>
        <xs:element name="location" type="xs:normalizedString"/>
        <xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
   <xs:element name="include_company_footer" type="pr:company_footer_choices" minOccurs="1" maxOccurs="unbounded"/>
   <xs:element name="include_media_contacts" type="xs:boolean" default="true"/>
   <xs:element name="keywords" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
   <xs:element name="category" type="pr:category" default="Company"/>
   <xs:element name="launch_date" type="xs:date"/>
   <xs:element name="expiration_date" type="xs:date"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

press-release.xsl

<xsl:stylesheet version="1.0"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlnsSmiley Tonguer="http://www.alfresco.org/alfresco/pr"
      xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
      exclude-result-prefixes="xhtml">
  <xslSmiley Surprisedutput method="html"  encoding="UTF-8" indent="yes"
              doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
              doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'/>

  <xslSmiley Tonguereserve-space elements="*"/>

  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
   <!– include common navigation components using SSIs (see web.xml for more information) –>
   <xsl:comment>#include virtual="/assets/include_in_head.html"</xsl:comment>
   <title><xsl:value-of select="/prSmiley Tongueress_release/pr:title"/></title>
   <meta name="description" lang="en" >
     <xsl:attribute name="content"><xsl:value-of select="/prSmiley Tongueress_release/pr:title"/></xsl:attribute>
        </meta>
   <style type="text/css">
     p.leader {
     font-weight: 700;
     }
   </style>
      </head>
      <body>
        <div id="container">
     <xsl:comment>#include virtual="/assets/include_main_navigation.html"</xsl:comment>
     <xsl:comment>#include virtual="/about/navigation.html"</xsl:comment>
     <div id="content">&#160;</div>
     <!– Main Content –>
     <div id="main_content">

       <!– BEGIN MAIN CONTENT –>
       <h1><xsl:value-of select="/prSmiley Tongueress_release/pr:title"/></h1> 
       <p><strong><xsl:value-of select="/prSmiley Tongueress_release/pr:abstract"/></strong></p>
       <p></p>
       <xsl:for-each select="/prSmiley Tongueress_release/pr:body">
         <p>
           <xsl:if test="position()=1"><xsl:value-of select="normalize-space(/prSmiley Tongueress_release/pr:location)"/>&#8212;<xsl:value-of select="normalize-space(/prSmiley Tongueress_release/pr:launch_date)"/>&#8212;</xsl:if><xsl:value-of select="normalize-space(.)" disable-output-escaping="yes"/>
         </p>
       </xsl:for-each>
       <xsl:for-each select="/prSmiley Tongueress_release/pr:include_company_footer">
              <xsl:variable name="cf-id"><xsl:value-of select="."/></xsl:variable>
         <!– load the xml document for the company footer using a built in FormDataFunction –>
         <xsl:variable name="cf" select="alfSmiley TonguearseXMLDocument($cf-id)"/>
              <h2>About <xsl:value-of select="$cf/pr:name"/></h2>
         <xsl:for-each select="$cf/pr:body">
      <p><xsl:value-of select="." disable-output-escaping="yes"/></p>
         </xsl:for-each>
       </xsl:for-each>
       <xsl:if test="/prSmiley Tongueress_release/pr:include_media_contacts='true'">
              <h2>Media Contacts</h2> 
              <div><p>John Newton<br />Alfresco Software Inc.<br />+44 1628 860639<br />press@alfresco.com</p></div>
              <div><p>Chuck Tanowitz<br />Schwartz Communications<br />+1 781 684-0770<br />alfresco@schwartz-pr.com</p></div>
       </xsl:if>
       <!– END MAIN CONTENT –>
       <xsl:element name="a">
         <xsl:attribute name="href">
      <xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.txt')"/>
         </xsl:attribute>
         <xsl:text>view plain text version</xsl:text>
       </xsl:element>
     </div>
     <!– Feature Content –>
     <div id="right_content">
       <div class="box_blue">
         <h2>Press Releases By Category</h2>

         <!– store the current category in a variable for later comparison –>
         <xsl:variable name="my_category"
             select="/prSmiley Tongueress_release/pr:category"/>
         <!– store the current title in a variable for later comparison –>
         <xsl:variable name="my_title"
             select="/prSmiley Tongueress_release/pr:title"/>
         <!– load all press releases into a variable by calling into a form data function –>
         <xsl:variable name="all_press_releases"
             select="alfSmiley TonguearseXMLDocuments('press-release')"/>
         <ul>
      <!– select a unique set of categories for the first level navigation –>
      <xsl:for-each select="$all_press_releases[not(pr:category=preceding-sibling:Smiley TonguerSmiley Tongueress_release/pr:category)]">
        <xsl:sort select="pr:category"/>
        <li>
          <xsl:choose>
            <!– for the current category, present all press releases in this category –>
            <xsl:when test="pr:category=$my_category">
         <b><xsl:value-of select="pr:category"/></b>
         <ul>
           <!– iterate all press releases which are in my_category –>
           <xsl:for-each select="$all_press_releases[pr:category=$my_category]">
             <xsl:sort select="pr:title"/>
             <li>
               <xsl:element name="a">
            <xsl:if test="$my_title=pr:title">
              <xsl:attribute name="style">font-weight:bold;</xsl:attribute>
            </xsl:if>
            <xsl:attribute name="href">
              <xsl:value-of select="fn:replaceAll(string(@alf:file_name), '.xml', '.html')"/>
            </xsl:attribute>
            <xsl:value-of select="pr:title"/>
               </xsl:element>
             </li>
           </xsl:for-each>
         </ul>
            </xsl:when>
            <xslSmiley Surprisedtherwise>
         <!–
         for other categories present a link to the first document in that category
         with the category label
         –>
         <xsl:element name="a">
           <xsl:attribute name="href">
             <xsl:value-of select="fn:replaceAll(string(@alf:file_name), '.xml', '.html')"/>
           </xsl:attribute>
           <xsl:value-of select="pr:category"/>
         </xsl:element>
            </xslSmiley Surprisedtherwise>
          </xsl:choose>
        </li>
      </xsl:for-each>
         </ul>
         <h2>Press Release Archive</h2>
         <ul>
      <li><a href="/media/releases/archives/index.html">View Archived Releases</a></li>
         </ul>
       </div>
     </div>
     <div id="clear">&#160;</div>
   </div>
   <!–All Three End –>
   <xsl:comment>#include virtual="/assets/footer.html"</xsl:comment>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

press-release-plain.ftl

<#ftl ns_prefixes={"D", "http://www.alfresco.org/alfresco/pr"}>

<#macro show_heading heading>
${heading}
<#list 1..heading?length as index>-</#list>
</#macro>

<@show_heading heading="Title: ${press_release.title}"/>

<@show_heading heading="Abstract: ${press_release.abstract}"/>

<#list press_release.body as body>
  <#if body_index = 0>
${press_release.location}–${press_release.launch_date}–
  </#if>
${body?trim}
</#list>
<#list press_release.include_company_footer as cf>
<#assign cf_document=alf.parseXMLDocument(cf)>

<@show_heading heading="About ${cf_document.name}"/>
  <#list cf_document.body as body>
${body?trim}
  </#list>
</#list>
<#if press_release.include_media_contacts = "true">

<@show_heading heading="Media Contacts"/>
John Newton
Alfresco Software Inc.
+44 1628 860639
press@alfresco.com

Chuck Tanowitz
Schwartz Communications
+1 781 684-0770
alfresco@schwartz-pr.com
</#if>


please check out the files and let me know the changes ASAP

Thanks

pmonks
Star Contributor
Star Contributor
Following step 2 of the troubleshooting process outlined at http://forums.alfresco.com/viewtopic.php?t=12395, I see a single include / import in press-release.xsd:

<xs:include schemaLocation="/media/releases/get_company_footer_choices_simple_type.jsp"/>
What I don't see in the set of files you've posted is anything called "get_company_footer_choices_simple_type.jsp", so:
  • Does that file exist in your Web Project?

  • If so, are you able to preview it correctly in the staging sandbox?

  • If so, is the file producing a valid XSD fragment as output?
Cheers,
Peter

heiko_robert
Star Collaborator
Star Collaborator
just steped in the same trap. You need to run virtual_alf to be able to resolve get_company_footer_choices_simple_type.jsp

pmonks
Star Contributor
Star Contributor
As described at http://wiki.alfresco.com/wiki/Forms_Authoring_Guide#Using_multiple_XML_Schema_to_define_a_single_for..., Web Project includes were superseded by Web Script includes in Alfresco 2.2SP3, and have been deprecated as of Alfresco 3.0.  In the interests of forward compatibility I'd encourage the use of Web Script includes exclusively.

Cheers,
Peter