A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

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

A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

Hi All,

I am using Alfresco 4.1 enterprise edition and getting below error. I want to know how where to look for the

root cause and what is the solution.

Error in catalina.out :-

2017-12-15 11:39:53,039 ERROR [extensions.webscripts.AbstractRuntime] [http-8080-23] Exception from executeScript - redirecting to status template error: 11153133 Wrapped Exception (with status template): 111536644 Error during processing of the template 'A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'. Please contact your system administrator.
org.springframework.extensions.webscripts.WebScriptException: 11153133 Wrapped Exception (with status template): 111536644 Error during processing of the template 'A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'. Please contact your system administrator.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1050)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:417)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:479)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:517)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.service.cmr.repository.TemplateException: 111536644 Error during processing of the template 'A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'. Please contact your system administrator.
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:206)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:879)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
... 25 more
Caused by: org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0
at org.alfresco.service.namespace.QName.toPrefixString(QName.java:414)
at org.alfresco.cmis.mapping.CMISMapping.getCmisTypeId(CMISMapping.java:369)
at org.alfresco.cmis.mapping.CMISMapping.getCmisTypeId(CMISMapping.java:406)
at org.alfresco.cmis.dictionary.CMISStrictDictionaryService.createTypeDefs(CMISStrictDictionaryService.java:68)
at org.alfresco.cmis.dictionary.CMISStrictDictionaryService.createDefinitions(CMISStrictDictionaryService.java:48)
at org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.init(CMISAbstractDictionaryService.java:418)
at org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.getRegistry(CMISAbstractDictionaryService.java:233)
at org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.findProperty(CMISAbstractDictionaryService.java:361)
at org.alfresco.cmis.mapping.CMISServicesImpl.getProperty(CMISServicesImpl.java:901)
at org.alfresco.repo.cmis.rest.CMISPropertyValueMethod.exec(CMISPropertyValueMethod.java:118)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Assignment.accept(Assignment.java:90)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Macro$Context.runMacro(Macro.java:172)
at freemarker.core.Environment.visit(Environment.java:614)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:202)
... 28 more

Thanks,

Fouad

6 Replies
fouada
Active Member II

Re: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

Please let me know if there any more information needed.

Thanks,

Fouad

4535992
Senior Member

Re: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

i have some time ago a similar issue to yours, can you tell me is the model is a customize one? and if is not a problem show me the code?

Make sure on your model you correctely set up the uri with the namespace like this:

If is a customized one:

<model>

...

<!-- Introduction of new namespaces defined by this model -->
   <!-- NOTE: The following namespace my.new.model should be changed to reflect your own namespace -->
   <namespaces>
      <namespace uri="http://www.alfresco.org/model/publishingworkflow/1.0" prefix="psg"/>
   </namespaces>

...

</model>

If is a alfresco native:

<model>

...

<!-- Imports are required to allow references to definitions in other models -->   
   <imports>
         <!-- Import Alfresco Dictionary Definitions -->
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!-- Import Alfresco Content Domain Model Definitions -->
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>

       <import uri="http://www.alfresco.org/model/publishingworkflow/1.0" prefix="psg"/>
   </imports>

...

</model>

fouada
Active Member II

Re: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

Hi Marco,

Yes , I am using custom content model and defined namespace like below.

<model name="gcm:mymodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

<!-- Optional meta-data about the model -->
<description>My Content Model</description>
<author>Fouad</author>
<version>1.0</version>

<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
</imports>

<namespaces>
<namespace uri="my.content.model" prefix="gcm" />
</namespaces>

But the exception is coming for http://www.alfresco.org/model/publishingworkflow/1.0 workflow 

and I have not defined any workflow in my alfresco.

The exception is coming in the production server and alfresco is integrated with other application

using CMIS API.

Below is the error which is logged in alfresco when they have tried any operation

How would I know what operation is being done by them? And can they create a workflow using CMIS API?

2017-12-15 11:40:02,869 ERROR [impl.atompub.CmisAtomPubServlet] [http-8080-23] A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0
at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy258.query(Unknown Source)
at org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.query(CmisServiceWrapper.java:1031)
at org.apache.chemistry.opencmis.server.impl.atompub.DiscoveryService.query(DiscoveryService.java:126)
at sun.reflect.GeneratedMethodAccessor1037.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:92)
at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.dispatch(CmisAtomPubServlet.java:229)
at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:178)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0
at org.alfresco.service.namespace.QName.toPrefixString(QName.java:414)
at org.alfresco.opencmis.mapping.CMISMapping.getCmisTypeId(CMISMapping.java:233)
at org.alfresco.opencmis.dictionary.CMISStrictDictionaryService.createTypeDefs(CMISStrictDictionaryService.java:69)
at org.alfresco.opencmis.dictionary.CMISStrictDictionaryService.createDefinitions(CMISStrictDictionaryService.java:44)
at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.init(CMISAbstractDictionaryService.java:408)
at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.getRegistry(CMISAbstractDictionaryService.java:242)
at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.findTypeByQueryName(CMISAbstractDictionaryService.java:311)
at org.alfresco.opencmis.search.CMISQueryParser.buildSource(CMISQueryParser.java:1440)
at org.alfresco.opencmis.search.CMISQueryParser.parse(CMISQueryParser.java:138)
at org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl.query(SolrOpenCMISQuer

Thanks,

Fouad

4535992
Senior Member

Re: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

Not sure if this solution work with the version 4.1 try this:

<model name="gcm:mymodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

<!-- Optional meta-data about the model -->
<description>My Content Model</description>
<author>Fouad</author>
<version>1.0</version>

<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />

<!-- add these two imports -->

<import uri="http://www.alfresco.org/model/publishing/1.0 " prefix="pub" />

<import uri="http://www.alfresco.org/model/publishingworkflow/1.0 " prefix="pubwf" />
</imports>

<namespaces>
<namespace uri="my.content.model" prefix="gcm" />
</namespaces>

fouada
Active Member II

Re: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

Thanks Marco for your suggestion, But we are using this content model for 4 years and this issue came first time.

And importing below is needed when I need properties of these model or is it compulsory?

<import uri="http://www.alfresco.org/model/publishing/1.0 " prefix="pub" />

<import uri="http://www.alfresco.org/model/publishingworkflow/1.0 " prefix="pubwf" />

douglascrp
Advanced II

Re: A namespace prefix is not registered for uri http://www.alfresco.org/model/publishingworkflow/1.0'.

The only thing I can imagine causing that kind of problem is if someone has deployed any kind of customizations inside the alfresco expanded folder, and then after a redeploy (tomcat expanding the war file), that change got lost.

That would explain why it worked for 4 years, and now it doesn't work anymore.