AnsweredAssumed Answered

Exceptions adding custom aspect

Question asked by rmangi on Dec 28, 2005
Latest reply on Jan 25, 2006 by rmangi
Hello all. I'm trying to create a custom aspect and apply it to content and I'm getting exceptions.

It's a very simple aspect, just really trying to create a stub so I can play. Following are the steps I've taken:

XML for the aspect:

<?xml version='1.0' encoding='UTF-8'?>
<model name="gto:projectModel" xmlns="">
   <description>Model of a project in GTO-space</description>
   <author>Rick Mangi</author>

         <!– Import Alfresco Dictionary Definitions –>
         <import uri="" prefix="d"/>
         <!– Import Alfresco Content Domain Model Definitions –>
         <import uri="" prefix="cm"/>
      <!– Define a Namespace for my new definitions –>
      <namespace uri="gto.project.model" prefix="gto"/>

   <!– Type and Aspect definitions go here –>
      <aspect name="gto:project">
         <title>GTO Project Specification</title>
            <property name="gto:projectName">
            <property name="gto:clientName">
            <property name="gto:entryDate">

added to extension-context.xml:

    <bean id="extension.dictionaryBootstrap" class="org.alfresco.repo.dictionary.DictionaryBootstrap" init-method="bootstrap" depends-on="dictionaryBootstrap">
        <property name="dictionaryDAO"><ref bean="dictionaryDAO"/></property>
        <property name="models">

Added to web-client-config.xml

     <config evaluator="aspect-name" condition="gto:projectModel">
         <show-property name="gto:projectName"/>
         <show-property name="gto:clientName"/>
         <show-property name="gto:entryDate"/>


   <config evaluator="string-compare" condition="Action Wizards">
         <type name="folder" displayLabelId="space"/>
         <type name="content"/>
         <aspect name="gto:projectModel" displayLabel="GTO Project Model"/>

in web-client-config-edit-properties.xml

    <config evaluator="aspect-name" condition="gto:projectModel">
         <show-property name="gto:projectName"/>
         <show-property name="gto:clientName"/>
         <show-property name="gto:entryDate"/>

I created a rule in the webclient for a space to try to apply the aspect. I've tried adding it to spaces and content but every time I add a type which would trigger the aspect to be added I get the following error:

Error  Please correct the errors below then click Finish.

    * A system error happened during the operation: The aspect is invalid: {gto.project.model}projectModel

and this exception:

11:58:24,897 ERROR [repo.action.ActionServiceImpl] An error was encountered whilst executing the action 'composite-action'.
org.alfresco.service.cmr.dictionary.InvalidAspectException: The aspect is invalid: {gto.project.model}projectModel
        at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspect(

Does anybody have any ideas where to go from here?