-->
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.  [ 1 post ] 
Author Message
 Post subject: could not read column value from result set.
PostPosted: Mon Jul 14, 2008 10:35 am 
Newbie

Joined: Mon Jul 14, 2008 10:27 am
Posts: 1
I get the following error:

[org.hibernate.type.StringType] - <could not read column value from result set: VALUE_DESC; >
2008-07-14 16:24:57,531 WARN [org.hibernate.util.JDBCExceptionReporter] - <SQL Error: 17006, SQLState: null>
2008-07-14 16:24:57,562 ERROR [*******.dao.hibernate.util.HibernateExceptionHandler] - <org.hibernate.exception.GenericJDBCException: could not execute query

This is the query code. When I execute the run the sql query myself, everything works fine.
Code:
StringBuffer sb = new StringBuffer();
       sb.append("select cwv.id           id ");
       sb.append(",      cwv.display_name display_name ");
       sb.append(",      cwv.value_desc       description ");
       sb.append("from   cca_subjects_view cwv ");
       sb.append(",      cca_systems    sys ");
       sb.append("where  cwv.sys_code = sys.code ");
       sb.append("and    sys.id = :sys_id ");
       sb.append("order  by display_name ");


Mapping file:
<class name="Subject" table="CCA_SUBJECTS_VIEW">
<id name="id" column="ID">
<generator class="increment"/>
</id>
<property name="description" not-null="true" column="VALUE_DESC" />
<property name="displayName" not-null="true" column="DISPLAY_NAME" />
</class>

What is going wrong??


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

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.