-->
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: pk RAW(16) in oracle hibernate load does not fetch data
PostPosted: Thu Aug 21, 2008 12:46 pm 
Newbie

Joined: Thu Aug 21, 2008 12:25 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.2

Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Aug 7, 2008 1:40:24 PM by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
<class name="gov.faa.infra.oets.model.ObstEvalCase" table="OBST_EVAL_CASE" lazy="false">
<id name="obstEvalCaseUuid" type="string" >
<column name="OBST_EVAL_CASE_UUID" />
<generator class="assigned" />
</id>
<property name="caseTypeCd" type="string">
<column name="CASE_TYPE_CD" length="10" />
</property>
<property name="aeronauticalStudyNbr" type="string">
<column name="AERONAUTICAL_STUDY_NBR" length="25" />
</property>
<property name="evalPriorityCd" type="string">
<column name="EVAL_PRIORITY_CD" length="10" />
</property>
<property name="nearestArptId" type="string">
<column name="NEAREST_ARPT_ID" length="4" />
</property>
<property name="cntyCd" type="string">
<column name="CNTY_CD" length="10" />
</property>
<property name="stCd" type="string">
<column name="ST_CD" length="2" />
</property>
<property name="estDueDt" type="date">
<column name="EST_DUE_DT" length="7" />
</property>
<property name="durDesc" type="string">
<column name="DUR_DESC" />
</property>
<property name="durDaysQty" type="big_decimal">
<column name="DUR_DAYS_QTY" precision="9" />
</property>
<property name="durMonthsQty" type="big_decimal">
<column name="DUR_MONTHS_QTY" precision="9" />
</property>
<property name="priorAeronauticalStudyNbr" type="string">
<column name="PRIOR_AERONAUTICAL_STUDY_NBR" length="25" />
</property>
<property name="projectId" type="string">
<column name="PROJECT_ID" length="25" />
</property>
<property name="svcAreaId" type="string">
<column name="SVC_AREA_ID" length="25" />
</property>
<property name="stSbdvsnCd" type="string">
<column name="ST_SBDVSN_CD" length="10" />
</property>
<property name="oeaaaBeginDt" type="date">
<column name="OEAAA_BEGIN_DT" length="7" />
</property>
<property name="createdUserId" type="string">
<column name="CREATED_USER_ID" length="40" not-null="true" />
</property>
<property name="createdDttm" type="timestamp">
<column name="CREATED_DTTM" length="11" not-null="true" />
</property>
<property name="lastUpdatedUserId" type="string">
<column name="LAST_UPDATED_USER_ID" length="40" not-null="true" />
</property>
<property name="lastUpdatedDttm" type="timestamp">
<column name="LAST_UPDATED_DTTM" length="11" not-null="true" />
</property>
<set name="obstEvalCaseStats" inverse="true" lazy="false" outer-join="true">
<key>
<column name="OBST_EVAL_CASE_UUID" not-null="true" />
</key>
<one-to-many class="gov.faa.infra.oets.model.ObstEvalCaseStat" />
</set>
<set name="obstEvalCaseAsgnmts" inverse="true" lazy="false" outer-join="true">
<key>
<column name="OBST_EVAL_CASE_UUID" not-null="true" />
</key>
<one-to-many class="gov.faa.infra.oets.model.ObstEvalCaseAsgnmt" />
</set>
</class>
</hibernate-mapping>


The problem is as follows :

When I try to retrieve data using load(class,id) where is id is of type String. It is mapped to a field which is of type RAW(16) oracle. It does not load the data.

Also I am using data source (Spring version 2.5)
<jee:jndi-lookup jndi-name="jdbc/oetsds" id="oetsDataSource"/>

jdbc/oetsds : create in the OC4j 10.1.3.3 application server.

But if I define the datasource in applicationContext, that is not using jndi lookup I am able to load the data. Example

<bean id="refSessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" >
<bean class="oracle.jdbc.pool.OracleDataSource">
<property name="URL" value=""/>
<property name="user" value=""/>
<property name="password" value=""/>
</bean>
</property>
<property name="mappingResources">
<list>
<value>ObstEvalPrsnl.hbm.xml</value>
......

Can somebody tell me as to why is this not working ? It happens only if the Primary key is of type RAW(16) in Oracle and when I doing the datasource lookup using JNDI using spring.

Only exception is data not found. There is data in the table. Please help


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.