cancel
Showing results for 
Search instead for 
Did you mean: 

Namespace prefix <namespace> is not mapped to a namespace URI

charlie_k
Champ in-the-making
Champ in-the-making
Hello everyone,
I just want to point out that I am new to Alfresco development and it is not going as well as I expected compared to other platforms (maybe this is due to lack of documentation and examples or just my goal to make some Alfresco Share customizations that cannot be easily accomplished).

What I am trying to accomplish:
Create a new content model and expose it via Share for create/import/edit functions (I use Alfresco 4.1.4 enterprise).
I tried lots of stuff and spent quite a lot of time on this. Searched for a solution for this problem (I can find some other posts, that describe similar problems I am facing, but there is no solution to them also). So far I have no luck with this task..

What I've done:
1. created a content model with a couple of custom properties (using alfresco docs and tutorial).
2. added share config file share-config-custom.xml (change actual namespace name with "<namespace>"):


      <config evaluator="string-compare" condition="DocumentLibrary">
      <types>
         <type name="cm:content">
            <subtype name="<namespace>:doc" />
         </type>
      </types>
    
      <create-content>
         <content id="plain-text" label="create-content.text" type="pagelink" index="10" icon="text">
            <param name="page">create-content?destination={nodeRef}&amp;itemId=<namespace>:doc&amp;mimeType=text/plain</param>
         </content>
      </create-content>
   </config>
   
   <config evaluator="node-type" condition="<namespace>:doc">
   <!– copied this section from share-form-config.xml and added my custom properties –>



The result:
When I try to create new document for my custom content I get an error in catalina.log:
ERROR [scripts.forms.FormUIGet] [http-7000-6] org.alfresco.service.namespace.NamespaceException: Namespace prefix <namespace> is not mapped to a namespace URI

My questions:
1) Is there something I am missing (do you have to create some form template or some javascript or make some other configuration options for create/edit functions to work in Share)?
2) What does this error mean (there is no information anywhere how to map a namespace prefix with an uri)?
3) Can I use Share at all for my customization needs (if I will manage to get custom metadata form to work, I will need this form to show up for imported documents too)

Any help will be greatly appreciated!

Best regards,
Charlie
4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

a little bit more context to your problem would help, for example some more log output and your custom content model. In general, this indicates a problem with content model bootstrapping, i.e. somehow your Alfresco does not know how to map the <namespace> prefix (a bit weird for a prefix) to the actual namespace URI that is defined in your content model.

Have you tried working with <a href="http://ecmarchitect.com/archives/2012/01/09/1509">Jeff Potts' tutorial</a>?

Regards
Axel

mitpatoliya
Star Collaborator
Star Collaborator
I advice you not to use simpler prefix without special characters like "<" .
It seems like you are using "<namespace>" as your prefix change it to some normal name it will make life easy.

amurad
Champ in-the-making
Champ in-the-making
Hi,

please let us know how did you resolve the issue?



Thanks

darkredd
Star Contributor
Star Contributor
Hi amurad

Where are you stuck? supply more details partaining to yourr problem. Make sure your context file (i.e. *context.xml) is registering your content model you defined.