AnsweredAssumed Answered

Custom Content Model Causes

Question asked by rdifrango on Jan 7, 2009
Latest reply on Jan 7, 2009 by rdifrango
I created a custom content model and it is displaying properly in the UI.  When I go to run the following sample webscript

http://localhost:18080/alfresco/service/sample/folder

I get the following exception:


500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Wrapped Exception (with status template): Error during processing of the template 'get(name) failed on instance of org.alfresco.repo.template.TemplateNode'. Please contact your system administrator.
   
Exception:   freemarker.template.TemplateModelException - get(name) failed on instance of org.alfresco.repo.template.TemplateNode
   
   freemarker.ext.beans.BeanModel.get(BeanModel.java:223)
   
Exception:   org.alfresco.service.cmr.repository.TemplateException - Error during processing of the template 'get(name) failed on instance of org.alfresco.repo.template.TemplateNode'. Please contact your system administrator.
   
   org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:205)
   
Exception:   org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Error during processing of the template 'get(name) failed on instance of org.alfresco.repo.template.TemplateNode'. Please contact your system administrator.
   
   org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:594)

Here is my custom content model:


<?xml version="1.0" encoding="UTF-8"?>
   <!– Definition of new Model –>
<model name="demo:demomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

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

   <!–
      Imports are required to allow references to definitions in other
      models
   –>
   <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" />
      <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.demo.org/model/content/1.0"
         prefix="demo" />
   </namespaces>

   <constraints>
      <constraint name="demo:departmentList" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>Accounts Payable</value>
               <value>HQ &amp; Mailroom</value>
               <value>IT &amp; Help Desk</value>
                </list>
            </parameter>
        </constraint>
   </constraints>

   <types>
      <!– Enterprise-wide generic document type –>
      <type name="demo:doc">
         <title>Demo Document</title>
         <parent>cm:content</parent>
         <mandatory-aspects>
           <aspect>demo:department</aspect>
         </mandatory-aspects>
      </type>
   </types>

   <aspects>
      <aspect name="demo:department">
         <title>Demo Department</title>
         <properties>
            <property name="demo:departmentName">
               <type>d:text</type>
               <multiple>true</multiple>
               <constraints>
                  <constraint ref="demo:departmentList" />
               </constraints>
            </property>
         </properties>
      </aspect>
   </aspects>
</model>

Outcomes