Error al crear un Modelo.

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

Error al crear un Modelo.

Buenos dias, estoy tratando de crear modelo super sencillo , tomando desde internet: https://codigoutil.wordpress.com/alfresco/tipo-de-contenido-personalizado/
1- Archivo RegAsocModel.xml
   <?xml version='1.0' encoding='UTF-8'?>

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

<description>Custom Model para Registro de Asociaciones</description>

<author>Pablo</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"/>

</imports>

<namespaces>

<namespace uri = "modelo.regasoc" prefix = "prueba"/>

</namespaces>

<types>

<type name = "prueba:regasoc">

<title>Registro de Asociaciones</title>

   <parent>cm:content</parent>

      <mandatory-aspects>

         <aspect>prueba:aspectRegasoc</aspect>

      </mandatory-aspects>

</type>

</types>

<aspects>

<!–   Aspect para el tipo folderEspecialidad–>

<aspect name = "prueba:aspectRegasoc">

   <title>Titulo</title>

   <properties>

      <property name = "prueba:nregistro">

         <title>Nº Registro</title>

         <type>d:text</type>

      </property>

      <property name = "prueba:nombre">

         <title>Nombre</title>

         <type>d:text</type>

      </property>

      <property name = "prueba:nexpediente">

         <title>Nº Expediente</title>

         <type>d:text</type>

      </property>

      <property name = "prueba:seccion">

         <title>Sección</title>

         <type>d:int</type>

      </property>

      <property name = "prueba:tipoImagen">

         <title>Tipo de Imagen</title>

         <type>d:text</type>

      </property>

</properties>

</aspect>

</aspects>

</model>


2- Archivo RegAsocModel-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 default-lazy-init="false" default-autowire="no" default-dependency-check="none">
    <bean id = "extension.dictionaryBootstrap" parent = "dictionaryModelBootstrap" depends-on = "dictionaryBootstrap">
     <property name = "models">
       <list>
            <value>alfresco/extension/RegAsocModel.xml</value>

         </list>

     </property>

</bean>

</beans>

3- Archivo share-config-custom

<config evaluator = "string-compare" condition = "Action Wizards">

         <subtypes>

            <type name = "prueba:regasoc"/>

            </subtypes>

      <aspects>

         <aspect name = "prueba:aspectRegasoc"/>

       </aspects>

      <especialise-types>

         <type name = "prueba:regasoc"/>

         </especialise-types>

</config>

<config evaluator = "string-compare" condition = "Content Wizards">

   <content-types>

      <type name = "prueba:regasoc" />

   </content-types>

</config>

    <config evaluator = "node-type" condition = "prueba:regasoc">

      <property-sheet>

         <show-property name = "prueba:nregistro"/>
         <show-property name = "prueba:nombre"/>
         <show-property name = "prueba:nexpediente"/>
         <show-property name = "prueba:seccion"/>
         <show-property name = "prueba:tipoImagen"/>

   </property-sheet>

   </config>

<config evaluator = "aspect-name" condition ="prueba:aspectRegasoc">

   <property-sheet>
      
      <show-property name= "prueba:nregistro"/>
   
      <show-property name= "prueba:nombre"/>

      <show-property name= "prueba:nexpediente"/>

      <show-property name= "prueba:seccion"/>

      <show-property name= "prueba:tipoImagen"/>

   </property-sheet>

</config>   
   
<config evaluator= "string-compare" condition = "Advanced Search">

   <advanced-search>

      <content-types>

            <type name= "prueba:regasoc" />

      </content-types>

   <custom-properties>

         <meta-data aspect= "prueba:aspectRegasoc" property= "prueba:nregistro" />

         <meta-data aspect= "prueba:aspectRegasoc" property= "prueba:nombre" />

         <meta-data aspect= "prueba:aspectRegasoc" property= "prueba:nexpediente" />

         <meta-data aspect= "prueba:aspectRegasoc" property= "prueba:seccion" />

         <meta-data aspect= "prueba:aspectRegasoc" property= "prueba:tipoImagen" />

      </custom-properties>

   </advanced-search>



Estas son las modificaciones que estos realizdo, en el momento reinicar el alfresco e intentar me da un pantallazo en blanco. Reviso los log y me aparece el siguiente error que no logro solucionarlo:


SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webscripts.container' defined in URL [jar:file:/C:/CNE/Alfresco1/tomcat/webapps/share/WEB-INF/lib/spring-surf-5.0.d.jar!/org/springframework/extensions/surf/spring-surf-application-context.xml]: Cannot resolve reference to bean 'processor.model.helper' while setting bean property 'processorModelHelper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processor.model.helper' defined in URL [jar:file:/C:/CNE/Alfresco1/tomcat/webapps/share/WEB-INF/lib/spring-surf-5.0.d.jar!/org/springframework/extensions/surf/spring-surf-services-context.xml]: Cannot resolve reference to bean 'webframework.config.element' while setting bean property 'webFrameworkConfigElement'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webframework.config.element' defined in URL [jar:file:/C:/CNE/Alfresco1/tomcat/webapps/share/WEB-INF/lib/spring-surf-5.0.d.jar!/org/springframework/extensions/surf/spring-surf-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.extensions.config.WebFrameworkConfigElement org.springframework.extensions.config.ConfigBeanFactory.getWebFrameworkConfig()] threw exception; nested exception is org.springframework.extensions.config.ConfigException: 06160000 Unable to locate evaluator implementation for 'aspect-name' for org.springframework.extensions.config.ConfigSectionImpl@2b530b94 (evaluator=aspect-name condition=prueba:aspectRegasoc replace=false)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1418)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1159)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
   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:633)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
   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.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.deployWAR(HostConfig.java:1081)
   at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
   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.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processor.model.helper' defined in URL [jar:file:/C:/CNE/Alfresco1/tomcat/webapps/share/WEB-INF/lib/spring-surf-5.0.d.jar!/org/springframework/extensions/surf/spring-surf-services-context.xml]: Cannot resolve reference to bean 'webframework.config.element' while setting bean property 'webFrameworkConfigElement'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webframework.config.element' defined in URL [jar:file:/C:/CNE/Alfresco1/tomcat/webapps/share/WEB-INF/lib/spring-surf-5.0.d.jar!/org/springframework/extensions/surf/spring-surf-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.extensions.config.WebFrameworkConfigElement org.springframework.extensions.config.ConfigBeanFactory.getWebFrameworkConfig()] threw exception; nested exception is org.springframework.extensions.config.ConfigException: 06160000 Unable to locate evaluator implementation for 'aspect-name' for org.springframework.extensions.config.ConfigSectionImpl@2b530b94 (evaluator=aspect-name condition=prueba:aspectRegasoc replace=false)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1418)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1159)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
   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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   … 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webframework.config.element' defined in URL [jar:file:/C:/CNE/Alfresco1/tomcat/webapps/share/WEB-INF/lib/spring-surf-5.0.d.jar!/org/springframework/extensions/surf/spring-surf-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.extensions.config.WebFrameworkConfigElement org.springframework.extensions.config.ConfigBeanFactory.getWebFrameworkConfig()] threw exception; nested exception is org.springframework.extensions.config.ConfigException: 06160000 Unable to locate evaluator implementation for 'aspect-name' for org.springframework.extensions.config.ConfigSectionImpl@2b530b94 (evaluator=aspect-name condition=prueba:aspectRegasoc replace=false)
   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:603)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1056)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:952)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
   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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   … 38 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.extensions.config.WebFrameworkConfigElement org.springframework.extensions.config.ConfigBeanFactory.getWebFrameworkConfig()] threw exception; nested exception is org.springframework.extensions.config.ConfigException: 06160000 Unable to locate evaluator implementation for 'aspect-name' for org.springframework.extensions.config.ConfigSectionImpl@2b530b94 (evaluator=aspect-name condition=prueba:aspectRegasoc replace=false)
   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181)
   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:592)
   … 47 more
Caused by: org.springframework.extensions.config.ConfigException: 06160000 Unable to locate evaluator implementation for 'aspect-name' for org.springframework.extensions.config.ConfigSectionImpl@2b530b94 (evaluator=aspect-name condition=prueba:aspectRegasoc replace=false)
   at org.springframework.extensions.config.BaseConfigService.processSection(BaseConfigService.java:489)
   at org.springframework.extensions.config.BaseConfigService.getConfig(BaseConfigService.java:228)
   at org.springframework.extensions.config.BaseConfigService.getConfig(BaseConfigService.java:171)
   at org.springframework.extensions.config.BaseConfigService.getConfig(BaseConfigService.java:166)
   at org.springframework.extensions.config.ConfigBeanFactory.getWebFrameworkConfig(ConfigBeanFactory.java:128)
   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.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
   … 48 more

jul 16, 2015 11:04:53 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext



Por favor, me podrias ayudar o darme un ejemplo sencillo tambien en donde pueda realizar un modelo sencillo, poder subir el documento y asignarle el tipo documental con su metadata.

Muchas gracias de verdad por el apoyo.




1 Reply
juanvzla
Member II

Re: Error al crear un Modelo.

He solucionado el error agregado lo siguiente:

<config evaluator="aspect" condition="prueba:aspectRegasoc">
   <forms>
      <form>
         <field-visibility>
            <!– fields from my example aspect –>
            <show id="prueba:nregistro" />
         <show id="prueba:nombre" />
         <show id="prueba:nexpediente" />
         <show id="prueba:seccion" />
         <show id="prueba:nregistro" />
         <show id="prueba:tipoImagen" />
         </field-visibility>
        <appearance>
                <field id="kb:nregistro" />
             <field id="kb:nombre" />
              <field id="kb:nexpediente" />
               <field id="kb:seccion" />
                <field id="kb:nregistro" />
                <field id="kb:tipoImagen" />
               
        </appearance>
      </form>
   </forms>
</config>

Elimine esta opcion

<config evaluator = "aspect-name" condition ="prueba:aspectRegasoc">

   <property-sheet>
      
      <show-property name= "prueba:nregistro"/>
   
      <show-property name= "prueba:nombre"/>

      <show-property name= "prueba:nexpediente"/>

      <show-property name= "prueba:seccion"/>

      <show-property name= "prueba:tipoImagen"/>

   </property-sheet>

</config>