Qname error in nodeBrowser

cancel
Showing results for 
Search instead for 
Did you mean: 
titto
Member II

Qname error in nodeBrowser

Hi all,

When I navigate to the nodeBrowser I obtain this error when I enter inside company_home

and inside the log I see this stacktrace:

The failing instruction (print stack trace for 3 more):
==> ${n.QName}  [in template "org/alfresco/repository/admin/support-tools/admin-nodebrowser.get.html.ftl" at line 149, column 94]
 at freemarker.ext.beans.BeanModel.get(BeanModel.java:222) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Dot._eval(Dot.java:76) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Expression.eval(Expression.java:111) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Expression.evalAndCoerceToString(Expression.java:115) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.DollarVariable.accept(DollarVariable.java:76) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.MixedContent.accept(MixedContent.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:193) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visitIteratorBlock(Environment.java:509) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.IteratorBlock.accept(IteratorBlock.java:103) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.MixedContent.accept(MixedContent.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visitByHiddingParent(Environment.java:286) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:86) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.MixedContent.accept(MixedContent.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:487) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.BodyInstruction.accept(BodyInstruction.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.MixedContent.accept(MixedContent.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.IfBlock.accept(IfBlock.java:84) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.MixedContent.accept(MixedContent.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Macro$Context.runMacro(Macro.java:209) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:694) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.UnifiedCall.accept(UnifiedCall.java:116) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.MixedContent.accept(MixedContent.java:93) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.visit(Environment.java:265) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.core.Environment.process(Environment.java:243) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:230) [alfresco-repository-5.1.2.jar:5.1.2]
 at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:967) [spring-webscripts-6.8.jar:6.8]
 at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267) [spring-webscripts-6.8.jar:6.8]
 at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147) [spring-webscripts-6.8.jar:6.8]
 at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:512) [alfresco-remote-api-5.1.2.jar:5.1.2]
 at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464) [alfresco-repository-5.1.2.jar:5.1.2]
 at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587) [alfresco-remote-api-5.1.2.jar:5.1.2]
 at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656) [alfresco-remote-api-5.1.2.jar:5.1.2]
 at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428) [alfresco-remote-api-5.1.2.jar:5.1.2]
 at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308) [alfresco-remote-api-5.1.2.jar:5.1.2]
 at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399) [spring-webscripts-6.8.jar:6.8]
 at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210) [spring-webscripts-6.8.jar:6.8]
 at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) [spring-webscripts-6.8.jar:6.8]
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93) [alfresco-aos-repo-binding.jar:]
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68) [classes:]
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.13.Final-redhat-2.jar:7.5.13.Final-redhat-2]
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:656) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.20.Final-redhat-1.jar:7.5.20.Final-redhat-1]
 at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
 at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
 at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:912) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.ext.beans.BeanModel.invokeThroughDescriptor(BeanModel.java:275) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 at freemarker.ext.beans.BeanModel.get(BeanModel.java:182) [freemarker-2.3.20-alfresco-patched.jar:2.3.20]
 ... 66 more
Caused by: org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri atf.translation.model
 at org.alfresco.service.namespace.QName.toPrefixString(QName.java:424) [alfresco-data-model-5.1.2.jar:5.1.2]
 at org.alfresco.repo.web.scripts.admin.NodeBrowserPost$ChildAssocRefWrapper.getQName(NodeBrowserPost.java:1036) [alfresco-remote-api-5.1.2.jar:5.1.2]
 ... 73 more

13:50:33,778 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] (http-172.17.186.39:8580-1) Exception from executeScript: 02150000 Wrapped Exception (with status template): 02150082 Error during processing of the template 'get(QName) failed on instance of org.alfresco.repo.web.scripts.admin.NodeBrowserPost$ChildAssocRefWrapper. See cause exception.

by the way... atf.translation.model is a custom .amp repo installed inside alfresco.war and the model works fine with the previous version of alfresco... I suspect something is wrong in that file...

here the model:

<model name="atf:TranslationModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
    <description>ATF Model for translations</description>
    <author>Sebastien Roche (AHP)</author>
    <version>1.0</version>

    <imports>
        <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
        <!-- Import Alfresco Dictionary Definitions -->
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl" />
        <!-- Import Alfresco Content Domain Model Definitions -->
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>

    <namespaces>
        <!-- Name space for ATF -->
        <namespace uri="atf.translation.model" prefix="atf" />
    </namespaces>

    <constraints>
      <constraint name="atf:translatorConstraint" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Translations.com</value>
                </list>
            </parameter>
        </constraint>
      <constraint name="atf:targetStatusConstraint" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Started</value>
                    <value>Submitted</value>
                    <value>FailedSubmit</value>
                    <value>PartiallyCompleted</value>
                    <value>Completed</value>
                    <value>Delivered</value>
                    <value>StartedCancel</value>
                    <value>Canceled</value>
                    <value>FailedCancel</value>
                    <value>Undelivered</value>
                </list>
            </parameter>
        </constraint>
        <constraint name="atf:statusConstraint" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Pending</value>
                    <value>Success</value>
                    <value>Error</value>
                </list>
            </parameter>
        </constraint>
    </constraints>
   
    <types>
   
       <!-- Base Types -->       
        <type name="atf:TargetType">
            <title>A target</title>
            <parent>cm:folder</parent>
            <archive>false</archive>
            <properties>
                <property name="atf:TargetLanguage">
                    <title>A language</title>
                    <type>d:locale</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="atf:TargetHighPriority">
                    <title>If required rush mode</title>
                    <type>d:boolean</type>
                    <mandatory>false</mandatory>
                </property>
                <property name="atf:TargetInstructions">
                    <title>Instructions for translator</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                </property>
                    <property name="atf:InternalId">
                    <title>Internal Id within ATF (unique)</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                </property>
                <property name="atf:TargetStatus">
                    <title>TargetStatus</title>
                    <type>d:text</type>
                    <default>Started</default>
                    <constraints>
                       <constraint ref="atf:targetStatusConstraint" />
                    </constraints>
                </property>
                <property name="atfSmiley FrustratedubmissionId">
                    <title>submission id from the provider</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                </property>
                <property name="atfSmiley Very HappyocumentId">
                    <title>document id from the provider</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                </property>
            </properties>
            <associations>
               <child-association name="atf:Text">
                  <source>
                      <mandatory>true</mandatory>
                      <many>false</many>
                  </source>
                  <target>
                     <class>atf:TextType</class>
                     <mandatory>false</mandatory>
                     <many>false</many>
                  </target>
               </child-association>
            </associations>
        </type>
   
       <!-- Main Folder Types -->
       <type name="atf:RequestorType">
            <title>Folder per requestor</title>
            <parent>cm:folder</parent>
            <archive>false</archive>
            <mandatory-aspects>
                <aspect>atf:RequestorIdentifierAspect</aspect>
            </mandatory-aspects>
        </type>
        <type name="atf:ContextType">
            <title>Folder per context Id</title>
            <parent>cm:folder</parent>
            <archive>false</archive>
            <mandatory-aspects>
                <aspect>atf:ContextIdentifierAspect</aspect>
            </mandatory-aspects>
        </type>
        <type name="atf:TranslationType">
            <title>Folder per translation</title>
            <parent>cm:folder</parent>
            <archive>false</archive>
            <properties>
                <property name="atf:Translator">
                    <title>Translation company</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <default>Translations.com</default>
                    <constraints>
                       <constraint ref="atf:translatorConstraint" />
                    </constraints>
                </property>
                <property name="atf:ClientCode">
                    <title>Client code within translation company</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="atfSmiley FrustratedourceLanguage">
                    <title>Source language</title>
                    <type>d:locale</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="atfSmiley Frustratedtatus">
                    <title>Status</title>
                    <type>d:text</type>
                    <default>Pending</default>
                    <constraints>
                       <constraint ref="atf:statusConstraint"/>
                    </constraints>
                </property>
                <property name="atf:ContentLabel">
                    <title>Content label (eg: short description)</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                </property>
            </properties>
            <associations>
               <child-association name="atf:TargetLanguages">
                  <source>
                      <mandatory>true</mandatory>
                      <many>false</many>
                  </source>
                  <target>
                     <class>atf:TargetType</class>
                     <mandatory>true</mandatory>
                     <many>true</many>
                  </target>
               </child-association>
               <child-association name="atf:TextSource">
                  <source>
                      <mandatory>true</mandatory>
                      <many>false</many>
                  </source>
                  <target>
                     <class>atf:TextType</class>
                     <mandatory>false</mandatory>
                     <many>false</many>
                  </target>
               </child-association>
            </associations>
        </type>
        <!-- Text Type -->
        <type name="atf:TextType">
            <title>A text file per language</title>
            <parent>cm:content</parent>
            <archive>false</archive>
            <properties>
                <property name="atf:MD5">
                    <title>MD5 checksum of the text</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                </property>
                <property name="atf:WordCount">
                    <title>Number of words</title>
                    <type>d:int</type>
                    <mandatory>false</mandatory>
                </property>
            </properties>
            <mandatory-aspects>
                <aspect>cm:versionable</aspect>
            </mandatory-aspects>
         </type>


    </types>
   
    <aspects>
        <aspect name="atf:RequestorIdentifierAspect">
            <properties>
                <property name="atf:RequestorCode">
                    <title>Requestor Code</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <index enabled="true">
                        <atomic>true</atomic>
                        <stored>false</stored>
                        <tokenised>true</tokenised>
                    </index>
                </property>
            </properties>
        </aspect>
        <aspect name="atf:ContextIdentifierAspect">
            <properties>
                <property name="atf:ContextCode">
                    <title>Context Code</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <index enabled="true">
                        <atomic>true</atomic>
                        <stored>false</stored>
                        <tokenised>true</tokenised>
                    </index>
                </property>
            </properties>
            <mandatory-aspects>
                <aspect>atf:RequestorIdentifierAspect</aspect>
            </mandatory-aspects>
        </aspect>
       
    </aspects>
   
</model>

thank you in advice if you can help me with this issue!

2 Replies
afaust
Master

Re: Qname error in nodeBrowser

The error often occurs when a model has not been bootstraped. Can you check the Spring context files that the model is properly registered during server startup, and check if the Spring context file that is supposed to register is is itself properly loaded?

titto
Member II

Re: Qname error in nodeBrowser

Hi Alex, thank you for your response.

this .amp component was tested with Junit and RAD with maven.

inside bootstrap-context.xml bean are correctly defined in this snippet:

   

<bean id="atf.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/module/${project.artifactId}/model/content-model.xml</value>
                <value>alfresco/module/${project.artifactId}/model/workflow-model.xml</value>      
                <value>alfresco/module/${project.artifactId}/model/atfModel.xml</value>

            </list>
        </property>
    </bean>

your suggestion sounds very good, but.... how I can check to verify if the model is started correclty? In the log I don't see nothing related.