I am using Hibernate 2.1.2 and generate XML mappings using XDoclet.
I use the 'native' identity generator because one of the clients using the product deploys on MS SQL Server. Otherwise I develop and deploy on PostgreSQL.
My java files all have:
Code:
/**
* Returns the primary key.
* @hibernate.id column="userid" generator-class = "sequence"
* @hibernate.generator-param name="native" value="tbluser_userid_seq"
* @return
*/
public Long getUserId() {
return userId;
}
I use ant to do all the generation and schemaexport. It has worked beautifully until I tried to switch to MS SQL Server 2000.
Now, when I run the schemaexport task I get the following error:
[schemaexport] BUILD FAILED: file:/home/lisa/workspace/pacs/build.xml:156: Schema text failed: could not instantiate id generator
I can't seem to get a more detailed stack trace via ant, even with the -v (verbose) param on.
The driver I am using for MS SQL Server is the jTDS (
http://jtds.sourceforge.net/) 0.8 rc1.
I have tried changing the class generator to 'identity', and a number of commercial drivers (listed on the hibernate compatability page), but with the same results.
Any suggestions?