문제

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
도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top