During Tomcat deployment, java. SQL. sqlexception: no suitable driver found for JDBC: sqlserver

Source: Internet
Author: User

When Tomcat is deployed, the driver reports an error. Stack information:

Java. SQL. sqlexception: no suitable driver found for JDBC: sqlserver: // 172.20.0.30: 1433; databasename = sapdataconvert
At java. SQL. drivermanager. getconnection (drivermanager. Java: 602)
At java. SQL. drivermanager. getconnection (drivermanager. Java: 185)
At com. jhconn. DB. connectionpool. getnewconnection (connectionpool. Java: 108)
At com. jhconn. DB. connectionpool. getconnection (connectionpool. Java: 89)
At com. jhconn. DB. operatedb. <init> (operatedb. Java: 30)

 

The msql Server 2005 driver I use is the sqljdbc. jar file.

Note: You should pay attention to version issues when using this file, which is the most likely to cause problems.

 

I recommend that you do not use this package. Use jdt package

I am using: jtds-1.2.4.jar files

For: http://sourceforge.net/projects/jtds/files/

 

My links are as follows:

URL: JDBC/: jtds/: sqlserver/: // your_db_ip/: 1433/your_db_name

Driver_name: net. SourceForge. jtds. JDBC. Driver

User: User

Pass: Pass

 

That's it. OK.

 

I hope that this problem will not happen again if you are confused like me.

 

Why use jdt:

Why use jtds?

Jtds is free software. jtds is released under the terms of the GNU lgpl
, Giving you not
Only the posibility to debug and tweak it to your own liking but also
To use it in and distribute it with your free or invalid cial
Applications.

The other "free" choices, the JDBC-ODBC bridge and
Microsoft's own JDBC driver are not actually free. If you encounter
Issue with any of them you won't be able to fix it yourself and
Response times from both Microsoft and Sun are anything but short.
Also, both of them lack functionality (the Microsoft driver implements
JDBC 2.0, while the bridge is just a JDBC 1.0 implementation) and have
Serious stability problems: the bridge crashes the JVM if the ODBC
Driver has any problem and Microsoft just has no intention of really
Supporting Java/jdbc.

Jtds is also the most connector t JDBC driver for both SQL Server and
Sybase. We have an older benchmark result
But we strongly encourage you want to download any benchmark published
Commercial JDBC driver vendors and see for yourself. Here are a couple
Of benchmarks you cocould use: jnetdirect's
JDBC Performance Benchmark
And I-Net
Software's benchtest 2.1 for ms SQL Server
.

Anyway, just give it a spin. Get the latest one from
Here
And see whether you like it or not.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.