• 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

Question on loading applicationContext

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently trying to implement Spring MVC inorder to test a service.

I have a implemented a Controller, I inject an serviceClass, via one of the methods in the service class I create a bean factory and using which I call other services.
I deploy the project in Tomcat (applicationContext.xml is in WEB-INF). type in the url. The controller calls the service class, but when the service class is creating a factory the console throws this

802 INFO 42531[http-8080-exec-4] - org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file [C:\WINDOWS\applicationContext.xml]

and throws a stack trace.

applicationContext.xml is in the WEB-INF folder, why is it looking into C:\WINDOWS\applicationContext.xml?
 
Seetharaman Venkat
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved it,
Created a new folder beans, added my applicationContext.xml to it and added the bean folder to the classpath. I was able to call my services without a glitch.
reply
    Bookmark Topic Watch Topic
  • New Topic