Monday, May 19, 2014

org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model XXX.xml

To solve the above issue, check for typo/ syntax issues in model.xml

Error creating bean with name 'XXX' defined in class path resource [XXX/context/service-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Class {XXX}XXX has not been defined in the data dictionary

I got the above error while adding custom behavior related to custom aspect using AMP (Alfresco Module Package) with Alfresco Maven SDK.

This is how I resolved that:

Each module requires a module context file (module-context.xml). This loads the Spring configuration for the module. 

Custom content models can be bootstrapped into the repository via Spring configuration added to the module context file.

You need to either import your custom-model-context.xml here or directly define the bean configuration for the custom model here as given below. 



Module context file:

Adding module data: