Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » NoClassDefFound - jexel
NoClassDefFound - jexel [message #993210] Sun, 23 December 2012 19:15 Go to next message
Aljoscha Steffens is currently offline Aljoscha SteffensFriend
Messages: 302
Registered: November 2012
Senior Member
Hi,
I try to get this tutorial http://www.vogella.com/articles/JavaExcel/article.html to work but I get the NoClassDefFoundError

!SESSION 2012-12-23 20:08:34.796 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_09
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product MEXA.product
Command-line arguments:  -product MEXA.product -data D:\eclipse\Workspace/../runtime-MEXA.product -dev file:D:/eclipse/Workspace/.metadata/.plugins/org.eclipse.pde.core/MEXA.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY org.eclipse.e4.ui.workbench 4 0 2012-12-23 20:08:39.208
!MESSAGE Internal Error
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: jxl/read/biff/BiffException
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:851)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:744)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:728)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:667)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
	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.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.NoClassDefFoundError: jxl/read/biff/BiffException
	at MEXA.handlers.CreateSampleProject.execute(CreateSampleProject.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 30 more
Caused by: java.lang.ClassNotFoundException: jxl.read.biff.BiffException
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 36 more


The thing is, this does NOT happen, if I wirte the Read-Method in a main function.
I have an appliation project and if I create a class with main method (in which I paste the read funktion of the tutorial) it's alright, if I change the methods name it doesn't. How can that be?
Do I have to specify some dependencies somewhere? To use jexel I just copied the required files into my Project and set the Buildpath accordingly.

[Updated on: Sun, 23 December 2012 19:16]

Report message to a moderator

Re: NoClassDefFound - jexel [message #993440 is a reply to message #993210] Mon, 24 December 2012 11:51 Go to previous messageGo to next message
Eclipse UserFriend
If you use a normal java app the build path is the right thing to edit but in an RCP (OSGi) app your jars go into manifest dependencies and .product. This manifest and product expect an osgi bundle jar. To convert a normal jar into an osgi bundle jar use New->Plug-in from existing jar. Then add the created plugin in manifest and .product.
Re: NoClassDefFound - jexel [message #994471 is a reply to message #993440] Thu, 27 December 2012 11:56 Go to previous message
Aljoscha Steffens is currently offline Aljoscha SteffensFriend
Messages: 302
Registered: November 2012
Senior Member
Thanks this works perfect!
Previous Topic:Hello world in eclipse 4
Next Topic:Workbench Eventing
Goto Forum:
  


Current Time: Thu Apr 25 06:35:36 GMT 2024

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

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

Back to the top