custom Data list , error imported as it is not defined (with prefix dl

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

custom Data list , error imported as it is not defined (with prefix dl

Estimados

recurro a ustedes ya que desconozco la causa de este error , creo que el modelo esta bueno y en las rutas correctas  adjunto modelo y log del error  espero su ayuda 

shared\classes\alfresco\extension\pruebamodelo.xml

desde ya gracias 

10 Replies
Highlighted
Intermediate

Re: custom Data list , error imported as it is not defined (with prefix dl

Buenos días.

¿Puedes compartnirnos el contenido de pruebamodelo.xml y del model-context.xml con el bean que lo incluye? Así mismo, si puedes comparte también el error completo con notros (incluye el "Caused by").

Un saludo,

Cristina.

Highlighted
Member II

Re: custom Data list , error imported as it is not defined (with prefix dl

hola gracias 

Están como adjunto de todas formas lo dejo como texto.

########################### pruebamodelo.xml####################

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

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


<description>Example custom Model</description>
<author></author>
<version>1.0</version>


<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
<import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
</imports>


<namespaces>
<namespace uri="http://www.acme.org/model/datalist/1.0" prefix="my"/>
</namespaces>


<types>
<type name="my:sop">
<title>funciona</title>
<parent>dl:datalist</parent>
<properties>
<property name="mySmiley TongueublishedDate">
<title>uno</title>
<type>d:datetime</type>
</property>
<property name="my:authorisedBy">
<title>dos</title>
<type>d:text</type>
</property>
</properties>
</type>
</types>
</model>

#################################model context ############################

<?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/testGdox-model.xml</value>
<value>alfresco/extension/pruebamodel.xml</value>
</list>


</property>
</bean>
</beans>

##################################### error ##############################

2017-04-03 18:01:21,481 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\alfresco-community\tomcat\shared\classes\alfresco\extension\custom-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 03030001 Could not import bootstrap model 'alfresco/extension/pruebamodel.xml'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 03030001 Could not import bootstrap model 'alfresco/extension/pruebamodel.xml'
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:180)
at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
... 26 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 03030000 Failed to compile model 'my:mynewmodel'
at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:126)
at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:174)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModelImpl(DictionaryDAOImpl.java:273)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:260)
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:176)
... 34 more
Caused by: org.alfresco.service.namespace.NamespaceException: URI http://www.alfresco.org/model/datalist/1.0 cannot be imported as it is not defined (with prefix dl
at org.alfresco.repo.dictionary.CompiledModel.createLocalPrefixResolver(CompiledModel.java:224)
at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:148)
at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:106)
... 38 more

Highlighted
Alfresco Employee

Re: custom Data list , error imported as it is not defined (with prefix dl

Cambia

<parent>dl:datalist</parent>

por 

<parent>dl:dataListItem</parent>

Puedes encontrar un ejemplo en https://github.com/keensoft/alfresco-datalist-constraints/blob/master/datalist-model-repo/src/main/a...

Software Engineer in Alfresco Search Team.
Highlighted
Member II

Re: custom Data list , error imported as it is not defined (with prefix dl

el mismo error  =(

#################### modelo ##################

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

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


<description>Example custom Model</description>
<author></author>
<version>1.0</version>


<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
<import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
</imports>


<namespaces>
<namespace uri="http://www.alfresco.com/model/datalistmodel/1.0" prefix="my"/>
</namespaces>


<types>
<type name="my:sop">
<title>funciona</title>
<parent>dl:dataListItem</parent>
<properties>
<property name="mySmiley TongueublishedDate">
<title>uno</title>
<type>d:datetime</type>
</property>
<property name="my:authorisedBy">
<title>dos</title>
<type>d:text</type>
</property>
</properties>
</type>
</types>
</model>

############# error ###############

abr 04, 2017 11:13:53 AM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Excepción enviando evento inicializado de contexto a instancia de escuchador de clase org.alfresco.repo.webdav.WebDAVSessionListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\alfresco-community\tomcat\shared\classes\alfresco\extension\custom-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 03040001 Could not import bootstrap model 'alfresco/extension/pruebamodel.xml'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 03040001 Could not import bootstrap model 'alfresco/extension/pruebamodel.xml'
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:180)
at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
... 26 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 03040000 Failed to compile model 'my:mynewmodel'
at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:126)
at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:174)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModelImpl(DictionaryDAOImpl.java:273)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:260)
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:176)
... 34 more
Caused by: org.alfresco.service.namespace.NamespaceException: URI http://www.alfresco.org/model/datalist/1.0 cannot be imported as it is not defined (with prefix dl
at org.alfresco.repo.dictionary.CompiledModel.createLocalPrefixResolver(CompiledModel.java:224)
at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:148)
at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:106)
... 38 more

Highlighted
Member II

Re: custom Data list , error imported as it is not defined (with prefix dl

final mente instale otro alfresco "alfresco-enterprise-4.1.5-installer-win-x32" y funciona bien 

el alfresco anterior era  el alfresco-community-installer-201702-win-x64.exe

 pero si es con <parent>dl:dataListItem</parent>  

Gracias raro que lo mismo no resulte en uno y si en el otro,

saludos 

Highlighted
Intermediate

Re: custom Data list , error imported as it is not defined (with prefix dl

Creo que vienen por aquí los tiros:

Caused by: org.alfresco.service.namespace.NamespaceException: URI http://www.alfresco.org/model/datalist/1.0 cannot be imported as it is not defined (with prefix dl

Rebuscando por google creo que tiene que ver con la SDK 2.2.0 (enlace). Eso explicaría por qué en una versión 4.1.5 (de hace años) funciona y en una más reciente no. De todas formas po curiosidad, ¿cómo haces el despliegue? ¿usas maven?

Highlighted
Member II

Re: custom Data list , error imported as it is not defined (with prefix dl

como quedaría el modelo de la lista de datos  para versiones mas nuevas ?

 la verdad es que no quiero ir a instalar en el cliente y que no funcione.

Highlighted
Member II

Re: custom Data list , error imported as it is not defined (with prefix dl

el alfresco del cliente es el Alfresco  one   (Enterprise v5.1.1)  estoy buscando pero no lo encuentro,  solo encuentro ALFRESCO CONTENT  (Alfresco Share v5.2.e)  despliego por el tomcat y  los modelos en tomcat\shared\classes\alfresco\extension

Highlighted
Intermediate

Re: custom Data list , error imported as it is not defined (with prefix dl

Buenas Felipe.

Te he enviado un mp. A ver si podemos conectarnos y le echo un vistazo en vivo y directo (porque a veces ahorramos mucho tiempo si hablamos directamente).

Un saludo.