org.eclipse.osgi.internal.loader.BundleLoader not seeing class in src folder [message #1007210] |
Tue, 05 February 2013 01:09 |
Paul Morris Messages: 8 Registered: December 2011 |
Junior Member |
|
|
I'll preface by saying I am experienced in Java but not in PDE. I'm loading a hibernate.cfg.xml in a static method at startup but it can't find a class in my classpath. I thought it to be a Hibernate issue but the stack trace indicates that it's caused by BundleLoader throwing a ClassNotFoundException. I'm not 100% sure what in my build would be relevant but I'll start with this:
The hibernate config file is loaded in a static method like this:
URL url = Platform.getBundle("com.quietbus.flt").getResource("hibernate.cfg.xml");
sf = new AnnotationConfiguration().configure(url).buildSessionFactory();
My MANIFEST.MF looks like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: FLT
Bundle-SymbolicName: com.quietbus.flt; singleton:=true
Bundle-Version: 0.9.0
Bundle-Activator: com.quietbus.flt.Activator
Bundle-Vendor: QUIETBUS
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.databinding;bundle-version="1.4.0",
org.eclipse.core.databinding.beans;bundle-version="1.2.100",
org.eclipse.jface.databinding;bundle-version="1.5.0",
org.eclipse.core.databinding.property;bundle-version="1.4.0",
org.eclipse.ui.navigator;bundle-version="3.5.101",
org.hibernate.eclipse.libs;bundle-version="3.5.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
And build.properties like this:
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
icons/,\
splash.bmp,\
plugin_customization.ini,\
product_lg.gif
I've tried all sorts of adjustments to the plugin.xml settings based on Googling over the past two days but it just baffles me that the class under src (and getting exported to bin... I checked) is not found.
Here is the abridged stack trace:
org.hibernate.MappingException: Unable to load class declared as <mapping class="com.quietbus.flt.model.City"/> in the configuration:
at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:740)
[...]
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
[...]
at com.quietbus.flt.Application.start(Application.java:40)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
[...]
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.ClassNotFoundException: com.quietbus.flt.model.City
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:737)
[Updated on: Tue, 05 February 2013 01:10] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04514 seconds