wood burning stoves*
The moose likes Object Relational Mapping and the fly likes could not read column value from result set: IS6_32_0_; Invalid column name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "could not read column value from result set: IS6_32_0_; Invalid column name" Watch "could not read column value from result set: IS6_32_0_; Invalid column name" New topic
Author

could not read column value from result set: IS6_32_0_; Invalid column name

mahdi asgari
Greenhorn

Joined: Jun 16, 2008
Posts: 1
I have get the following Exception when running named query "TblBisYeganChildsByYeganId"
I search in the forumn and read the hibernate refrerence but i cant find the correct solution,
would you please help me, it it a bug?
I am using Oracle10G,Hibernate 3.2.5.ga


The exception:
Hibernate:
{ ? = call pkg_bis_yegan.func_sel_childsbyyeganid(?) }
[INFO ] - could not read column value from result set: IS6_32_0_; Invalid column name
[WARN ] - SQL Error: 17006, SQLState: null
[ERROR] - Invalid column name


my Hibernate-Mapping xml

<hibernate-mapping>
<class lazy="true" name="com.test.TblBisYegan" table="TBL_BIS_YEGAN" schema="AMAD">
<id name="pkYeganId" type="java.lang.Long">
<column name="PK_YEGAN_ID" precision="22" scale="0" />
<generator class="assigned" />
</id>
<many-to-one name="tblBisInfoBaseDetail" class="com.test.TblBisInfoBaseDetail" fetch="join" lazy="false">
<column name="FK_INFO_BASE_DETAIL_ID" precision="22" scale="0" />
</many-to-one>
<many-to-one name="tblBisYegan" class="com.test.TblBisYegan" fetch="join" lazy="false">
<column name="FK_YEGAN_ID" precision="10" scale="0" />
</many-to-one>
<property name="unitNum" type="java.lang.Long">
<column name="UNIT_NUM" precision="22" scale="0" />
</property>
<property name="yeganName" type="java.lang.String">
<column name="YEGAN_NAME" length="100" not-null="true" />
</property>
<property name="isActive" type="java.lang.Long">
<column name="IS_ACTIVE" precision="1" scale="0" />
</property>
<property name="isCreateAmval" type="java.lang.Long">
<column name="IS_CREATE_AMVAL" precision="22" scale="0" />
</property>
</class>

<sql-query name="TblBisYeganChildsByYeganId" callable="true">
<return class="com.test.TblBisYegan">
<return-property name="pkYeganId" column="PK_YEGAN_ID"/>
<return-property name="yeganName" column="YEGAN_NAME"/>
<return-property name="unitNum" column="UNIT_NUM"/>
<return-property name="tblBisInfoBaseDetail">
<return-column name="PK_INFO_BASE_DETAIL_ID"/>
</return-property>
<return-property name="tblBisYegan">
<return-column name="PARENT_YEGAN_ID"/>
</return-property>
</return>
{ ? = call pkg_bis_yegan.func_sel_childsbyyeganid( kyeganid) }
</sql-query>


</hibernate-mapping>

My Function is:

create or replace package body pkg_bis_yegan is
function func_sel_childsbyyeganid(p_fk_yegan_id number)
return sys_refcursor is
func_result SYS_REFCURSOR;
begin
open func_result for
select tbl_bis_yegan.pk_yegan_id,
tbl_bis_yegan.yegan_name,
tbl_bis_yegan.unit_num,
null parent_yegan_id,
null pk_info_base_detail_id
from tbl_bis_yegan
where tbl_bis_yegan.fk_yegan_id = p_fk_yegan_id
order by tbl_bis_yegan.yegan_name;
return func_result;
end;
end pkg_bis_yegan;

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Sounds like you have an invalid column name in your mapping. Check you have mapped this correctly (NB: the Hibernate exception should tell you the offending name. If you are not seeing this check how you log exceptions - you may be obscuring the message).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
kaven zhang
Greenhorn

Joined: Aug 06, 2008
Posts: 1
Hi, I met the some problem at first.
because my sql-query it is like this:
<sql-query name="create_batch_sp" callable="true">
<return alias="sgStagingBatch" class="com.apple.ist.ds.sg.persistence.impl.po.SgStagingBatch">
</return>
{ ? = call temp_pkg.create_batch(:url) }
</sql-query>
after reading your post, i change it to:
<sql-query name="create_batch_sp" callable="true">
<return alias="sgStagingBatch" class="com.apple.ist.ds.sg.persistence.impl.po.SgStagingBatch">
<return-property name="gbatchId" column="GBATCH_ID"></return-property>
<return-property name="grpsInTotal" column="GRPS_IN_TOTAL"></return-property>
<return-property name="timeStarted" column="TIME_STARTED"></return-property>
<return-property name="timeFinished" column="TIME_FINISHED"></return-property>
<return-property name="inProcessInd" column="IN_PROCESS_IND"></return-property>
<return-property name="errorDesc" column="ERROR_DESC"></return-property>
<return-property name="errorType" column="ERROR_TYPE"></return-property>
<return-property name="createDt" column="CREATE_DT"></return-property>
<return-property name="updDt" column="UPD_DT"></return-property>
<return-property name="batchStatusCd" column="BATCH_STATUS_CD"></return-property>
<return-property name="batchTypeCd" column="BATCH_TYPE_CD"></return-property>
<return-property name="batchStateCd" column="BATCH_STATE_CD"></return-property>
<return-property name="hostUrl" column="HOST_URL"></return-property>
</return>
{ ? = call temp_pkg.create_batch(:url) }
</sql-query>
it works now
so i suppose it is not a bug, you should recheck your configuration file
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: could not read column value from result set: IS6_32_0_; Invalid column name