04-15-2008 04:20 AM
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:Alfresco/myContext.xml");
this.repository = (Repository)context.getBean("JCR.Repository");
15 avr. 2008 10:00:03 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@100ab23: display name [org.springframework.context.support.ClassPathXmlApplicationContext@100ab23]; startup date [Tue Apr 15 10:00:03 CEST 2008]; root of context hierarchy
15 avr. 2008 10:00:03 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@100ab23]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5329c5
15 avr. 2008 10:00:03 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5329c5: defining beans []; root of factory hierarchy
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'JCR.Repository' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:968)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
at MyBeanImpl.<init>(MyBeanImpl.java:31)
at Test.main(Test.java:21)
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'JCR.Repository' is defined
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="JCR.Repository" class="org.alfresco.jcr.repository.RepositoryImpl" init-method="init">
<property name="serviceRegistry"><ref bean="ServiceRegistry"/></property>
<property name="importerComponent"><ref bean="importerComponent"/></property>
<property name="defaultWorkspace"><value>SpacesStore</value></property>
</bean>
<bean id="JCR.DictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/model/jcrModel.xml</value>
</list>
</property>
</bean>
</beans>
04-16-2008 05:33 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.