Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problem with not registered in Unit of Work objects

Hi Alexander,

I imagine, that this error comes from the fact, that you are accessing the
field "FileData" outside of a persistence context. When the method
UploadEJB#findById returns to its caller, the persistence context is closed.
You declared the field "FileData" as FetchType.LAZY, so it remains
uninitialized after the context is closed. You might try to forcefully
initialize it by calling the getter-method within UploadEJB#findById.

The behavior you ask for, is not covered by the JPA-spec. However, I cannot
assess whether it is a bug in the context of EclipseLink (which IMHO
supports reads outside of a client session).


Alexander Makarenko wrote:
> To correct previous message:
> 1. Entity, of course, has getters/setters; :)
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx

View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top