View Single Post
  #2 (permalink)  
Old December 2nd, 2014, 07:31 AM
ajfarroll ajfarroll is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Successful Connection

I managed to find a solution and managed to create a successful connection. It appears that when attempting to connect to SQL Server 2008 R2 using the Microsoft sqljdbc driver can cause huge problems as outlined in this link I finally found below and they also suggest an alternative third party driver named jtds;

The driver is available from this URL;

I downloaded the driver but required an earlier version so downloaded version 1.2.7 and simply placed the jar file in tomcat/lib directory. Then changed the Tomcat context.xml's JNDI entry to be the following and it is connecting;

<Resource auth="Container" driverClassName="net.sourceforge.jtds.jdbc.Driver" factory="org.moss.jdj.dbcp.EncryptedDataSourceFact ory" maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/edrms" password="password" type="javax.sql.DataSource"
url="jdbc:jtds:sqlserver://myservername:2369:\mySQLdatabaseinstance;databaseN ame=mydatabasename" username="username" />

Thanks to all who viewed

Reply With Quote