I’ve a standard Plugin-Project with some views.
Now i want to initialize a static Hibernate Session object
by calling MySessionFactory.currentSession();
inside the project’s xxPlugin.class.
The result is that eclipse reports a
Unable to create view: Plug-in de.profaudio was unable to load clas s de.profaudio.dir.AudioDirectoryView.
Exception.
Looking closer, i found that the static initializer in the SessionFactory
/** The single instance of hibernate configuration */
private static final Configuration cfg = new Configuration();
causes this problem.
The real reason is a
java.lang.ClassNotFoundException: net.sf.hibernate.cfg.Configuration
in the org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(String name, boolean resolve)
method.
Does Hibernate work inside Plugins?
If so, whats wrong?