-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: SQLServerDialect not working for SQLServer 2005
PostPosted: Wed Jun 29, 2005 11:25 pm 
Beginner
Beginner

Joined: Mon Oct 11, 2004 2:22 am
Posts: 41
Is there a way to rectify this while still using this version of Hibernate?
Is there a new version of hibernate which supports SQLServer 2005?

Hibernate version: 2.1.7c

Mapping documents:
Code:
<property name="systemRole" type="boolean" column="SystemRole" not-null="true"/>


Code between sessionFactory.openSession() and session.close():
Code:
session.replicate(role, ReplicationMode.OVERWRITE);


Full stack trace of any exception that occurs:
Code:
13:21:27,640 DEBUG net.sf.hibernate.SQL: - insert into SVD_ROLE (RoleName, Description, SystemRole, RoleId) values (?, ?, ?, ?)
13:21:27,718 ERROR net.sf.hibernate.util.JDBCExceptionReporter: - The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 3 (""): Data type 0x32 is unknown.
13:21:27,734 ERROR net.sf.hibernate.impl.SessionImpl: - Could not synchronize database state with session


Name and version of the database you are using:SQL Server 2005 (preview)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 11:28 pm 
Beginner
Beginner

Joined: Mon Oct 11, 2004 2:22 am
Posts: 41
the SystemRole column is of type: (tinyint, not null)

i suspect this to be the problem


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 11:39 pm 
Beginner
Beginner

Joined: Mon Oct 11, 2004 2:22 am
Posts: 41
changed SystemRole column to type int. same problem. i'm assuming the java type boolean is not being converted into an appropriate database type for int/tinyint.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 11:43 pm 
Beginner
Beginner

Joined: Mon Oct 11, 2004 2:22 am
Posts: 41
further reading .. looks like a jtds bug. however i am using jtds1.1, and this bug apparently was fixed in jtds0.9rc1. i'll log the issue there. in the mean time, any suggestions are welcome.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 7:46 am 
jTDS Developer
jTDS Developer

Joined: Tue Feb 24, 2004 5:36 pm
Posts: 70
Location: Bucharest, Romania
wanton,

How does your URL look like? jTDS should not be using type 0x32 (BIT) with SQL Server versions 7.0 and later, including 2005.

Alin,
The jTDS Project.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 04, 2005 3:49 am 
Beginner
Beginner

Joined: Mon Oct 11, 2004 2:22 am
Posts: 41
url:

jdbc:jtds:sqlserver://servername:port/dbname


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 3:52 am 
jTDS Developer
jTDS Developer

Joined: Tue Feb 24, 2004 5:36 pm
Posts: 70
Location: Bucharest, Romania
Could you please enable DriverManager logging and post the resulting log dump?

This seems really weird, I was expecting a tds=4.2 in your URL. What's happening is that although the TDS version is 8.0 jTDS is sending a TDS 4.2 type (when there's a clear > 4.2 condition in the code).

Alin.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.