The moose likes Spring and the fly likes Can't load in config file from classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Can Watch "Can New topic
Author

Can't load in config file from classpath

majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 160
Hi,

I have the same problem, even changing it to :
ctx.load("classpath:META-INF/spring/app-context-annotation.xml");

did not work, I always have :

Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [app-context-xml.xml]; nested exception is java.io.FileNotFoundException: class path resource [app-context-annotation.xml] cannot be opened because it does not exist

Please your help is appreciated.
thanks
majid
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17234
    
    1

What is

[app-context-xml.xml];

Where is that file? Where do you put yourapp-context-annotation.xml file? Is this in the src/main/resources directory?

We need more information to be able to help.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can't load in config file from classpath
 
Similar Threads
RequestDispatcher clarfication
Hibernate not finding Oracle driver - despite straight JDBC working
Hi
GenericXmlApplicationContext classpath
reloading property files after tomcat has started.