Virgo vs Hibernate vs Joda [message #984343] |
Wed, 14 November 2012 16:09 |
Seth Helstrip Messages: 22 Registered: September 2012 |
Junior Member |
|
|
I'm having some problems getting Hibernate to map Joda attributes from my Value Objects, to the appropriate type in Virgo. I'm probably doing something daft wrong, I just thought I'd ask here, since I'm sure what I'm doing isn't particularly unusual, and hope someone can help me shed some light onto it.
Virgo=3.5
Hibernate=3.6
Joda=2.1
Joda-Hibernate=1.3
So I have a model bundle, in which I have a Value Object, with an attribute that I've annotated with the appropriate type mapping for Joda-Hibernate...
...
@Column(nullable = false, name="REQUEST_DATE")
@Type(type="org.joda.time.contrib.hibernate.PersistentDateTime")
private DateTime requestDate;
...
The model bundle MANIFEST.MF is being generated correctly, and includes an import to the
org.joda.time.contrib.hibernate package.
Now, I would have thought this would be enough. However, I get the following exception on deploying my application.
Caused by: org.hibernate.MappingException: Could not determine type for: org.joda.time.contrib.hibernate.PersistentDateTime, at table: REQUEST, for columns: [org.hibernate.mapping.Column(REQUEST_DATE)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:306)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)
at org.hibernate.mapping.Property.isValid(Property.java:217)
Looking deeper into the stacktrace, I see that this problem is actually occurring at the point where my dao-impl bundle is being deployed, and the entity manager is being created.
So with that in mind, I've also included an Import-Package statement for that bundle, to include the Hibernate-Jodatime mapper.
However, it still doesn't work. At this point, I'm out of ideas.
Has anyone else seen this problem? If you've any ideas how I can solve this, please can you let me know?
Many thanks in advance,
Seth
|
|
|
Powered by
FUDForum. Page generated in 0.03148 seconds