Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » ClassNotFoundException on startup(ClassNotFoundException is thrown for all the handlers and parts when starting the e4 application within Eclipse IDE)
ClassNotFoundException on startup [message #1696100] Thu, 21 May 2015 19:11 Go to next message
Ozgur Cagdas is currently offline Ozgur CagdasFriend
Messages: 32
Registered: May 2013
Member
Hi,

I recently installed Luna and to sanity check my environment before delving into anything more complicated, I attempted to create and run the 'com.example.e4.rcp.wizard' project as described in http://www.vogella.com/tutorials/EclipseRCP/article.html . However, right at the startup, I am getting ClassNotFoundException exceptions for each and every handler and part defined in this product. Quite expectedly, it does behave the same when I try it with my existing project too.

My system configuration is
Eclipse: Luna Service Release 2 (4.4.2) Build id: 20150219-0600
OS: Ubuntu 14.04.1 LTS
arch: x86_64
Java version: "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

The console log covering the system info and the first exception is as below. Same exception repeats for the other elements as well.

SESSION 2015-05-21 19:36:00.659 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product com.example.e4.rcp.wizard.product -clearPersistedState
Command-line arguments:  -product com.example.e4.rcp.wizard.product -data /home/ocagdas/workspace/../runtime-com.example.e4.rcp.wizard.product -dev file:/home/ocagdas/workspace/.metadata/.plugins/org.eclipse.pde.core/com.example.e4.rcp.wizard.product/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog -clearPersistedState -clean

!ENTRY org.eclipse.e4.ui.workbench 4 0 2015-05-21 19:36:04.435
!MESSAGE Unable to load class 'com.example.e4.rcp.wizard.handlers.QuitHandler' from bundle '29'
!STACK 0
java.lang.ClassNotFoundException: com.example.e4.rcp.wizard.handlers.QuitHandler cannot be found by com.example.e4.rcp.wizard_1.0.0.qualifier
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
	at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.processActiveHandler(HandlerProcessingAddon.java:144)
	at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.postConstruct(HandlerProcessingAddon.java:53)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:271)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:186)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:107)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:50)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:294)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:146)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:143


In a similar forum post, I see that the issue is eventually identified as not having '.' in the Bundle-ClassPath but it does not make any difference at all in my case.

The problem is pretty fundamental so, either I am making quite a silly mistake or there is something wrong with my platform+eclipse ide combination.

Any ideas? Is there an extra launch option to get some more useful debug at least or a magic box to tick to resolve it?

Thanks in advance,

Oz

[Updated on: Thu, 21 May 2015 23:16]

Report message to a moderator

Re: ClassNotFoundException on startup [message #1696268 is a reply to message #1696100] Sun, 24 May 2015 23:06 Go to previous messageGo to next message
Ozgur Cagdas is currently offline Ozgur CagdasFriend
Messages: 32
Registered: May 2013
Member
Deleting the ~/workspace/.metadata folder did the trick. There seems to be an issue with reading the metadata files created by an older version of Eclipse.
Re: ClassNotFoundException on startup [message #1819232 is a reply to message #1696268] Fri, 10 January 2020 10:14 Go to previous message
Nikhil Tyagi is currently offline Nikhil TyagiFriend
Messages: 3
Registered: November 2019
Junior Member
hey,
I'm getting the same exception,

any solution?
Previous Topic:Eclipse RCP - view resize restriction
Next Topic:Classloader problem after upgrade to Luna
Goto Forum:
  


Current Time: Tue Mar 19 09:11:30 GMT 2024

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

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

Back to the top