Question

I try to configure Tomcat, and MySql Connection.

I add tomcat-jdbc.jar and mysql.connector.jdbc but when I run Tomcat, I obtain this error:

Unexpected exception resolving reference
   java.sql.SQLException: net.sourceforge.jtds.jdbc.Driver

   ...

   Caused by: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver

   ...

   GRAVE: Exception processing Global JNDI Resources
   javax.naming.NamingException: net.sourceforge.jtds.jdbc.Driver

Can you give me any suggest??

Thanks

EDIT After add jtds sourceforge jar:

I obtain this new error when I try deploy my web app:

Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource';

nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: 

No bean named 'dataSource' is defined Caused by: 

org.springframework.beans.factory.NoSuchBeanDefinitionException: 

No bean named 'dataSource' is defined
Was it helpful?

Solution

You're using jtds driver for sql server, so you need to download the right jar. You can download it from the official site: http://jtds.sourceforge.net/

After downloading it, add it to %TOMCAT_PATH%\lib, where %TOMCAT_PATH% is the path where you have installed tomcat.

OTHER TIPS

You haven't included the jtds jar in your Tomcat lib, looks like you're missing the jar for this (jtds-1.3.1.jar).

You can download it from here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top