About

Jadira is the home for Sousan and Chris Pheby's open source projects. These are reusable open source Java modules that provide first class solutions using the most effective current JEE technologies.

Search
Tag Cloud
...
Login
« User Type Presentation | Main | Release: User Type for Joda Time and JSR 310 version 1.2 »
Tuesday
Sep072010

Release: User Type for Joda Time and JSR 310 Version 1.4

We've produced the 1.4 release of the User Type project.

This release is the first release of User Type to add support for Hibernate 3.6. This is achieved whilst retaining compatibility with older Hibernate releases, meaning that Usertype is currently the only solution for bringing together Joda Time and JSR 310 libraries with persitence using Hibernate.

This release also includes fixes for an incompatibility with Java SE 5.0, as well as refactoring PersistentDateTime into PersistentDateTimeWithZone. A new implementation of PersistentDateTime was recently added, which uses a single column and an implied UTC zone, so please be aware of this change when upgrading.

All users are invited to upgrade to this release.

For more information, visit the project pages on Sourceforge

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (5)

Thank you so much for your efforts. We are using PersistentDateTime with Hibernate 3.6 and SQL Server 2008 and it is working perfectly!

The only wish at this point would be to support SQL column types that natively support timezone information. We have started to look into supporting DATETIMEOFFSET introduced with SQL Server 2008. I would be interested in any thoughts you may have on this subject.

November 17, 2010 | Unregistered CommenterDavid Taylor

David,

Thanks for the positive feedback. If you can provide a class to support this that would be great. Unfortunately I don't have access to SQL Server to try this out. The documentation suggests this would be reasonably straightforward:

http://msdn.microsoft.com/en-us/library/ff427233.aspx

Regards Chris

November 22, 2010 | Registered CommenterChris

We have this problem with version 1.8:

Caused by: java.lang.IllegalArgumentException: Cannot parse "2010-10-17": Illegal instant due to time zone offset transition (America/Sao_Paulo)
at org.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:336)
at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:672)
at org.jadira.usertype.dateandtime.joda.columnmapper.DateColumnLocalDateMapper.fromNonNullValue(DateColumnLocalDateMapper.java:38)
at org.jadira.usertype.dateandtime.joda.columnmapper.DateColumnLocalDateMapper.fromNonNullValue(DateColumnLocalDateMapper.java:25)
at org.jadira.usertype.dateandtime.shared.spi.AbstractUserType.nullSafeGet(AbstractUserType.java:124)
at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:109)

February 2, 2011 | Unregistered CommenterOriol

Oriol,

Please can you give me a little bit more information about this problem:

* The value in the database (ideally, for example in Oracle, use SQL Plus rather than a Java tool)
* The JVM timezone (probably the timezone your system is configured to use).

Thankyou,

Chris

March 1, 2011 | Registered CommenterChris

Some more information regarding this issue was provided by a reader in response to the recent 3.0.0.CR1 release: http://blog.jadira.co.uk/blog/2012/1/19/release-jadira-usertype-300cr1-with-support-for-joda-money-0.html. The fix is in SVN and will be available from the next candidate release of 3.0.0.

March 17, 2012 | Registered CommenterChris

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>