Installing MS SQL Server JDBC driver on Windows

-2

I am interested in using JasperReports to satisfy numerous reporting needs that my company has. I am not a Java developer, so most of what is described with regards to how Jasper/Tomcat/JDBC work is very new to me.

I am trying to setup my JasperServer to use the Microsoft MS SQL JDBC driver. I have placed the sqljdbc.jar file in the comon/lib directly of the apache-tomcat root. When I try to create a new datasource, the test always fails (without giving me a reason why). When a check under Managage --> Analysis Properties, I do not see the MSSQL Server driver listed under JdbcDrivers.

Am I doing something wrong? How do I properly install this driver?

medium_grade's picture
Joined: Nov 3 2008 - 11:41am
Last seen: 11 years 1 month ago

3 Answers:

1

I had problems with the existing MSSQL JDBC driver in JasperServer and used the jTDS MSSQL driver instead. http://jtds.sourceforge.net/

Just copy the jtds*.jar file to the \apache-tomcat\webapps\jasperserver\WEB-INF\lib folder.

When you are developing using iReport, you can also use the same driver, you will have to copy that same jtds driver to the appropriate lib folder where ireport is installed. I've been able to get the pre-installed MSSQL driver to work with ireport, so not using jtds there, I used "com.microsoft.sqlserver.jdbc.SQLServerDriver" driver instead.

When you are setting up the JDBC data source in JasperServer, here are sample Driver and URL entries:

DRIVER = net.sourceforge.jtds.jdbc.Driver

URL = jdbc:jtds:sqlserver://192.168.1.1/yourdatabasename;instance=

 

carminez's picture
Joined: Oct 2 2008 - 12:06pm
Last seen: 11 years 2 months ago
0
The slashes got removed from the path to copy the jtds.jar file... /apache-tomcat/webapps/jasperserver/WEB-INF/lib
carminez's picture
Joined: Oct 2 2008 - 12:06pm
Last seen: 11 years 2 months ago
0

Worked like a charm! Thanks!

medium_grade's picture
Joined: Nov 3 2008 - 11:41am
Last seen: 11 years 1 month ago
Feedback