<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jconstantine" rel="nofollow">Hal Hildebrand</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-1864?redirect=false" rel="nofollow">SPR-1864</a></strong> and commented</p>
<p dir="auto">When using an InputStreamResource to create the XmlBeanFactory, an illegal state exception is thrown.</p>
<p dir="auto">java.lang.IllegalStateException: InputStream has already been read - do not use InputStreamResource if a stream needs to be read multiple times<br>
at org.springframework.core.io.InputStreamResource.getInputStream(InputStreamResource.java:91)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.detectValidationMode(XmlBeanDefinitionReader.java:425)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.getValidationModeForResource(XmlBeanDefinitionReader.java:412)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDocumentBuilderFactory(XmlBeanDefinitionReader.java:385)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:352)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:308)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:283)<br>
at org.springframework.beans.factory.xml.XmlBeanFactory.&lt;init&gt;(XmlBeanFactory.java:73)<br>
at org.springframework.beans.factory.xml.XmlBeanFactory.&lt;init&gt;(XmlBeanFactory.java:61)<br>
at ResourceReadErrorTest.testDoubleRead(ResourceReadErrorTest.java:23)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 M3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/11550/ResourceReadErrorTest.java" rel="nofollow">ResourceReadErrorTest.java</a> (<em>914 bytes</em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=pleira" rel="nofollow">Pablo Pita Leira</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-511?redirect=false" rel="nofollow">SPR-511</a></strong> and commented</p>
<p dir="auto">Imagine you have a class with a date field, so we use the CustomEditorConfigurer with the CustomDateEditor in the applicationContext.xml to enter the date property as a plain string. So far, so good.</p>
<p dir="auto">Now, we like to export through JMX the bean methods by having a JmxAdapter bean around that bean. Now, the bean does not get initialised: there is a TypeMismatchException when setting the property.</p>
<hr>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/10340/testdate.zip" rel="nofollow">testdate.zip</a> (<em>2.56 kB</em>)</li>
</ul>
<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="398052868" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5207" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5207/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5207">#5207</a> JmxMBeanAdapter: conflict with PropertyPlaceholderConfigurer (<em><strong>"duplicates"</strong></em>)</li>
</ul>