org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode

Spring JIRA | srikanth Hugar | 2 years ago
  1. 0

    I have a strange problem, bundle is not starting. This problem does not occur every time. It occurs some time and if i delete the data folder and start again, it works sometime. And sometime it does not work even if i delete data folder and start the apache karaf. ############################################################ Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode ############################################################### 08:28:55.548 [SpringOsgiExtenderThread-12] ERROR o.s.o.e.i.a.ContextLoaderListener - Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=connector-server, config=osgibundle:/META-INF/spring/*.xml)) org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[na:na] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164) ~[1.2.1:1.2.1] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136) ~[1.2.1:1.2.1] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269) ~[1.2.1:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716) [1.2.1:1.2.1] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] Caused by: java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:84) ~[na:na] at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:244) ~[na:na] at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ~[na:na] at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] ... 18 common frames omitted 08:28:55.549 [SpringOsgiExtenderThread-13] INFO o.s.b.f.c.PropertyPlaceholderConfigurer - Loading properties file from OSGi resource[file:/opt/polycom/caxis/conf/service-platform.properties|bnd.id=188|bnd.sym=connector-server-agent-client] 08:28:55.553 [SpringOsgiExtenderThread-12] ERROR o.s.o.e.i.d.s.DependencyWaiterApplicationContextExecutor - Unable to create application context for [connector-server], unsatisfied dependencies: none org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[na:na] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164) ~[1.2.1:1.2.1] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136) ~[1.2.1:1.2.1] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269) ~[1.2.1:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716) [1.2.1:1.2.1] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] Caused by: java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:84) ~[na:na] at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:244) ~[na:na] at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ~[na:na] at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] ... 18 common frames omitted

    Spring JIRA | 2 years ago | srikanth Hugar
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode
  2. 0

    I have a strange problem, bundle is not starting. This problem does not occur every time. It occurs some time and if i delete the data folder and start again, it works sometime. And sometime it does not work even if i delete data folder and start the apache karaf. ############################################################ Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode ############################################################### 08:28:55.548 [SpringOsgiExtenderThread-12] ERROR o.s.o.e.i.a.ContextLoaderListener - Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=connector-server, config=osgibundle:/META-INF/spring/*.xml)) org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[na:na] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164) ~[1.2.1:1.2.1] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136) ~[1.2.1:1.2.1] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269) ~[1.2.1:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716) [1.2.1:1.2.1] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] Caused by: java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:84) ~[na:na] at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:244) ~[na:na] at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ~[na:na] at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] ... 18 common frames omitted 08:28:55.549 [SpringOsgiExtenderThread-13] INFO o.s.b.f.c.PropertyPlaceholderConfigurer - Loading properties file from OSGi resource[file:/opt/polycom/caxis/conf/service-platform.properties|bnd.id=188|bnd.sym=connector-server-agent-client] 08:28:55.553 [SpringOsgiExtenderThread-12] ERROR o.s.o.e.i.d.s.DependencyWaiterApplicationContextExecutor - Unable to create application context for [connector-server], unsatisfied dependencies: none org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[na:na] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164) ~[1.2.1:1.2.1] at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136) ~[1.2.1:1.2.1] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269) ~[1.2.1:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) ~[na:na] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169) [1.2.1:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175) [1.2.1:1.2.1] at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716) [1.2.1:1.2.1] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] Caused by: java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:84) ~[na:na] at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:244) ~[na:na] at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ~[na:na] at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[3.2.8.RELEASE-1.0.0-SNAPSHOT:na] ... 18 common frames omitted

    Spring JIRA | 2 years ago | srikanth Hugar
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://187.0:0/META-INF/spring/connector-server.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode
  3. 0

    IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

    Stack Overflow | 1 month ago | XYZ
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/xmlfiles/jpa-context.xml]; nested exception is java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If I create a bean with @Scope("request") then I get a parse error. To reproduce I did the following: * Created Spring MVC template project. * Changed spring version from 3.0.1.RELEASE-A to 3.0.1.RELEASE (Since -A isn't in maven central) * Modified WelcomeController.java Added @Scope("request"); After that change I get a parse error parsing app-config.xml I'll attach a test-case project. This is the exception I get in the error log. eclipse.buildId=unknown java.version=1.6.0_18 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -data c:\temp\temp-stack-workspace-3 -os win32 -ws win32 -arch x86 This is a continuation of log file C:\temp\temp-stack-workspace-3\.metadata\.bak_1.log Created Time: 2010-03-10 17:24:25.250 Error Wed Mar 10 17:28:33 MST 2010 Internal Error org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [C:/temp/temp-stack-workspace-3/test-parse-error/src/main/webapp/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$2.loadBeanDefinitions(BeansConfig.java:369) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:412) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:83) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:206) at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$ErrorSuppressingBeanDefinitionParserDelegate.parseCustomElement(BeansConfig.java:1242) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:136) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$2.registerBeanDefinitions(BeansConfig.java:382) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ... 13 more

    Spring JIRA | 7 years ago | Mike Youngstrom
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [C:/temp/temp-stack-workspace-3/test-parse-error/src/main/webapp/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode
  6. 0

    If I create a bean with @Scope("request") then I get a parse error. To reproduce I did the following: * Created Spring MVC template project. * Changed spring version from 3.0.1.RELEASE-A to 3.0.1.RELEASE (Since -A isn't in maven central) * Modified WelcomeController.java Added @Scope("request"); After that change I get a parse error parsing app-config.xml I'll attach a test-case project. This is the exception I get in the error log. eclipse.buildId=unknown java.version=1.6.0_18 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -data c:\temp\temp-stack-workspace-3 -os win32 -ws win32 -arch x86 This is a continuation of log file C:\temp\temp-stack-workspace-3\.metadata\.bak_1.log Created Time: 2010-03-10 17:24:25.250 Error Wed Mar 10 17:28:33 MST 2010 Internal Error org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [C:/temp/temp-stack-workspace-3/test-parse-error/src/main/webapp/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$2.loadBeanDefinitions(BeansConfig.java:369) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:412) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:83) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:206) at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$ErrorSuppressingBeanDefinitionParserDelegate.parseCustomElement(BeansConfig.java:1242) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:136) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$2.registerBeanDefinitions(BeansConfig.java:382) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ... 13 more

    Spring JIRA | 7 years ago | Mike Youngstrom
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [C:/temp/temp-stack-workspace-3/test-parse-error/src/main/webapp/WEB-INF/spring/app-config.xml]; nested exception is java.lang.ClassCastException: org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.springframework.context.annotation.ScopedProxyMode cannot be cast to org.springframework.context.annotation.ScopedProxyMode

      at org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata()
    2. Spring Context
      ComponentScanBeanDefinitionParser.parse
      1. org.springframework.context.annotation.AnnotationScopeMetadataResolver.resolveScopeMetadata(AnnotationScopeMetadataResolver.java:84)[na:na]
      2. org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:244)[na:na]
      3. org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)[na:na]
      3 frames
    3. Spring Beans
      AbstractBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      2. org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      3. org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      4. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      5. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      6. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      7. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      8. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      9. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      10. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[3.2.8.RELEASE-1.0.0-SNAPSHOT:na]
      11. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[na:na]
      12. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[na:na]
      13. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[na:na]
      13 frames
    4. Spring OSGi Core
      OsgiBundleXmlApplicationContext.loadBeanDefinitions
      1. org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[1.2.1:1.2.1]
      2. org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[1.2.1:1.2.1]
      2 frames
    5. Spring Context
      AbstractApplicationContext.obtainFreshBeanFactory
      1. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[na:na]
      2. org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[na:na]
      2 frames
    6. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.startRefresh
      1. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[1.2.1:1.2.1]
      2. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[1.2.1:1.2.1]
      3. org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[na:na]
      4. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[1.2.1:1.2.1]
      4 frames
    7. org.springframework.osgi
      DependencyWaiterApplicationContextExecutor.refresh
      1. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[1.2.1:1.2.1]
      2. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[1.2.1:1.2.1]
      2 frames
    8. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.refresh
      1. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[1.2.1:1.2.1]
      1 frame
    9. org.springframework.osgi
      ContextLoaderListener$2.run
      1. org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[1.2.1:1.2.1]
      1 frame
    10. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.7.0_65]
      1 frame