My Java application previously ran against a SQL Server database using the Sourceforge jTds driver. It was able to use the Apache Velocity engine (v2.0) to retrieve templates from a varchar(max)
column in the database. Now the database is to be encrypted so JTDS no longer works -- won't even connect successfully. I have replaced it with Microsoft JDBC driver (mssql-jdbc-7.2.2.jre8). Now the Velocity resource loader fails to find any resource, due to this error:
com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from varchar to BinaryStream is unsupported.
Tried changing the column type to text. Same error. Tried changing to image. Then Velocity apparently finds the resource but the returned template is empty.
Has anyone run into similar issues with Velocity and Microsoft JDBC?