aspose file tools*
The moose likes Other Application Frameworks and the fly likes Error While Executing a sample spring application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Error While Executing a sample spring application" Watch "Error While Executing a sample spring application" New topic
Author

Error While Executing a sample spring application

anilkumar pamidi
Greenhorn

Joined: Feb 05, 2007
Posts: 2
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

Joined: Feb 05, 2007
Posts: 2
Hello,
Can Anybody help me out, I cant move further
Anil
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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 ?


[My Blog]
All roads lead to JavaRanch
 
 
subject: Error While Executing a sample spring application