Hi All,
Our application is being developed in JBoss 4.3.0.GA_CP02 against
SQLServer 2005 and currently uses the JTDS jdbc driver without any
major problem. We've recently been investigating changing over to the
MS JDBC driver and I've reconfigured our app to use it (Microsoft SQL
Server 2005 JDBC Driver, version: 1.2.2828.100 is reported in the log
file).
However, our application fails to start up correctly, throwing the
following exception (significant part included, I can post the rest if
necessary):
Caused by: org.hibernate.HibernateException: Wrong column type in
MyDB.Course for column LongDescription. Found: text, expected: varchar
(255)
at org.hibernate.mapping.Table.validateColumns(Table.java:284)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:
1116)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate
(SchemaValidator.java:139)
at org.hibernate.impl.SessionFactoryImpl.<init>
(SessionFactoryImpl.java:349)
at org.hibernate.cfg.Configuration.buildSessionFactory
(Configuration.java:1327)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory
(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory
(Ejb3Configuration.java:669)
This occurs as the Schema Validator tries to validate the first of our
tables that contains a column with the varchar(max) datatype.
Has anyone else seen this? It is obviously a showstopper for us WRT
the Microsoft JDBC driver.
Cheers,
Rob Hills
Waikiki, Western Australia
>> Stay informed about: SQLServer 2005 + JBoss + MS JDBC driver varchar(max) problem