Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Mobile Tools for Java (MTJ) » NoClassDefFoundError: org/objectweb/asm/tree/ClassNode
NoClassDefFoundError: org/objectweb/asm/tree/ClassNode [message #23172] Wed, 26 November 2008 14:15 Go to next message
No real name is currently offline No real nameFriend
Messages: 4
Registered: July 2009
Junior Member
Hi!

I'm using:

Ubuntu 8.10
Eclipse 3.3.1.1
MTJ 0.9 / EclipseME 1.7.9
Sun WTK 2.5.2

Background info:

I created a new workspace and installed the MTJ plugin (from the update
site). I then created a simple HelloWorld project, containing a single
HelloWorld-MIDlet. When executing it, I got the following error in the
Console:

Running with storage root /home/jacob/j2mewtk/2.5.2/appdb/DefaultColorPhone
Running with locale: en_US.UTF-8
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: HelloWorldMIDlet
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)

, where HelloWorldMIDlet is the name of the MIDlet class (I use no package
hierarchy here).

I thought the error was caused by the MTJ plugin, so I disabled it and
installed the ElipseME plugin instead (that I've successfully used in the
past). No change though, the error occurs for EclipseME as well. I then
went ahead and created a new workspace (still using the same Eclipse
instance). When running the MIDlet in the new workspace, it worked (i.e.
the MIDlet finally ran without any errors)!

I've installed and configured EclispeME according to the instructions on
the homepage.

In the Eclipse workspace log, I see:

!ENTRY org.eclipse.core.resources 4 2 2008-11-26 09:02:07.734
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
!STACK 0
java.lang.NoClassDefFoundError: org/objectweb/asm/tree/ClassNode
at
eclipseme.core.internal.preverifier.EmbeddedPreverifier$Prev erificationParameters.getClassPreverifier(EmbeddedPreverifie r.java:122)
at
eclipseme.core.internal.preverifier.EmbeddedPreverifier.prev erify(EmbeddedPreverifier.java:284)
at
eclipseme.core.internal.preverifier.EmbeddedPreverifier.prev erify(EmbeddedPreverifier.java:192)
at
eclipseme.core.model.impl.MidletSuiteProject.preverify(Midle tSuiteProject.java:442)
at
eclipseme.core.internal.preverification.builder.ResourceDelt aBuilder.handleClassAddsAndChanges(ResourceDeltaBuilder.java :817)
at
eclipseme.core.internal.preverification.builder.ResourceDelt aBuilder.handleNullDelta(ResourceDeltaBuilder.java:934)
at
eclipseme.core.internal.preverification.builder.ResourceDelt aBuilder.build(ResourceDeltaBuilder.java:343)
at
eclipseme.core.internal.preverification.builder.Preverificat ionBuilder.preverifyProject(PreverificationBuilder.java:956)
at
eclipseme.core.internal.preverification.builder.Preverificat ionBuilder.build(PreverificationBuilder.java:489)
at
org.eclipse.core.internal.events.BuildManager$2.run(BuildMan ager.java:624)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:166)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:273)
at
org.eclipse.core.internal.events.BuildManager.build(BuildMan ager.java:354)
at
org.eclipse.core.internal.resources.Project.internalBuild(Pr oject.java:494)
at org.eclipse.core.internal.resources.Project.build(Project.ja va:83)
at
eclipseme.core.model.impl.MidletSuiteProject.createPackage(M idletSuiteProject.java:231)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.cr eatePackageForProject(AbstractCreatePackageAction.java:96)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.ac cess$0(AbstractCreatePackageAction.java:89)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction$1. run(AbstractCreatePackageAction.java:132)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.do PackageCreation(AbstractCreatePackageAction.java:130)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.ru n(AbstractCreatePackageAction.java:67)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:256)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: java.lang.ClassNotFoundException:
org.objectweb.asm.tree.ClassNode
at java.lang.ClassLoader.findClass(ClassLoader.java:359)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:429)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
... 52 more

!ENTRY eclipseme.core 4 0 2008-11-26 09:02:07.747
!MESSAGE createPackageForProject
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Errors during build.
at
org.eclipse.core.internal.resources.Project.internalBuild(Pr oject.java:500)
at org.eclipse.core.internal.resources.Project.build(Project.ja va:83)
at
eclipseme.core.model.impl.MidletSuiteProject.createPackage(M idletSuiteProject.java:231)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.cr eatePackageForProject(AbstractCreatePackageAction.java:96)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.ac cess$0(AbstractCreatePackageAction.java:89)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction$1. run(AbstractCreatePackageAction.java:132)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.do PackageCreation(AbstractCreatePackageAction.java:130)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.ru n(AbstractCreatePackageAction.java:67)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:256)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
!SUBENTRY 1 org.eclipse.core.resources 2 566 2008-11-26 09:02:07.747
!MESSAGE Errors during build.
!SUBENTRY 2 eclipseme.core 2 75 2008-11-26 09:02:07.747
!MESSAGE Errors running builder 'Preverification' on project
'TestEclipseMe'.
!SUBENTRY 2 eclipseme.core 2 75 2008-11-26 09:02:07.747
!MESSAGE org/objectweb/asm/tree/ClassNode
!STACK 0
java.lang.NoClassDefFoundError: org/objectweb/asm/tree/ClassNode
at
eclipseme.core.internal.preverifier.EmbeddedPreverifier$Prev erificationParameters.getClassPreverifier(EmbeddedPreverifie r.java:122)
at
eclipseme.core.internal.preverifier.EmbeddedPreverifier.prev erify(EmbeddedPreverifier.java:284)
at
eclipseme.core.internal.preverifier.EmbeddedPreverifier.prev erify(EmbeddedPreverifier.java:192)
at
eclipseme.core.model.impl.MidletSuiteProject.preverify(Midle tSuiteProject.java:442)
at
eclipseme.core.internal.preverification.builder.ResourceDelt aBuilder.handleClassAddsAndChanges(ResourceDeltaBuilder.java :817)
at
eclipseme.core.internal.preverification.builder.ResourceDelt aBuilder.handleNullDelta(ResourceDeltaBuilder.java:934)
at
eclipseme.core.internal.preverification.builder.ResourceDelt aBuilder.build(ResourceDeltaBuilder.java:343)
at
eclipseme.core.internal.preverification.builder.Preverificat ionBuilder.preverifyProject(PreverificationBuilder.java:956)
at
eclipseme.core.internal.preverification.builder.Preverificat ionBuilder.build(PreverificationBuilder.java:489)
at
org.eclipse.core.internal.events.BuildManager$2.run(BuildMan ager.java:624)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:166)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:273)
at
org.eclipse.core.internal.events.BuildManager.build(BuildMan ager.java:354)
at
org.eclipse.core.internal.resources.Project.internalBuild(Pr oject.java:494)
at org.eclipse.core.internal.resources.Project.build(Project.ja va:83)
at
eclipseme.core.model.impl.MidletSuiteProject.createPackage(M idletSuiteProject.java:231)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.cr eatePackageForProject(AbstractCreatePackageAction.java:96)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.ac cess$0(AbstractCreatePackageAction.java:89)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction$1. run(AbstractCreatePackageAction.java:132)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.do PackageCreation(AbstractCreatePackageAction.java:130)
at
eclipseme.ui.internal.actions.AbstractCreatePackageAction.ru n(AbstractCreatePackageAction.java:67)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:256)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: java.lang.ClassNotFoundException:
org.objectweb.asm.tree.ClassNode
at java.lang.ClassLoader.findClass(ClassLoader.java:359)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:429)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
... 52 more

What part of Eclipse uses the class org/objectweb/asm/tree/ClassNode? I'm
pretty sure I don't anyway! I've tried to compare the content in
<WORKSPACE>/.metadata between the working and errornous workspace, but I
can't find any differences that would cause this error.

Thanks!

/Jacob
Re: NoClassDefFoundError: org/objectweb/asm/tree/ClassNode [message #23211 is a reply to message #23172] Wed, 26 November 2008 17:16 Go to previous message
No real name is currently offline No real nameFriend
Messages: 4
Registered: July 2009
Junior Member
Error solved!

Please don't spend any time on this issue!

What seemed to be a hard problem turned out to have an easy solution (as
always). I did a huge mistake (time to stop working and get some sleep =)
- I got lazy and started to "select all" in the "Order and Export" section
of the "Java Build Path" of the project properties. By doing that, I also
included (i.e. "exported") a dependency to MicroEmulator, which clearly
should have been included. The MicroEmulator contains the ClassNode class
... (BTW, since I build with Maven, I've to tick the projects to export
after each build, quite annoying ... But that does in no way entitle the
laziness! *ashamed*)

I have no real clue how this problem could have propagated to the simple
HelloWorld project though. When I excluded the dependency to
MicroEmulator, I could executed my original MIDlet. But when I re-ran the
HelloWorld project, the error still remained. I had to do a Eclipse clean
on the HelloWorld project (Project -> Clean -> <HelloWorld project>) in
order to get rid of the error. I would have expected that it would have
worked right away, since there are no explicit dependency bweteen the two
projects. Anyway, my main problem is now solved! =)

Sorry for having wasted your time!

So, back to MTJ it is! =) Keep up the great work, guys!
Re: NoClassDefFoundError: org/objectweb/asm/tree/ClassNode [message #568524 is a reply to message #23172] Wed, 26 November 2008 17:16 Go to previous message
No real name is currently offline No real nameFriend
Messages: 4
Registered: July 2009
Junior Member
Error solved!

Please don't spend any time on this issue!

What seemed to be a hard problem turned out to have an easy solution (as
always). I did a huge mistake (time to stop working and get some sleep =)
- I got lazy and started to "select all" in the "Order and Export" section
of the "Java Build Path" of the project properties. By doing that, I also
included (i.e. "exported") a dependency to MicroEmulator, which clearly
should have been included. The MicroEmulator contains the ClassNode class
... (BTW, since I build with Maven, I've to tick the projects to export
after each build, quite annoying ... But that does in no way entitle the
laziness! *ashamed*)

I have no real clue how this problem could have propagated to the simple
HelloWorld project though. When I excluded the dependency to
MicroEmulator, I could executed my original MIDlet. But when I re-ran the
HelloWorld project, the error still remained. I had to do a Eclipse clean
on the HelloWorld project (Project -> Clean -> <HelloWorld project>) in
order to get rid of the error. I would have expected that it would have
worked right away, since there are no explicit dependency bweteen the two
projects. Anyway, my main problem is now solved! =)

Sorry for having wasted your time!

So, back to MTJ it is! =) Keep up the great work, guys!
Previous Topic:NoClassDefFoundError: org/objectweb/asm/tree/ClassNode
Next Topic:Vertically split a form
Goto Forum:
  


Current Time: Sat Dec 20 20:51:36 GMT 2014

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

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