sorry for my late response and thanks for your work on the Mogwai plugin.
Mirko Sertic wrote:
> How do i use hibernate in a plugin? There is a set of mapped classes and
> hibernate mapping
> files, but where to i have to place them? I tried to put them into the
> plugin.jar, but
> hibernate cannot load the mapped classes!
Do I understand it right, you use Hibernate from with in your Plugin in such way
that your Plugin includes Hibernate mapped classes that need top be loaded by a
If so where are the database tables for your mapped classes?
To make Hibernate find your Hibernate configuration files (Mapping xmls,
hibernat.cfg.xml, etc.) the files usually must must be placed directly in the
root of one of your Plugins lib jars not in any subdirectory like etc/ or so.
> I think this is related to classloader stuff, but how can this problem
> be solved?
All of this sounds like you'd need to include Hibernate's library jars in your
Plugins lib directory. I'm a bit afraid of that because SQuirreL's core already
uses Hibernate jars and has them in its global lib dir
As you can see to me it feels like some trouble may arise when you directly use
Hibernate form within a Plugin. (Note: Our Hibernate Plugin uses completely
different mechanisms to access Hibernate. You won't find any Hibernate class in
the Plugin's lib dir.)
Nonetheless if you can get it to work it would be great. I hope I could at least
help you a bit.