-->
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.  [ 3 posts ] 
Author Message
 Post subject: Exception - Cannot re-read column number
PostPosted: Thu May 13, 2004 6:46 am 
Newbie

Joined: Mon May 10, 2004 2:10 pm
Posts: 2
Getting this error when (it looks like) Hibernate is attempting to re-read or read out of order a text or ntext column. I found an article from MS 824106 related to this. This seemed to have come up when I added a sub-class to the listing table. Is this an MS thing or am I doing something incorrect?

Using latest public version of Hibernate.
Using MS SQL Server 2000 and MSJDBC Driver.

Microsoft KB:
http://support.microsoft.com/default.aspx?kbid=824106

Exception:
org.springframework.jdbc.UncategorizedSQLException: (HibernateAccessor): encountered SQLException [[Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 3.]; nested exception is java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 3.

Mapping:
<class name="Listing" table="docs_listing">
<id name="id" column="id" type="integer">
<generator class="assigned"/>
</id>

<discriminator column="listing_type" not-null="true"/>

<property name="name" column="name" type="string" not-null="true"/>
<property name="description" column="descr" type="text"/>
<property name="summary" column="summary" type="text"/>
<property name="listingDate" column="listing_date" type="calendar" not-null="true"/>

<set name="categories" table="docs_categories" lazy="false">
<key column="doc_id"/>
<many-to-many column="category_id" class="DocumentCategory"/>
</set>

<subclass name="HyperlinkListing">
<property name="externalUrl" column="url" type="string" not-null="true"/>
</subclass>

<subclass name="FileListing"/>
<subclass name="WebPageListing"/>

</class>


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 7:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Microsoft JDBC driver is crap. Either use another driver (e.g. jDTS) or take a look at http://www.hibernate.org/80.html and especially http://msjdbcproxy.sourceforge.net/


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2004 8:04 am 
Newbie

Joined: Mon May 10, 2004 2:10 pm
Posts: 2
Thank you. I will try one of those.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.