• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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;

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
A tiny monkey bit me and I got tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic