locked
Connection has stopped RRS feed

  • Question

  • Hi,

    We migrated a SQL Server database to a new server and updated from 2005 to 2008.  A Java servlet application running through Tomcat on Windows connected to the database using a JNDI connector tag in the context.xml file and all worked well.  Except since the migration the JNDI connection to the SQL server database has stopped working even with the new connection details.  I know the connection details work because I can create a connection through the SQL Server management studio on my PC.  Is there a SQL server configuration setting that would stop this connecting?

    Thanks in advance

    Alanjo

    Thursday, November 13, 2014 10:24 AM

All replies

  • Hi,

    We migrated a SQL Server database to a new server and updated from 2005 to 2008.  A Java servlet application running through Tomcat on Windows connected to the database using a JNDI connector tag in the context.xml file and all worked well.  Except since the migration the JNDI connection to the SQL server database has stopped working even with the new connection details.  I know the connection details work because I can create a connection through the SQL Server management studio on my PC.  Is there a SQL server configuration setting that would stop this connecting?

    Thursday, November 13, 2014 10:22 AM
  • Thursday, November 13, 2014 10:28 AM
  • Hi Alanjo,

    You have to update your JNDI connection driver. This is because version of the SQL Server driver update in SQL Server 2008


    Regards,

    Basit A. Farooq (MSC Computing, MCITP SQL Server 2005 & 2008, MCDBA SQL Server 2000)

    http://basitaalishan.com

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Proposed as answer by Basit Farooq Thursday, November 13, 2014 12:48 PM
    Thursday, November 13, 2014 12:48 PM
  • Thanks for your response Basit.

    When you say update the JNDI connection driver do you mean the driverClassName attribute in the Resource tag in the Tomcat context.xml file?  Currently this is driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver".  I have tried to find an alternative but without success.

    Or do you mean the sql driver jar in Tomcat\lib?  I downloaded the Microsoft JDBC Driver 4.0 for SQL Server and followed the isntuctions and attempted to place the sqljdbc4.jar in Tomcat\lib or in the projects web-inf\lib folder and add the location to the build path but all without success.

    I look forward to your feedback

    Regards

    Alanjo

    Friday, November 14, 2014 4:14 PM