-->
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: Hibernate JodaTime Converters Exception (possible bug)
PostPosted: Tue Jan 07, 2014 3:29 pm 
Newbie

Joined: Tue Jan 07, 2014 3:18 pm
Posts: 1
I am writing an application to persist an object to an h2 database for testing. Everything was fine until I got to the section where I needed to convert Joda LocalDate to Java.util.date and attempt to persist to h2. It literally kicks out at return date, in the converter. I isolated this error, and created a small side project as an example of what is occurring, and uploaded to github. Can anyone help me solve this, or confirm it is a Hibernate Bug?

Example Project: https://github.com/CPriester/HibernateException
Joda Converters: https://github.com/CPriester/joda-jpa-converters

Snippet of Stacktrace:
Code:
   at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
   at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
   at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Unknown unwrap conversion requested: java.util.Date to [B
   at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1761)
   at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1675)
   at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:82)
   ... 30 more
Caused by: org.hibernate.HibernateException: Unknown unwrap conversion requested: java.util.Date to [B
   at org.hibernate.type.descriptor.java.AbstractTypeDescriptor.unknownUnwrap(AbstractTypeDescriptor.java:103)
   at org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor.unwrap(JdbcTimestampTypeDescriptor.java:152)
   at org.hibernate.type.descriptor.java.JdbcTimestampTypeDescriptor.unwrap(JdbcTimestampTypeDescriptor.java:41)
   at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$1.doBind(VarbinaryTypeDescriptor.java:62)
   at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:93)
   at org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$1.doBind(AttributeConverterSqlTypeDescriptorAdapter.java:101)
   at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:93)
   at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:281)
   at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:276)


Many thanks,

Courtney


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.