I have a Spring beans.xml that specifies a certain class my.package.Class to be injected somewhere in my code by Autowiring. The program is actually a web application inside a Tomcat container. Now when I launch Tomcat the logfile tells me my.package.Class cannot be found, even though its JAR is both in the classpath and the web application’s lib/ directory. Do I have to tell Tomcat or Spring where to find the JAR, too, and if so: how?
I have a Spring beans.xml that specifies a certain class my.package.Class to be injected
Share
Make sure, you have this code in your context:
For more info you better read http://springindepth.com/book/in-depth-ioc-autowiring.html
By the way, check the default output folder in your project build path. That could also be the cause.