-1

Below is the issue i am facing during the spring upgrade.I feel the issue is with the doctype.Please suggest

   Bean 'cdqiPerformanceMonitor'; nested exception is
  org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
  Configuration problem: Old 1.x 'singleton' attribute in use - upgrade to
 'scope' declaration
  Offending resource: ServletContext resource [/WEB-
  INF/applicationContext.xml]

Below is the application context xml

    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"     "http://www.springframework.org/dtd/spring-beans.dtd">    
<beans>    
   <bean id="cdqiPerformanceMonitor"        
   class="com.tms.cdqi.framework.aop.interceptor.CDQIPerformanceMonitorInterceptor"         />
<bean  id="cdqiApplicationContextFactory"class="com.tms.cdqi.framework.context.CDQIApplicationContextFactoryImpl" />  
<bean  id="commandInvoker"class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean"  
lazy-init="true">  
<property name="jndiName">  
<value>ejb/CommandInvokerLocal</value>  
</property>
<property name="businessInterface">
<value>  
com.tms.cdqi.application.command.invoker.CommandInvoker  
</value>  
</property>  
</bean>  
</beans>

Below is the stack trace

    listener org.springframework.web.context.ContextLoaderListener
   failed:
   org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
 Configuration problem: Unexpected failure during bean definition parsing
  Offending resource: ServletContext resource [/WEB-
  INF/applicationContext.xml]
  Bean 'cdqiPerformanceMonitor'; nested exception is 
  org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
  Configuration problem: Old 1.x 'singleton' attribute in use - upgrade to
 'scope' declaration
 Offending resource: ServletContext resource [/WEB-
  INF/applicationContext.xml]
6
  • Add content of applicationContext.xml please.
    – Jens
    Feb 1, 2015 at 11:34
  • @Jens added the content of xml
    – sai
    Feb 1, 2015 at 12:05
  • Are you sure that is the correct file? Try to clean and rebuild you project.
    – Jens
    Feb 1, 2015 at 12:08
  • Which version of spring do you upgrade to?
    – Jens
    Feb 1, 2015 at 12:09
  • @Jens its spring 4.1.1 version
    – sai
    Feb 1, 2015 at 12:12

1 Answer 1

3

See SPR-12167. Spring no longer accepts singleton="true", so you must use scope="singleton" instead.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.