InputStream is = new FileInputStream("beans.xml");
XmlBeanFactory factory = new XmlBeanFactory(is);
There isn't such constructor for XmlBeanFactory.
It should look like that:
InputStream is = new FileInputStream("beans.xml");
XmlBeanFactory factory=new XmlBeanFactory(new InputStreamResource(is));
Description
In the manual (page 17) there is example:
InputStream is = new FileInputStream("beans.xml");
XmlBeanFactory factory = new XmlBeanFactory(is);
There isn't such constructor for XmlBeanFactory.
It should look like that:
InputStream is = new FileInputStream("beans.xml");
XmlBeanFactory factory=new XmlBeanFactory(new InputStreamResource(is));
Looks like this issue needs to be reopened. The example is still there (now on page 39 of the PDF under 2.5.1) with the wrong constructor arg (InputStream).
Brett Randall added a comment - 12/Feb/08 01:18 PM Looks like this issue needs to be reopened. The example is still there (now on page 39 of the PDF under 2.5.1) with the wrong constructor arg (InputStream).
Thanks,
Brett
Thanks for spotting this - fixed!
Juergen