This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Which sound like it has read and understood my bean definitions in spring-config.xml.
No.. Spring is just telling you that, it is trying to load the xml bean definitions from the file, which you have specified as it's present in classpath..
In the next line, it tells you that it can't read the file, because its not present..
Nothing confusing here, its pretty straight forward..
Where you have placed your spring-config.xml file... ?
Philip Grove wrote:The same file in the default package works just fine. It just might stay in the default folder because it makes sense to me that a configuration file is located in src/main/resources.
Yes, I agree it makes more sense. I always put my config files in the root of the classpath, and maven copies anything in the resources directory to the classpath.
INFO - Loading XML bean definitions from class path resource [carDemo-beans.xml]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [carDemo-beans.xml]; nested exception is java.io.FileNotFoundException: class path resource [carDemo-beans.xml] cannot be opened because it does not exist.
I see the above message in console. But I have initially created carDemo-beans.xml, placed in the package com/vehicles. Since I ws getting the above msg I have added the beans xml file to class path
by using add to build path option. After doing this, xml file was present at the referenced libraries section. Still I get the same error.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com