tsgrp / OpenContent

TSG's Web Services for ECM Repositories
8 stars 4 forks source link

Upon Alfresco startup - ServiceRegistry error thrown #13

Open gsteimer opened 10 years ago

gsteimer commented 10 years ago

When Alfresco starts up (4.2 in my case), the error below is thrown to the log. This exception makes it look like OC isn't going to work at all, but for some reason, everything seems to work fine. At some point, we're going to run into a client that's wondering why this error is showing up in the logs...

Error initializing CoreContext...No bean named 'ServiceRegistry' is defined
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ServiceRegistry' is defined
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)
        at <removed for brevity>
        at com.tsgrp.opencontent.core.spring.CoreContext.initContext(CoreContext.java:201)
        at com.tsgrp.opencontent.core.spring.CoreContext.<clinit>(CoreContext.java:67)
mkolas commented 10 years ago

I've had clients ask me about this before. In my experience this happens with 4.1 as well.

I could be mistaken, but I believe @benallenallen tried to fix this at some point but we had to revert because it broke some other things. Would have been around the time the interns were in if somebody would want to go through the SVN logs.

On Tue, Apr 1, 2014 at 5:14 PM, George Steimer notifications@github.comwrote:

When Alfresco starts up (4.2 in my case), the error below is thrown to the log. This exception makes it look like OC isn't going to work at all, but for some reason, everything seems to work fine. At some point, we're going to run into a client that's wondering why this error is showing up in the logs...

Error initializing CoreContext...No bean named 'ServiceRegistry' is defined org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ServiceRegistry' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83) at com.tsgrp.opencontent.core.spring.CoreContext.initContext(CoreContext.java:201) at com.tsgrp.opencontent.core.spring.CoreContext.(CoreContext.java:67)

Reply to this email directly or view it on GitHubhttps://github.com/tsgrp/OpenContent/issues/13 .

Max Kolasinski technology services group (248) 977-5077

benallenallen commented 10 years ago

7 is somewhat related - When I attempted to fix this for DCTM, it broke alfresco since the beans are loaded differently when we are embedded inside a subsystem. The crux of the issue is having two separate contexts - one is Spring wired up in the web.xml upon launch of the application, and the other is our CoreContext that we init as soon as an endpoint is hit. For Alfresco the loading is different.