|Re: 'org.hibernate.collection.PersistentSet' is an unknown class [message #584915 is a reply to message #584903]
||Tue, 23 March 2010 02:00
| Stefan Liebig
Registered: July 2009
On 22.03.2010 10:59, Xino wrote:
> Ok some precisions :
> I have :
> 1 plugin for the ui called ui plugin
> 1 plugin for the domain model with definitions of my data model with
> hibernate annotations.
> I don't know if it is a best practice solution but this plugin classpath
> contains all the hibernate librairies and export all the package
> concerned by hibernate.
> 1 for the services / dao.
> I get the exception when I call a Collection<MyEntity> getAll() method
> of a service which returns all of MyEntity objects from database.
> I am using directly the objects MyEntity in the client.
> So I resolved my problem by importing the org.hibernate.collection
> package in the ui plugin. To my opinion it isn't so good because the ui
> is linked with hibernate that i did'nt want but...it works.
Yes, this is not very nice. But hessian needs to know the hibernate
stuff for materialization of the objects from the server.
You could try to reexport hibernate from the domain bundles. Then it
would be a hidden dependency.
> I am starting with riena/hibernate/equinox so if it isn't well designed
> tell me please.
> If you have a better solution for this issue I will be happy to know it.
You could try to decouple your domain model from hibernate such that it
will not make the client bundle/s depend on hibernate. The downside of
such an approach is that you will have to convert data between hibernate
´polluted´ (only server side) and 'clean' objects (client side and
> Thank you.
Powered by FUDForum
. Page generated in 0.01663 seconds