Skip to main content
Inspiring
May 7, 2014
Answered

CF11 - SQL Type Not Supported By This Driver on basic ORM Update

  • May 7, 2014
  • 1 reply
  • 2145 views

We are testing out one of our web applications in CF11.

We have a basic ORM entity update function that fetches an object, individually calls several setters, and then saves the entity inside a transaction tag in cfscript. We are working with Microsoft SQL 2012 Standard edition. This worked under CF9 and CF10.

Under CF11, we get the following error:

Error: An exception occurred when committing the transaction. The root cause of this exception was: coldfusion.orm.hibernate.HibernateSessionException: [macromedia][SQLServer JDBC Driver]The specified SQL type is not supported by this driver..


The line of code throwing the error is whatever the last line inside the transaction {} block is.


The SQL being run follows. This is super basic. What is going on here?



Hibernate log:


05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE DEBUG - update dbo.registrations set childID=?, registered=?, dropped=?, droppedBy=?, droppedDate=?, neverPlayed=?, WL=?, WLRemoveDate=?, WLRemoveBy=?, sexdiv=?, age_calc=?, Scholarship=?, VIP=?, PlayerSchool=?, Grade=?, PlayerHeight=?, PlayerWeight=?, PlayerEmail=?, PlayerCellPhone=?, LBrother=?, RecentlyMoved=?, submitterID=?, submitType=?, comments=?, RegistrationComments=?, CommentsDivDir=?, DroppedComments=?, RegistrarOnly=?, MedicalInsCarrier=?, MedCond=?, Mediprobs=?, PhysicianName=?, DoctorFull=?, EmergencyContact=?, EmergencyPhone=?, seasonID=?, moveUp=?, moveUpStatus=?, moveUpAsked=?, MoveUpOldDiv=?, PlayedLastYear=?, MethodOfPayment=?, Fee=?, RefundAmount=?, RefundDate=?, AmountPaid=?, InvoiceNo=?, Div=?, batchNum=?, sexdivNextYear=?, email_other=?, dateCreated=?, dateModified=?, lastModifiedBy=?, playerNum=?, refund=?, refundBy=?, donation=?, isAYSOExtra=?, yearbooksGiven=?, yearbooksOrdered=?, noPracticeDay=?, coed=?, clientID=?, seasonUID=? where registrationID=?

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [1] as [VARCHAR] - 37F22B1B-066D-45CB-BBDA-677D8059159D

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [2] as [BOOLEAN] - true

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [3] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [4] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [5] as [TIMESTAMP] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [6] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [7] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [8] as [TIMESTAMP] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [9] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [10] as [VARCHAR] - B19

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [11] as [INTEGER] - 6

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [12] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [13] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [14] as [VARCHAR] - Test

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [15] as [VARCHAR] - 3

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [16] as [VARCHAR] - 23

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [17] as [VARCHAR] - 44

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [18] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [19] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [20] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [21] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [22] as [VARCHAR] - 75F5114C-B32A-4BDA-A125-93FAB7EB3834

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [23] as [VARCHAR] - Father

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [24] as [VARCHAR] - test

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [25] as [VARCHAR] - test

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [26] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [27] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [28] as [VARCHAR] - test

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [29] as [VARCHAR] - BCS

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [30] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [31] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [32] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [33] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [34] as [VARCHAR] - LK

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [35] as [VARCHAR] - 302-555-1212

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [36] as [INTEGER] - 9

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [37] as [SMALLINT] - 1

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [38] as [INTEGER] - 0

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [39] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [40] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [41] as [BOOLEAN] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [42] as [VARCHAR] - Credit Card - Automated

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [43] as [DOUBLE] - 100.0

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [44] as [DOUBLE] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [45] as [TIMESTAMP] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [46] as [DOUBLE] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [47] as [VARCHAR] - 7176

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [48] as [SMALLINT] - 8

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [49] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [50] as [VARCHAR] - B8

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [51] as [VARCHAR] -

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [52] as [TIMESTAMP] - 2013-07-19 12:29:50.0

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [53] as [TIMESTAMP] - {ts '2014-05-07 19:21:04'}

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [54] as [VARCHAR] - 75F5114C-B32A-4BDA-A125-93FAB7EB3834

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [55] as [INTEGER] - 18973

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [56] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [57] as [VARCHAR] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [58] as [DOUBLE] - <null>

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [59] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [60] as [SMALLINT] - 0

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [61] as [SMALLINT] - 0

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [62] as [VARCHAR] - Wednesday

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [63] as [BOOLEAN] - false

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [64] as [VARCHAR] - 2BDE1C40-A442-46D0-AD11-2E9E9F078069

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [65] as [VARCHAR] - 8FD74B93-990E-4DFE-8D0A-352EA5461180

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE TRACE - binding parameter [66] as [VARCHAR] - 42E5F844-1310-41CE-BDD6-BB4E6FB8D847

05/07 17:21:04 [ajp-bio-8014-exec-1] HIBERNATE ERROR - [macromedia][SQLServer JDBC Driver]The specified SQL type is not supported by this driver.

This topic has been closed for replies.
Correct answer Aquitaine

The problem is that CF11 uses a version of hibernate in which boolean fields that contain NULL values are bugged in MS SQL. It is in the release notes and Adobe has shown no indication that they intend to update Hibernate in CF11 to fix it. I added a vote to the bug:

Bug#3518916 - Trying to inserting Null in primitive boolean type throws error for SQLServer

The workaround is to replace ormtype="boolean" with ormtype="numeric_boolean". I haven't tried this as we'd been holding off in the hopes that they would patch to a later release of Hibernate but no luck so far.

1 reply

Participating Frequently
July 18, 2014

Did you find any solution to this problem?

While searching on Google I found that you may check you datetime-fields to be nullable. Wasn't my case tho...

AquitaineAuthorCorrect answer
Inspiring
July 18, 2014

The problem is that CF11 uses a version of hibernate in which boolean fields that contain NULL values are bugged in MS SQL. It is in the release notes and Adobe has shown no indication that they intend to update Hibernate in CF11 to fix it. I added a vote to the bug:

Bug#3518916 - Trying to inserting Null in primitive boolean type throws error for SQLServer

The workaround is to replace ormtype="boolean" with ormtype="numeric_boolean". I haven't tried this as we'd been holding off in the hopes that they would patch to a later release of Hibernate but no luck so far.