I am very new to hibernate and working with an implementation set up by a colleague who has recently left the company. Apologies if the answer is basic.
I seem to have a problem retrieving a simple persisted property using hibernate. The value gets persisted fine; but during retrieval a proxy exception occurs in an unexpected part of the domain model.
The value that causes the failure is:
F!MCF!E!{F!!BRS!891B5!ALC!MC!MC!1234&F!!ALC!898Gj!BRS!MC!MC!5678}
The mapping file and everything works fine if I substitute this result for a fake example; for example 'test' or remove the simple property declaration form my mapping file. It then persists and retrieves the value correctly. So I am wondering if the issue is something to do with the data itself?
As far as I am aware the connection, query, mapping file and all other usages are correct (as the simple 'test' substitution works - this is just a change to the data only).
Hibernate version:
3,2,4
Name and version of the database you are using:
Postgres 8.2
Mapping Fragment:
<property name="identity"/>
Stack Trace:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.xmltravel.fab.flights.domain.Flight.personReferences, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentList.iterator(PersistentList.java:115)
|