• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FileSystemXmlApplicationContext not found

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am trying to use FileSystemXmlApplicationContext from a servlet....
compilation is done perfactly..but at runtime class not found exception is coming..
error.png
[Thumbnail for error.png]
snepshot of eclipse
 
Greenhorn
Posts: 9
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Sawan,

In case of Servlet, the container(Tomcat or such) is considered as root directory for the your execution. And when you give file path as you have shown, it is looking for file in the tomcat folder, where it is not present.

To solve this issue, you need to refer to the classpath resource resolver. You can use like:



This should allow you to refer to the file in your project classpath.

Refer to the similar issue.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic