Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » [RCP] Hibernate in a plugin - HELP
[RCP] Hibernate in a plugin - HELP [message #264206] Wed, 28 July 2004 08:14 Go to next message
Eclipse UserFriend
Originally posted by: djb.dolbyX.co.uk

I am struggling to use hibernate in a plugin. I have all the jars for
hibernate in one plugin. All my model classes for a database are in
another plugin and the user interface (views etc) are in another plugin.

These all get wrapped into an RCP app.

The problem is that hibernate cannot find the model classes at runtime.
I know this is to do with class loaders, but how can i make hibernate
find the classes.

Any help on this would be appreciative.

Thanks
Darren.
Re: [RCP] Hibernate in a plugin - HELP [message #264229 is a reply to message #264206] Wed, 28 July 2004 10:23 Go to previous messageGo to next message
Eclipse UserFriend
you can't if you arrange the layout you described you will not be able to do
it.

Hibernate injects stuff (collections) with its own versions of it so in
effect your model classes depend on hibernate and hibernate depends on your
model classes and this creates circular dependency between the plugins. As
far as of M8 it was not allowed, I am not sure of now, as I have not played
with eclipse for a while.

My suggestion is to merge hibernate and your model plugins to avoid endless
headaches and make separation of the modules on the source level only.

HTH,
Alex.

"Darren Bell" <djb@dolbyX.co.uk> wrote in message
news:ce857d$jb2$1@eclipse.org...
> I am struggling to use hibernate in a plugin. I have all the jars for
> hibernate in one plugin. All my model classes for a database are in
> another plugin and the user interface (views etc) are in another plugin.
>
> These all get wrapped into an RCP app.
>
> The problem is that hibernate cannot find the model classes at runtime.
> I know this is to do with class loaders, but how can i make hibernate
> find the classes.
>
> Any help on this would be appreciative.
>
> Thanks
> Darren.
>
Re: [RCP] Hibernate in a plugin - HELP [message #264242 is a reply to message #264229] Wed, 28 July 2004 10:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: djb.dolbyX.co.uk

Alex Shneyderman wrote:
> you can't if you arrange the layout you described you will not be able to do
> it.
>
> Hibernate injects stuff (collections) with its own versions of it so in
> effect your model classes depend on hibernate and hibernate depends on your
> model classes and this creates circular dependency between the plugins. As
> far as of M8 it was not allowed, I am not sure of now, as I have not played
> with eclipse for a while.
>
> My suggestion is to merge hibernate and your model plugins to avoid endless
> headaches and make separation of the modules on the source level only.
>
> HTH,
> Alex.
>
> "Darren Bell" <djb@dolbyX.co.uk> wrote in message
> news:ce857d$jb2$1@eclipse.org...
>
>>I am struggling to use hibernate in a plugin. I have all the jars for
>>hibernate in one plugin. All my model classes for a database are in
>>another plugin and the user interface (views etc) are in another plugin.
>>
>>These all get wrapped into an RCP app.
>>
>>The problem is that hibernate cannot find the model classes at runtime.
>> I know this is to do with class loaders, but how can i make hibernate
>>find the classes.
>>
>>Any help on this would be appreciative.
>>
>>Thanks
>>Darren.
>>
>
>
>
Thanks Alex.

There must be a way to do this. My java model is not tied to Hibernate
as we may decide to use JDO. Is there some fudging that i can do with
classloaders?

Daz
Re: [RCP] Hibernate in a plugin - HELP [message #264328 is a reply to message #264206] Wed, 28 July 2004 16:42 Go to previous message
Eclipse UserFriend
Declare your model plugin as a dependency in your hibernate plugin's
plugin.xml file and it will be able to see those classes at runtime.
Your view plugin will declare both the model and hibernate plugins as
dependencies.

Hope that helps,
David


Darren Bell wrote:

> I am struggling to use hibernate in a plugin. I have all the jars for
> hibernate in one plugin. All my model classes for a database are in
> another plugin and the user interface (views etc) are in another plugin.
>
> These all get wrapped into an RCP app.
>
> The problem is that hibernate cannot find the model classes at runtime.
> I know this is to do with class loaders, but how can i make hibernate
> find the classes.
>
> Any help on this would be appreciative.
>
> Thanks
> Darren.
>
Previous Topic:Are fixed editors for RCP apps available yet?
Next Topic:Object contribution action at runtime ?
Goto Forum:
  


Current Time: Thu May 15 13:23:37 EDT 2025

Powered by FUDForum. Page generated in 0.04057 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top