Reputation: 4568
I'm trying to run a Spring MVC project in STS with Tomcat 6.0 server. But I have these 2 errors which I can't resolve:
Class 'org.springframework.jdbc.datasource.DriverManagerDataSource' not found [config set: projectName/web-context] root-context.xml /projectName/src/main/webapp/WEB-INF/spring Spring Beans Problem
Class 'org.springframework.web.servlet.view.InternalResourceViewResolver' not found [config set: projectName/web-context] servlet-context.xml /projectName/src/main/webapp/WEB-INF/spring/appServlet Spring Beans Problem
I suspect this has to do with the build path. Any suggestions?
Upvotes: 0
Views: 6565
Reputation: 531
I had the same problem. I resolved this issue deleting this mapping in the spring config-file. The class didn't exist, but the mapping remained. The mapping was old. Delete the old mapping in the spring config-file and spring will work.
Upvotes: 0
Reputation: 1611
For me it was resolved by disabling Maven Workspace Resolution. Most of these kind of minor issues were caused because of enabling Maven Workspace Resolution.
Id suggest to do yourself a favor by disabling it.
Upvotes: 1
Reputation: 4568
These problems were solved by right clicking project name in Package Explorer->Spring Tools->Add Spring Project Nature. (Don't know what really happened, only that problems were gone afterwards.)
Upvotes: 3