Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Trouble exporting an application with the Eclipse Product Export Wizard (Windows)
Trouble exporting an application with the Eclipse Product Export Wizard (Windows) [message #689886] Tue, 28 June 2011 14:42 Go to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 371
Registered: December 2010
Location: Germany
Senior Member
Hello,

I am having trouble exporting an application with the Eclipse Product Export Wizard. I defined my own IApplication (de.emsw.gosa.product.etisch.ETischApplication) to be started. This Application uses a Service (de.emsw.gosa.klassik.service.IGosaKlassikService) which is defined with DS in another bundle. This works fine in the PDE but when I export the application and start the EXE (Winows XP) I get the following exception written to the log:

java.lang.NoClassDefFoundError: de/emsw/gosa/klassik/service/IGosaKlassikService
	at de.emsw.gosa.product.etisch.ETischApplication.start(ETischApplication.java:38) ~[na:na]
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) ~[na:na]
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) ~[na:na]
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) ~[na:na]
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) ~[na:na]
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_24]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_24]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.6.0_24]
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) ~[org.eclipse.equinox.launcher_1.2.0.v20110502.jar:na]
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) ~[org.eclipse.equinox.launcher_1.2.0.v20110502.jar:na]
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410) ~[org.eclipse.equinox.launcher_1.2.0.v20110502.jar:na]
Caused by: java.lang.ClassNotFoundException: de.emsw.gosa.klassik.service.IGosaKlassikService
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513) ~[na:na]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) ~[na:na]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) ~[na:na]
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) ~[na:na]
	at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_24]
	... 13 common frames omitted

I am wondering why I get an NoClassDefFoundError since the service-bundle is correctly required in the manifest.mf of the the app-bundle and the interface (IGosaKlassikService) is provided as an exported package in the service-bundle.

Any help is greatly appreciated.

Regards
Christoph
Re: Trouble exporting an application with the Eclipse Product Export Wizard (Windows) [message #690314 is a reply to message #689886] Wed, 29 June 2011 11:10 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 371
Registered: December 2010
Location: Germany
Senior Member
Hi,

I am still working on the problem. If I try to start the problem-bundle automatically, I get a little bit deeper into the problem. The error I get written to the log now looks like this:

!ENTRY de.emsw.gosa.klassik.service 4 0 2011-06-29 13:05:14.329
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The activator de.emsw.gosa.klassik.service.impl.GosaKlassikPlugin for bundle de.emsw.gosa.klassik.service is invalid
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.ClassNotFoundException: de.emsw.gosa.klassik.service.impl.GosaKlassikPlugin
	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 org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:164)
	... 12 more
Root exception:
java.lang.ClassNotFoundException: de.emsw.gosa.klassik.service.impl.GosaKlassikPlugin
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	...

!ENTRY org.eclipse.osgi 4 0 2011-06-29 13:05:14.486
!MESSAGE Bundle de.emsw.gosa.klassik.service_1.0.0.201106291304 [5] is not active.


Which I still don't understand, because the Activator is straight forward:

package de.emsw.gosa.klassik.service.impl;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class GosaKlassikPlugin implements BundleActivator {
	public static final String PLUGIN_ID = "de.emsw.gosa.klassik.service";
	
	private static BundleContext bundleContext;
	
	public static BundleContext getContext() {
		return bundleContext;
	}
	
	@Override
	public void start(BundleContext context) throws Exception {
		GosaKlassikPlugin.bundleContext = context;
	}

	@Override
	public void stop(BundleContext context) throws Exception {
		GosaKlassikPlugin.bundleContext = null;
	}
	
}


Any suggestions where I could look next?

Thanks,
Christoph
SOLVED - Trouble exporting an application with the Eclipse Product Export Wizard (Windows) [message #690497 is a reply to message #690314] Wed, 29 June 2011 15:38 Go to previous message
Christoph Keimel is currently offline Christoph Keimel
Messages: 371
Registered: December 2010
Location: Germany
Senior Member
Hi,

in case somebody is wondering: It was a problem with the build.properties. it was missing the "." in bin.includes so the class file of the activator was not put into the plugin.

Regards,
Christoph
Previous Topic:An error occurred while collecting items to be installed
Next Topic:Debugging Options?
Goto Forum:
  


Current Time: Thu Oct 23 20:44:15 GMT 2014

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

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