AnsweredAssumed Answered

error prefix is not registered for uri

Question asked by felipealamos on Jan 29, 2013
Latest reply on Jan 29, 2013 by felipealamos
hola

junto con saludarlos dejo mi problema, para que puedan darme una ayuda

tengo dos modelos de aspecto uno con el prefix "pub" y otro con el prefix "pubb" los dos modelos son idénticos solo cambia el prefix
el modelo con prefix "pubb" funciona bien sin problemas pero el aspecto con el prefix "pub" arroja error de "namespace prefix is not registered for uri "pub.new.moel"

dejo  los dos modelos en rar y el log
alfresco vercion 4.0.2.9
Muchas Gracias por la ayuda


__________________________________________Log_________________________

12:58:38,991 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri pub.new.model
   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:414)
   at org.alfresco.cmis.dictionary.CMISStrictDictionaryService.createTypeDefs(CMISStrictDictionaryService.java:68)
   at org.alfresco.cmis.dictionary.CMISStrictDictionaryService.createDefinitions(CMISStrictDictionaryService.java:50)
   at org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.init(CMISAbstractDictionaryService.java:398)
   at org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.afterDictionaryInit(CMISAbstractDictionaryService.java:487)
   at org.alfresco.cmis.dictionary.CMISAbstractDictionaryService.onBootstrap(CMISAbstractDictionaryService.java:505)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


——————————–modelo pub——————————-
                              custom-model-context.xml 

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                        
         <value>alfresco/extension/publicaciones.xml</value>
                          
            </list>
        </property>
    </bean>
        
</beans>


     
                                publicaciones.xml
                            

<?xml version="1.0" encoding="UTF-8"?>
<model name="pub:pubnewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> 
   <description>Indices de Intranet</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>
   <namespaces>
   <!– Define a Namespace for my new definitions –>
      <namespace uri="pub.new.model" prefix="pub"/>
   </namespaces>
   <!– Type and Aspect definitions go here –>
   <aspects>
      <aspect name="pub:publicaciones">
         <title>Otras Publicaciones</title>
         <properties>
            <property name="pub:division">
               <title>Division</title>
               <type>d:text</type>
                <mandatory>true</mandatory>
            </property>
            
            <property name="pub:tipo_doc">
               <title>Tipo de documento</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            
            <property name="pub:area">
               <title>Area</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            
            <property name="pub:codigo">
               <title>Codigo</title>               
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="pub:nom_doc">
               <title>Nombre del documento</title>               
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>               
            
         </properties>
      </aspect>
   </aspects>
</model>



                                   web-client-config-custom.xml

<alfresco-config>


<!– Example of configuring advanced search –>
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            
            <type name="pub:publicaciones"/>
      
      
         </content-types>
         <folder-types>
     
      </folder-types>
         <custom-properties>
            <meta-data type="cm:dictionaryModel" property="cm:modelAuthor"/>

         
            <meta-data aspect="pub:publicaciones" property="pub:division"/>
            <meta-data aspect="pub:publicaciones" property="pub:tipo_doc"/>
            <meta-data aspect="pub:publicaciones" property="pub:area"/>
            <meta-data aspect="pub:publicaciones" property="pub:codigo"/>
            <meta-data aspect="pub:publicaciones" property="pub:nom_doc"/>
            
                  
            <meta-data type="cm:dictionaryModel" property="cm:modelPublishedDate"/>
         </custom-properties>
      </advanced-search>
   </config>
     

      
      
   
<!–felipe   –>
   <config evaluator="aspect-name" condition="pub:publicaciones">   
      <property-sheet>
         <show-property name="pub:division"/>
         <show-property name="pub:tipo_doc"/>
         <show-property name="pub:area"/>
         <show-property name="pub:codigo"/>         
         <show-property name="pub:nom_doc"/>
      </property-sheet>
   </config>
      
   
<config evaluator="string-compare" condition="Action Wizards">
      <aspects>

         
         <!–felipe –>
         <aspect name="pub:publicaciones"/>
      
    </aspects>
   </config>

</alfresco-config>


_______________________________________MODELO pubb____________________________________________________
                                    custom-model-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                        
         <value>alfresco/extension/publicaciones.xml</value>
                          
            </list>
        </property>
    </bean>
        
</beans>

                                        publicaciones.xml

<?xml version="1.0" encoding="UTF-8"?>
<model name="pubb:pubbnewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> 
   <description>Indices de Intranet</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>
   <namespaces>
   <!– Define a Namespace for my new definitions –>
      <namespace uri="pubb.new.model" prefix="pubb"/>
   </namespaces>
   <!– Type and Aspect definitions go here –>
   <aspects>
      <aspect name="pubb:publicaciones">
         <title>Otras Publicaciones</title>
         <properties>
            <property name="pubb:division">
               <title>Division</title>
               <type>d:text</type>
                <mandatory>true</mandatory>
            </property>
            
            <property name="pubb:tipo_doc">
               <title>Tipo de documento</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            
            <property name="pubb:area">
               <title>Area</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            
            <property name="pubb:codigo">
               <title>Codigo</title>               
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="pubb:nom_doc">
               <title>Nombre del documento</title>               
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>               
            
         </properties>
      </aspect>
   </aspects>
</model>


                                        web-client-config-custom.xml

<alfresco-config>


<!– Example of configuring advanced search –>
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            
            <type name="pubb:publicaciones"/>
      
      
         </content-types>
         <folder-types>
     
      </folder-types>
         <custom-properties>
            <meta-data type="cm:dictionaryModel" property="cm:modelAuthor"/>

         
            <meta-data aspect="pubb:publicaciones" property="pubb:division"/>
            <meta-data aspect="pubb:publicaciones" property="pubb:tipo_doc"/>
            <meta-data aspect="pubb:publicaciones" property="pubb:area"/>
            <meta-data aspect="pubb:publicaciones" property="pubb:codigo"/>
            <meta-data aspect="pubb:publicaciones" property="pubb:nom_doc"/>
            
                  
            <meta-data type="cm:dictionaryModel" property="cm:modelPublishedDate"/>
         </custom-properties>
      </advanced-search>
   </config>
     

      
      
   
<!–felipe   –>
   <config evaluator="aspect-name" condition="pub:publicaciones">   
      <property-sheet>
         <show-property name="pub:division"/>
         <show-property name="pub:tipo_doc"/>
         <show-property name="pub:area"/>
         <show-property name="pub:codigo"/>         
         <show-property name="pub:nom_doc"/>
      </property-sheet>
   </config>
      
   
<config evaluator="string-compare" condition="Action Wizards">
      <aspects>

         
         <!–felipe –>
         <aspect name="pub:publicaciones"/>
      
    </aspects>
   </config>

</alfresco-config>

Outcomes