-->
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: Oracle 8 Date Field Mystery
PostPosted: Fri Dec 09, 2011 11:35 am 
Newbie

Joined: Mon Nov 07, 2011 7:52 am
Posts: 2
Hi,

I've got a Hibernate object mapping to a table on an Oracle 8 (I know, I know) database, and I'm having trouble writing to a date field on it.

Code:
LAST_UPDATED DATE DEFAULT sysdate NOT NULL ENABLE
NA_CUT_OFF_TIME DATE


The Hibernate mapping then has ...

Code:
<property name="lastUpdated" type="date">
<column name="LAST_UPDATED" length="7" not-null="true" />
</property>

<property name="naCutoffTime" type="date">
<column name="NA_CUT_OFF_TIME" length="7" />
</property>


I then keep getting org.hibernate.exception.GenericJDBCException when trying to write to the cut off time. The stack trace give me ...

Caused by: java.sql.SQLException: ORA-03115: unsupported network datatype or representation

And ...

WARNING: data exception thrown: Hibernate operation: could not update: [com.MyClass#12345678912345670]; uncategorized SQLException for SQL [update T_MY_TABLE set NA_CUT_OFF_TIME=? where TOKEN=?]; SQL state [63000]; error code [3115]; ORA-03115: unsupported network datatype or representation

Any ideas? I'm stumped! Hibernate generates a java.util.Date in the VO, I've made sure it's not using a java.util.Timestamp when it writes back, knowing that milliseconds weren't supported for the Oracle DATE type until Oracle 9.

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.