-->
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: Problems with Clob field
PostPosted: Mon Oct 13, 2003 8:00 am 
Newbie

Joined: Mon Oct 13, 2003 7:50 am
Posts: 7
Hi,

I am trting to read a clob field from the oracle table and I am getting the following exception. I am using Oracle 9i Database Server.

java.lang.AbstractMethodError: oracle.jdbc.driver.OracleResultSetImpl.getClob(Ljava/lang/String;)Ljava/sql/Clob;
at com.imi.poc.entity.StringClobType.nullSafeGet(StringClobType.java:43)
at net.sf.hibernate.type.CustomType.nullSafeGet(CustomType.java:97)
at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
at net.sf.hibernate.loader.Loader.hydrate(Loader.java:419)
at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:373)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:342)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:281)

I am using the follwing code and mapping file for loading the Object from the DB.

Java Code
=======
Session session = sf.openSession();
OrderCapture oc = (OrderCapture) session.load(OrderCapture.class,new Integer(231887));
System.out.println(oc.getXmlString());

Mapping file
========
<class name="com.imi.poc.entity.OrderCapture" table="ORDER_CAPTURE">
<id name="orderCaptureSid" column="ORDERCAP_SID" type="integer">
<generator class="seqhilo">
<param name="sequence">SID_SEQUENCE</param>
<param name="maxLo">99</param>
</generator>
</id>
<version name="version" column="VERSION" type="integer"/>
<many-to-one name="scenario" class="com.imi.poc.entity.ScenarioMaster" column="SCENARIO"/>
<property name="orderID" type="string">
<column name="ORDERID" sql-type="VARCHAR2(20)" not-null="false"/>
</property>
<property name="customerOrderID" type="string">
<column name="CUSTOMERORDERID" sql-type="VARCHAR2(20)" not-null="true"/>
</property>
<property name="fileName" type="string">
<column name="FILENAME" sql-type="VARCHAR2(40)" not-null="false"/>
</property>
<property name="channel" type="string">
<column name="CHANNEL" sql-type="VARCHAR2(20)" not-null="false"/>
</property>
<property name="xmlString" type="com.imi.poc.entity.StringClobType">
<column name="XMLSTRING" sql-type="CLOB" not-null="false"/>
</property>
<property name="status" type="string">
<column name="STATUS" sql-type="VARCHAR2(20)" not-null="false"/>
</property>
<property name="xmlType" type="string">
<column name="XMLTYPE" sql-type="VARCHAR2(20)" not-null="false"/>
</property>
</class>

If anyone have come accross the same problem, please help me out with the solution.

Thanks in advance,
Younus


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.