I am trying to read a xml file and parse it using Spring MVC, but for some reason it's not finding the file path. I tried different folder, even root, but still cant read or find the file in my project. I'm also using a bean and its not working ether.
<bean class="com.fdm.routePlanner.data.LineDataReader">
<property name="file">
<value>/resources/CompleteTube.xml</value>
</property>
</bean>
and
SAXBuilder saxbuilder = new SAXBuilder();
try {
return generateNetwork( saxbuilder.build(new File(file)) );
} catch (JDOMException e) {
When I try to parse the file using SAXBuilder
it gives me a NullPointerException.