cancel
Showing results for 
Search instead for 
Did you mean: 

custom is not mapped to a namespace URI

johan1974
Champ in-the-making
Champ in-the-making
Hello,

I have the following Custommodel

<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

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

   <!– Optional meta-data about the model –>  
   <description>Custom Model</description>
   <author></author>
   <version>1.0</version>

   <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>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
   <namespaces>
      <namespace uri="custom.model" prefix="custom"/>
   </namespaces>
    


<types>
    <type name="custom:Personeelsdossiers">
        <title>Personeelsdossiers</title>
        <parent>cm:content</parent>
        <properties>
                <property name="custom:Name1">
                    <title>Name1</title>
                    <type>d:text</type>
                </property>
                <property name="custom:Name2">
                    <title>Name2</title>
                    <type>d:text</type>
                </property>
        </properties>
    </type>
</types>
<aspects>
    <aspect name="; custom:Personeelsdossiers">
        <title>Personeelsdossiers"</title>
        <properties>
                <property name="custom:Dossiernummer">
                    <title>Dossiernummer</title>
                    <type>d:text</type>
                </property>
                <property name="custom:Documenttype">
                    <title>Documenttype</title>
                    <type>d:text</type>
                </property>
        </properties>
    </aspect>
</aspects>

</model>

And the folowing web-client-config-custom.xml

<alfresco-config>

<!– Lists the custom aspect in business rules action wizard –>
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
    <aspect name="custom:Personeelsdossiers"/>
</aspects>
<subtypes>
    <type name="custom:Personeelsdossiers"/>
  </subtypes>
  </config>
  <!– Displays the properties in view details page –>
  <config evaluator="aspect-name" condition="custom:Personeelsdossiers">
  <property-sheet>
  <separator name="sepCust1" display-label="Personeelsdossiers" component-generator=" HeaderSeparatorGenerator"/>
  <show-property name="custom:Name1" />
  <show-property name="custom:Name2" />
  </property-sheet>
  </config>

</alfresco-config>

I keep getting the following error :

Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix ; custom is not mapped to a namespace URI

But i don't see anything where it might go wrong, who can help?

Thnx!!
3 REPLIES 3

mikef
Champ in-the-making
Champ in-the-making
Turn on model debug by adding this line to webapps\alfresco\WEB-INF\classes\log4j.properties

log4j.logger.org.alfresco.repo.dictionary.DictionaryDAO=info

This will provide details of any standard or custom models that are being loaded to the console/log. Check you can see your model being loaded. If not, there is obviously a problem in your model config, probably a missing *-context.xml config file to load your model.

piousbox
Champ in-the-making
Champ in-the-making
hey, have you solved it? I'm having a similar problem. The namespace appears to be defined in my model, but I get the same error. I am not using a *-context.xml file, I deploy via the workflow console and the repoadmin console.

cbaus
Champ in-the-making
Champ in-the-making
Hello,

i think the problem is this one:

    <aspect name="; custom:Personeelsdossiers">


@piousbox
please post your model 🙂


lg
Chris