This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Spring and the fly likes Question on loading applicationContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Question on loading applicationContext" Watch "Question on loading applicationContext" New topic

Question on loading applicationContext

Seetharaman Venkat

Joined: Nov 07, 2010
Posts: 16
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( - 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

Joined: Nov 07, 2010
Posts: 16
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.
I agree. Here's the link:
subject: Question on loading applicationContext
Similar Threads
JMS implementation using JNDI in spring application
Spring + Struts [1 web app / 2 ApplicationContext]
Spring2.5.6+Tomcat7: HTTP Status 404: The requested resource () is not available
using TransactionProxyFactoryBean
Tomcat 5.5 SEVERE: Error listenerStart