-->
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: ClassCastException in TimestampType
PostPosted: Wed Feb 02, 2005 11:17 am 
Newbie

Joined: Thu Oct 14, 2004 7:38 am
Posts: 5
Hi,

I got the following stacktrace when storing an object of ProductData. By debugging the TimestampType I see, that the "updated" column is a Boolean.
The type in the java class is:
protected Date updated;

Oracle type is DATE

Without the updated field anything is OK - why there is no problem with the "imported" column. ?

Any idea ?

Hibernate version: 2.1.7

Mapping documents:
<class name="ProductData" table="product_data">
<id name="packageName" type="string" column="package_name" >
<generator class="assigned"></generator>
</id>
<property name="productName" column="product_name" type="string"/>
<property name="imported" column="imported" type="timestamp"/>
<property name="updated" column="updated" type="timestamp"/>
</class>

Full stack trace of any exception that occurs:
java.lang.ClassCastException
at net.sf.hibernate.type.TimestampType.deepCopyNotNull(TimestampType.java:63)
at net.sf.hibernate.type.NullableType.deepCopy(NullableType.java:96)
at net.sf.hibernate.type.TypeFactory.deepCopy(TypeFactory.java:212)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:935)
at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:866)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:788)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:747)
Name and version of the database you are using:
Oracle 9.2


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.