AnsweredAssumed Answered

eclipse config

Question asked by teamkrusty on Dec 15, 2005
Latest reply on Dec 16, 2005 by teamkrusty
im trying to get the basic WebServiceBootstrapSystemTest.java to work.  Im runnning the junit test from eclipse with the default alfresco project file.  All the RPC tests work but my spring configuration is crashing.  does anyone have a helpful pointer for why my spring service will not initialize?  any help would be appreciated.  the code dies with this command:

ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");

below is the stacktrace:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/application-context.xml]: Can't resolve reference to bean 'systemBootstrap' while setting property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeIndexer' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'policyComponent' while setting property 'policyComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/application-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'constructor argument with index 0'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/application-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 'nodeIndexer' defined in class path resource [alfresco/node-services-context.xml]: Can't resolve reference to bean 'policyComponent' while setting property 'policyComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/application-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'constructor argument with index 0'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/application-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 'policyComponent' defined in class path resource [alfresco/application-context.xml]: Can't resolve reference to bean 'dictionaryService' while setting property 'constructor argument with index 0'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/application-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/application-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:94)
   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:971)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:941)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:281)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:281)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   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.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:591)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:497)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:298)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   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:891)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:316)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:281)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   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:891)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:316)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:205)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:583)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:466)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:307)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56)
   at org.alfresco.example.webservice.sample.WebServiceSample7.testBootstrap(WebServiceSample7.java:63)
   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 junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
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:89)
   … 62 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)
   … 63 more

Outcomes