• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic