-->
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.  [ 6 posts ] 
Author Message
 Post subject: while String property ok,but Clob wrong??!!
PostPosted: Fri Feb 13, 2004 11:57 pm 
Newbie

Joined: Fri Feb 13, 2004 11:44 pm
Posts: 4
Class 1:Employee
Class 2:Document

one employee to many document

content is one of document's property

when content type is String,every thing is right

as ms sqlserver 2000 is used,if column content's type is the varchar(8000),it is not enough,it should be text type.

now,change the type of property content as java.sql.Clob,generate database table is yet right,the columns type is now text, but when insert document,an errror raise as this:

11:24:44,037 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: HY01011:24:44,037 ERROR JDBCExceptionReporter:46 - [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 2.11:24:44,037 WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: HY01011:24:44,037 ERROR JDBCExceptionReporter:46 - [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 2.11:24:44,077 ERROR JDBCExceptionReporter:38 - could not load: [com.jieshun.jsproject.entity.Employee#030082]java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 2. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.validateColumnIndex(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getString(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.getString(Unknown Source) at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:216) at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:216) at net.sf.hibernate.type.StringType.get(StringType.java:18) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53) at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66) at net.sf.hibernate.loader.Loader.hydrate(Loader.java:611) at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:552) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:511) at net.sf.hibernate.loader.Loader.getRow(Loader.java:426) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:209) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:831) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:851) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:57) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:49) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:419) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2081) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1955) at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1884) at com.jieshun.jsproject.entity.Employee.getInstance(Employee.java:220) at com.jieshun.jsproject.entity.Document.main(Document.java:604)com.jieshun.jsproject.ProjectException: net.sf.hibernate.JDBCException: could not load: [com.jieshun.jsproject.entity.Employee#030082]

can anybody here give me a hand?

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 14, 2004 9:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Use another JDBC driver, the microsoft supplied one sucks.


Top
 Profile  
 
 Post subject: is there any mssql driver else?
PostPosted: Sun Feb 15, 2004 10:04 pm 
Newbie

Joined: Fri Feb 13, 2004 11:44 pm
Posts: 4
first thank gloeglm ,
my jdbc driver is SQL Server 2000 Driver for JDBC Service Pack 2 download from www.microsoft.com,it's the most new.the url is:
http://www.microsoft.com/downloads/deta ... layLang=en

if there is some mssql jdbcdriver else,can you give me the url to download it?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 15, 2004 11:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I recommend JSQL it is /much/ less buggy and much faster.


Top
 Profile  
 
 Post subject: thanks
PostPosted: Mon Feb 16, 2004 2:50 am 
Newbie

Joined: Fri Feb 13, 2004 11:44 pm
Posts: 4
I'll try the jsql driver.
thank gavin very much.


Top
 Profile  
 
 Post subject: jsql driver
PostPosted: Mon Feb 16, 2004 3:14 am 
Newbie

Joined: Fri Feb 13, 2004 11:44 pm
Posts: 4
well,when jsql driver used,everything is OK!

:)

best regards to every one.


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