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
|