开发者

NoClassDefFound error - Spring JDBC

开发者 https://www.devze.com 2023-01-01 11:40 出处:网络
Right now, I\'m compiling my .class files in eclipse and moving them over to my %tomcat_home%\\webapps\\myapp\\WEB-INF\\classes directory. They compile just fine.

Right now, I'm compiling my .class files in eclipse and moving them over to my %tomcat_home%\webapps\myapp\WEB-INF\classes directory. They compile just fine.

I also have in the ...\classes directory a org.springframework.jdbc-3.0.2.RELEASE.jar which I have verified has the org.springframework.jdbc.datasource.DriverManagerDataSource class inside it.

However, I get a NoClassDefFound error when I run my class and it tries to DriverManagerDataSource source = new开发者_开发知识库 DriverManagerDataSource();

I don't understand why it wouldn't be finding that jar.

Any help is appreciated!


Jar files in webapp should be placed in WEB-INF/lib, not in WEB-INF/classes.

0

精彩评论

暂无评论...
验证码 换一张
取 消