04-03-2017 04:53 PM
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
04-04-2017 03:14 AM
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.
04-04-2017 08:56 AM
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="myublishedDate">
<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
04-04-2017 10:04 AM
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...
04-04-2017 10:17 AM
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="myublishedDate">
<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
04-04-2017 10:56 AM
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
04-04-2017 11:48 AM
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?
04-04-2017 04:39 PM
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.
04-04-2017 05:10 PM
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
04-05-2017 05:45 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.