cancel
Showing results for 
Search instead for 
Did you mean: 

an error while loading custom model...

taroth
Champ in-the-making
Champ in-the-making
I have created a custom model and when I start virtual server I receive an error:


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\someco-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 02310001 Could not import bootstrap model alfresco/extension/scModel.xml
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 02310001 Could not import bootstrap model alfresco/extension/scModel.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:151)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


my model is:
<?xml version="1.0" encoding="UTF8"?>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Someco Model</description>
<author>Optaros</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" />
</imports>
<!Introduction of new namespaces defined by this model >
<namespaces>
   <namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
</namespaces>
<types>
   <!Enterprisewide generic document type >
   <type name="sc:doc">
      <title>Someco Document</title>
      <parent>cm:content</parent>
      <associations>
         <association name="sc:relatedDocuments">
            <title>Related Documents</title>
            <source>
            <mandatory>false</mandatory>
            <many>true</many>
            </source>
            <target>
            <class>sc:doc</class>
            <mandatory>false</mandatory>
            <many>true</many>
            </target>
         </association>
      </associations>
      <mandatoryaspects>
         <aspect>cm:generalclassifiable</aspect>
      </mandatoryaspects>
   </type>
   <type name="sc:whitepaper">
      <title>Someco Whitepaper</title>
      <parent>sc:doc</parent>
   </type>
</types>
<aspects>
   <aspect name="sc:webable">
      <title>Someco Webable</title>
      <properties>
         <property name="scSmiley Tongueublished">
            <type>d:date</type>
         </property>
         <property name="sc:isActive">
            <type>d:boolean</type>
            <default>false</default>
         </property>
      </properties>
   </aspect>
   <aspect name="scSmiley TongueroductRelated">
      <title>Someco Product Metadata</title>
      <properties>
      <property name="scSmiley Tongueroduct">
         <type>d:text</type>
         <mandatory>true</mandatory>
      </property>
      <property name="sc:version">
         <type>d:text</type>
         <mandatory>true</mandatory>
      </property>
      </properties>
   </aspect>
</aspects>
</model>



what did I typed wrong?
5 REPLIES 5

billerby
Champ on-the-rise
Champ on-the-rise
One thing that hits me is that you have not surrounded your comments correct:

Your code:
<!Imports are required to allow references to definitions in other models>

Should be:

<!– Imports are required to allow references to definitions in other models –>

Change this everywhere and run the model through "org.alfresco.repo.dictionary.TestModel" if you want to avoid the roundtrip with server startup.

/Erik

billerby
Champ on-the-rise
Champ on-the-rise
Found one more thing while looking through your model:

Your code:

<mandatoryaspects>
<aspect>cm:generalclassifiable</aspect>
</mandatoryaspects>

Should be:

<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
</mandatory-aspects>

taroth
Champ in-the-making
Champ in-the-making
tnx a lot Smiley Happy
there's no error now…

but now, I cannot see that model anywhere

billerby
Champ on-the-rise
Champ on-the-rise
See the model?

rbkprod
Champ in-the-making
Champ in-the-making
Have you added the properties etc to web-client-config.xml?
If not, start by adding a few of your custom properties:

First, for use in business rules:

    <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="sc:webable"/>
      </aspects>
   </config>

Then, err…add, say
    
<config evaluator="aspect-name" condition="sc:webable">
      <property-sheet>
            <show-property name="sc:published"/>
            <show-property name="sc:isActive"/>
      </property-sheet>
</config>

etc etc.