Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I'm managing a webapp project using Adobe Coldfusion 9.0.1 as the middleware and SA 11 ( as the database backend.

The recently released Coldfusion 9 introduced Hibernate-based ORM. It can be configured to a 'SybaseAnywhere' dialect. We are essentially using ORM for CRUD operations, not for fancy schema generation, etc.

Having read through Glenn Pauley's Differences between jConnect and the iAnywhere JDBC driver series (thanks Glenn!) we are using the latter, which we tried over odbc and without (sybase.jdbc.sqlanywhere.IDriver class over sajdbc.jar and dbjdbc11.dll only) (Thanks Jason!)

After much googling and asking around I still have no idea what Adobe are calling their SybaseAnywhere Hibernate dialect. They are definitely using hibernate3.jar - which sports a SybaseAnywhereDialect class.

Now, the ORM cookie started to crumble on very basic stuff. With the initial release of Coldfusion 9, you could not map a long (n)varchar to text Hibernate type if the field was nullable. The resulting SQL would issue an insert or update statement setting the column to null, and you'd get a most illuminating error

java.sql.SQLException: This driver does not support JDBC data type with id = 2005

Then, with the new Coldfusion 9.0.1, ORM entity files failed to load altogether where SQL long (n)varchar was mapped to Hibernate text. string works, but then you run into buffer length issues.

To add insult to injury, SQL integer mapped to Hibernate ´int´ stopped working with 9.0.1. You'd set a value to 1 and all you'd get is

The argument passed to the function is not of type integer

As Coldfusion-based 'SybaseAnywhere' Hibernate is temperamental to say the least, we've recently tried out the Hibernate classes provided by Sybase themselves for SA 11. The good thing is that all problems seem to be gone, but we've only just started testing it.

However, as Sybase say themselves, the classes are BETA.

So, is there an authoritative Hibernate dialect for SA 11, and if yes, where?

Bonus question: Is this a good excuse to move right away to SA 12?

asked 25 Jul '10, 10:32

Vincent%20Buck's gravatar image

Vincent Buck
accept rate: 15%

edited 25 Jul '10, 18:59

Ron%20Hiner's gravatar image

Ron Hiner


My apologies, I misread your original post and thought you were asking about an official NHibernate dialect (i.e. one for use with .NET); but obviously, you are requesting a Hibernate dialect (i.e. one for use with JAVA/JDBC). The SQL Anywhere Hibernate dialect that you downloaded from Sybase is authoritative and is definitely the recommended dialect for Hibernate applications connecting to SQL Anywhere.


permanent link

answered 26 Jul '10, 19:05

Karim%20Khamis's gravatar image

Karim Khamis
accept rate: 40%

Since you are already familiar with Glenn's blog entries, I would suggest you check out his entries on NHibernate. Have a look at:


permanent link

answered 26 Jul '10, 15:32

Karim%20Khamis's gravatar image

Karim Khamis
accept rate: 40%

Actually I did, but the most recent of entry I found about Hibernate (as opposed to NHibernate) referred to an update that can now be downloaded from

(26 Jul '10, 16:06) Vincent Buck
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Jul '10, 10:32

question was seen: 3,387 times

last updated: 26 Jul '10, 19:05