The bean 'messageSource', defined in BeanDefinition defined in class path resource [org/apereo/cas/config/CasCoreWebConfiguration.class], could not be registered

199 views
Skip to first unread message

Sayed Ahammad

unread,
Dec 28, 2018, 2:40:20 PM12/28/18
to CAS Community
2018-12-28 20:39:48,130 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'messageSource' defined in BeanDefinition defined in class path resource [org/apereo/cas/config/CasCoreWebConfiguration.class]: Cannot register bean definition [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in class path resource [org/apereo/cas/config/CasCoreWebConfiguration.class]] for bean 'messageSource': There is already [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration; factoryMethodName=messageSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/context/MessageSourceAutoConfiguration.class]] bound.>
2018-12-28 20:39:48,168 ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] - <

***************************
APPLICATION FAILED TO START
***************************

Description:

The bean 'messageSource', defined in BeanDefinition defined in class path resource [org/apereo/cas/config/CasCoreWebConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/context/MessageSourceAutoConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Reply all
Reply to author
Forward
0 new messages