Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

SQLServer 2005 + JBoss + MS JDBC driver varchar(max) problem

 
   Database Help (Home) -> JDBC Driver RSS
Next:  Updating an indexed column with the same existing..  
Author Message
Rob Hills

External


Since: Nov 20, 2008
Posts: 2



(Msg. 1) Posted: Thu Nov 20, 2008 5:55 pm
Post subject: SQLServer 2005 + JBoss + MS JDBC driver varchar(max) problem
Archived from groups: microsoft>public>sqlserver>jdbcdriver (more info?)

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 
Back to top
Login to vote
Rob Hills

External


Since: Nov 20, 2008
Posts: 2



(Msg. 2) Posted: Fri Nov 21, 2008 12:38 am
Post subject: Re: SQLServer 2005 + JBoss + MS JDBC driver varchar(max) problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

For the record, we've worked out the cause of the problem and a couple
of solutions, detailed on the Hibernate users forum here:

http://forum.hibernate.org/viewtopic.php?p=2400197#2400197

Cheers,

Rob Hills

 >> Stay informed about: SQLServer 2005 + JBoss + MS JDBC driver varchar(max) problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
JDBC driver has issues with VARCHAR(24) - All of my VARCHAR(24) columns are reported as size 7 from java.sql.DatabaseMetaData::getColumns. All other sizes from 1 to 49 report the correct COLUMN_SIZE. Any ideas? The following program shows the problem (using 1.2.2828.100 against SQL Server....

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]U.. - Folks, I was getting this exception occasionally and tracked in down to the application server C drive being full. Looks like the drivers are writing to logs (event ?) on this drive. Freeing up space removed the problem. Hope this helps someone. ..

New JDBC 1.2 driver runs slower than JDBC 1.1 driver-- exp.. - I have some test programs I run which do repeated simple SQL Select and SQL update statements. These test programs consistently take 5 to 10% longer to run with the new JDBC 1.2 driver than they do with the JDBC 1.1 driver. Is this expected? I..

2005 JDBC Driver: Integreated Authentication - Good evening, I am trying to get the new 2005 JDBC driver to use integrated authentication. I have tried adding the parameter -Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86 to the vm but I get an er...

JDBC Driver Support for SQL 2005 Schemas? - Anyone know if the JDBC driver supports SQL 2005 schemas? If so, which version. When we use the JDBC driver, it seems to report back database roles instead of schemas, SQL 2000 style. Thanks
   Database Help (Home) -> JDBC Driver All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]