<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cameronbraid" rel="nofollow">Cameron Braid</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4089?redirect=false" rel="nofollow">SPR-4089</a></strong> and commented</p>
<p dir="auto">I initially posted to the forum <a href="http://forum.springframework.org/showthread.php?p=150766" rel="nofollow">http://forum.springframework.org/showthread.php?p=150766</a></p>
<p dir="auto">There is a method signature change in org.springframework.beans.factory.xml.XmlReaderCon text that causes apache xbean to fail. I submitted a bug report at the xbean site <a href="https://issues.apache.org/jira/browse/XBEAN-88" rel="nofollow">https://issues.apache.org/jira/browse/XBEAN-88</a> but here is a stack trace excerpt :</p>
<p dir="auto">Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderCon text.getReader()Lorg/springframework/beans/factory/xml/XmlBeanDefinitionReader;<br>
at org.apache.xbean.spring.context.v2c.XBeanNamespace Handler.loadResource(XBeanNamespaceHandler.java:81 8)<br>
at org.apache.xbean.spring.context.v2c.XBeanNamespace Handler.findNamespaceProperties(XBeanNamespaceHand ler.java:778)<br>
at org.apache.xbean.spring.context.v2c.XBeanNamespace Handler.parseBeanFromExtensionElement(XBeanNamespa ceHandler.java:257)<br>
at org.apache.xbean.spring.context.v2c.XBeanNamespace Handler.parse(XBeanNamespaceHandler.java:155)<br>
at org.apache.xbean.spring.context.v2.XBeanNamespaceH andler.parse(XBeanNamespaceHandler.java:49)<br>
at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1246)<br>
at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1236)</p>
<p dir="auto">This change prevents spring 2.5 being a "drop in" upgrade from 2.0</p>
<p dir="auto">Is this method signature change required ?</p>
<p dir="auto">Could the old method be left as deprecated ?</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.1 M1, 2.1 M2, 2.1 M3, 2.1 M4, 2.5 RC1, 2.5 RC2</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398082474" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8760" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8760/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8760">#8760</a> Return type of o.s.b.f.x.XmlBeanDefinitionReader#getReader() changed (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=reinhard" rel="nofollow">Reinhard Pötz</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4081?redirect=false" rel="nofollow">SPR-4081</a></strong> and commented</p>
<p dir="auto">The return type of o.s.b.f.x.XmlBeanDefinitionReader#getReader() has changed from</p>
<p dir="auto">org.springframework.beans.factory.xml.XmlBeanDefinitionReader</p>
<p dir="auto">to</p>
<p dir="auto">org.springframework.beans.factory.support.BeanDefinitionReader</p>
<p dir="auto">If you use this method you have to recompile your code, otherwise you get following exception:</p>
<p dir="auto">org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getReader()Lorg/springframework/beans/factory/xml/XmlBeanDefinitionReader;<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:385)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)<br>
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)<br>
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:158)<br>
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)<br>
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)<br>
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97)<br>
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338)<br>
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)<br>
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)<br>
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)</p>
<p dir="auto">Since this change prevents you from just dropping in the new Spring libs into your application, I marked this report as "blocker".</p>
<p dir="auto">BTW, I'm not the only one who run into this problem: See also <a href="https://issues.apache.org/jira/browse/XBEAN-88" rel="nofollow">https://issues.apache.org/jira/browse/XBEAN-88</a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5 RC1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398082535" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8768" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8768/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8768">#8768</a> Issue with apache xbean when upgrading spring from 2.0 to 2.1-rc or 2.5-rc1 (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>