org.apache.tomcat.dbcp.dbcp cannot be resolved to a type

2.2k Views Asked by At

I recently installed a newer version of Eclipse (Neon v1) and Tomcat 8.0, and I am now getting this error:

org.apache.tomcat.dbcp.dbcp cannot be resolved to a type.

I am 99% sure that nothing in my code has changed. The way I understand it, org.apache.tomcat.dbcp.dbcp comes from the JAR in Tomcat's library called "tomcat-dbcp.jar" which is there.

I've tried uninstalling and reinstalling Tomcat and Eclipse, but I'm still getting the same error. I've tried adding the tomcat-dbcp.jar to my project libraries and tried importing it directly in the java file but I still get the error. I know it is something to do with the .jar files but I cannot figure out what else I can possibly do.

1

There are 1 best solutions below

1
On

Nevemrind, figured out that there is a new version of DBCP and I had to change the tag to "org.apache.tomcat.dbcp.dbcp2" to fix the problem.