Copy link to clipboard
Copied
Good afternoon,
In an attempt to finally upgrade my environment from CF2016 to CF2021, one of my servers is experiencing an issue with losing connectivity to the data sources. Upon reviewing the coldfusion-error.log I find the following error on each of the data sources: "java.lang.NoClassDefFoundError: Could not initialize class com.microsoft.sqlserver.jdbc.DriverJDBCVersion.".
The required files are installed to cfusion>lib: mssql-jdbc_auth-11.2.0.x64.dll and mssql-jdbc-11.2.0.jre11.jar.
I was able to correct the issue by shutting down ColdFusion services and clearing out the contents of the cfusion>wwwroot>WEB-INF>cfclasses and restarting ColdFusion but this is not a viable solution for a Production system.
Any idea what might be going on? I am on the latest update of CF2021.
1 Correct answer
The latest on this, having Sandbox Security enabled disabled my data sources. Disabling sandbox security got the data sources working again. Curious though. In the configuration of Sandbox Security, nothing was denied. It was all open. How to resolve? Any suggestions?
Copy link to clipboard
Copied
In order to use JDBC you need to download latest JDBC jar file for MSSQL, copy it to cfusion/lib directory,refer to below document for more information
Thanks
Ravi
Copy link to clipboard
Copied
Ravi,
I've already installed the latest JDBC drivers and have installed them per the guidelines here. Everything works but something is off, and after restart or something else going on on the server, I've had to perform the actions described in the initial post to get everything working again. Any other input?
Copy link to clipboard
Copied
Hi @neowire ,
Sorry to say, whichever way you look at it, you will have to restart ColdFusion to fix the error. Something might be dynamically affecting the classpath. The NoClassDefFoundError suggests that the class DriverJDBCVersion was there during compile-time, but ColdFusion was unable to find it during runtime.
I have some questions:
- Is ColdFusion's SQL Server package installed?
- What's the purpose of the DLL? Is it necessary?
Copy link to clipboard
Copied
Yes. The SQL Server package is installed. We can revert to using the standard SQL drivers to see if that works as it should. When under CF11/2016 the CF application developers wanted to use the Microsoft connector due to some stability issues they were encountering at the time.
As for the dll, if it's not necessary for the install of the driver then I suppose it can go away. The developers of the CF applications I host in Production provided the combination of files years back and we've been carrying it forward since.
Copy link to clipboard
Copied
The latest on this, having Sandbox Security enabled disabled my data sources. Disabling sandbox security got the data sources working again. Curious though. In the configuration of Sandbox Security, nothing was denied. It was all open. How to resolve? Any suggestions?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
@neowire ,
Thanks for sharing that. It is indeed curious.
Can you reproduce it? That is, does the situation recur when you enable sandbox security once agaiin?
Copy link to clipboard
Copied
Yes but I am working on a Production only environment so I cannot easily switch things around. I am currently working on standing up a brand new environment in Azure which is currently non Production so I will test there once ready. Could you possibly direct me to good documentation on how to structure the JDBC connection string? I've had issues with Sandbox Security before and it was something in the connection string. Not saying it's this issue, but something to evaluate. Additionally, this same occurrence has happened on all 4 installations of CF2021 that I have in my environment. So, as far as can it be reproduced, definitely...

