But unfortunately it is throwing error. The errors follows
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInfoBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'nodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dbNodeService' while setting property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/model/dictionaryModel.xml I did required configuration in the custom xml and properties files.
Please help me to come out from this problem.
Did i missed any other configuration?
When i debugging the error
public void bootstrap() { // register models for (String bootstrapModel : models) { InputStream modelStream = getClass().getClassLoader().getResourceAsStream(bootstrapModel); if (modelStream == null) { throw new DictionaryException("Could not find bootstrap model " + bootstrapModel); } try { if (logger.isInfoEnabled()) logger.info("Loading model from " + bootstrapModel); M2Model model = M2Model.createModel(modelStream); dictionaryDAO.putModel(model); } catch(DictionaryException e) { throw new DictionaryException("Could not import bootstrap model " + bootstrapModel, e); } }
It failed to cross the blocked statement.
I think it failed to create a model object for dictionary.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInfoBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'nodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dbNodeService' while setting property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/model/dictionaryModel.xml org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dbNodeService' while setting property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/model/dictionaryModel.xml org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/model/dictionaryModel.xml org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/model/dictionaryModel.xml org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/model/dictionaryModel.xml at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1093) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1063) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:312) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:203) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:614) at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:496) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72) at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:40) at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:62) Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Failed to parse model at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:91) at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:98) … 41 more Caused by: org.jibx.runtime.JiBXException: Unable to access binding information for class org.alfresco.repo.dictionary.M2Model Make sure the binding has been compiled at org.jibx.runtime.BindingDirectory.getBindingList(BindingDirectory.java:77) at org.jibx.runtime.BindingDirectory.getFactory(BindingDirectory.java:189) at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:84) … 42 more
I can only assume you've used a custom built version of repository.jar, as the SDK pre-built jars do not exhibit this behaviour.
If you're building repository.jar yourself, and assuming you have checked-out a dev. env. from SVN, you can use the ant target compile-jibx found the in the repository project build.xml file.