This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error While Executing a sample spring application

 
anilkumar pamidi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have got the following error while executing the spring application with the code

BeanFactory factory =
new XmlBeanFactory(new FileSystemResource("hello.xml"));
GreetingService greetingService =


Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [D:\workspace\SpringsDemo\hello.xml]; nested exception is java.io.FileNotFoundException: hello.xml (The system cannot find the file specified)
Caused by: java.io.FileNotFoundException: hello.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:85)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:297)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:73)
at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61)
at com.springs.demo.hello.HelloApp.main(HelloApp.java:13)

Help will be appreciated.
Regards
Anil
 
anilkumar pamidi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Can Anybody help me out, I cant move further
Anil
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The message says it all: "The system cannot find the file specified". Where is your context file, and from where are you executing your application from ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic