Reputation: 814
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
Upvotes: 1
Views: 489
Reputation: 85789
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.
Upvotes: 2