I'm running the following code:
new FileSystemXmlApplicationContext("/data/farm/Server/confData/1000004/contex.xml")
and it throws
java.io.FileNotFoundException: class path resource [data/farm/Server/confData/1000004/contex.xml] cannot be opened because it does not exist
The file exists, I can do
cat /data/farm/Server/confData/1000004/contex.xml
and see its content. Also in windows this code is working - the problem is in linus (i have ubuntu os)
Can any one advise what is wrong here?
Try creating a FileSystemXmlApplicationContext using a Url, like:
new FileSystemXmlApplicationContext("file:/data/farm/Server/confData/1000004/contex.xml");
For further explanation see this: http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch05s07.html 5.7.3 FileSystemResource caveats
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With