Skip to main content
Participant
Jul 15, 2014 8:14 PM UTC
Answered

ColdFusion 10 error attempting to query MSSQL database (SSL)

Hello,

Thanks for taking a look and for any ideas you might have.

Rob

ColdFusion app errors when attempting to query MSSQL 2008 R2 databse via SSL connection.

The datasource verifies fine.  

I have EncryptionMethod=SSL;validateServerCertificate=false for connection string.

Setting a trace on the SQL server doesn't show it trying to hit the database at all.

I have a copy of the same database on a SQL Server 2012 box (this one is server core if it matters).   I can edit the datasource to just point to this server and the app works fine.

Both SQL servers require SSL.

Here is the first few lines of a coldfusion log of database calls.

spy(Thread-66)(2014/07/15 16:07:53.353)>> Connection[1].getMetaData()

spy(Thread-66)(2014/07/15 16:07:53.353)>> java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Object has been closed. ErrorCode=0 SQLState=HY000

java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Object has been closed.

  at macromedia.jdbc.sqlserverbase.ddca.b(Unknown Source)

  at macromedia.jdbc.sqlserverbase.ddca.a(Unknown Source)

  at macromedia.jdbc.sqlserverbase.ddb9.b(Unknown Source)

  at macromedia.jdbc.sqlserverbase.ddb9.a(Unknown Source)

    This topic is closed to new replies. Start a new post to keep the conversation going.
    norrisrgCorrect answer
    Participant
    Jul 18, 2014 2:10 AM UTC

    I figured my problem out today, hope it helps with yours.

    See this link.

    http://support.microsoft.com/kb/2653857

    I installed an old JRE (6 update 27) and it fixed the problem.

    We are catching the patches up on our server tonight.

    Rob

    6 replies

    Participant
    Jul 17, 2014 8:39 PM UTC

    I am having the same problem connecting to the same type of sql server.  I thought it was because the connection string had to be more detailed.

    Translate
    norrisrgAuthorCorrect answer
    Participant
    Jul 18, 2014 2:10 AM UTC

    I figured my problem out today, hope it helps with yours.

    See this link.

    http://support.microsoft.com/kb/2653857

    I installed an old JRE (6 update 27) and it fixed the problem.

    We are catching the patches up on our server tonight.

    Rob

    Translate
    Legend
    Jul 18, 2014 3:55 AM UTC

    Hi Rob,

    Interesting fix. I wonder if the more recent java 7 does not have SQL trusted ssl certificate information in it's keystore?
    It would be interesting to use current java 7 with the keystore file jre\lib\security\cacerts from jre 6u27.

    Just pondering, Carl.

    Translate