I have an RCP product which doesn’t run. Then I installed Eclipse freshly, and when I open Eclipse.exe it doesn’t open Eclipse IDE. I get the error: NoClassDefFoundError: com/mercury/javashared/agentloader/AgentBootstrap (Please see complete trace below).
System has latest jdk,jre installed. What could be the reason for that error?
(PS: The same eclipse archieve when unzipped on a different machine works fine). I am able to run eclipse and my eclipse rcp product there)
!ENTRY org.eclipse.osgi 4 0 2009-06-25 10:40:19.468
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: com/mercury/javashared/agentloader/AgentBootstrap
at org.eclipse.swt.widgets.Display.<init>(Display.java:393)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:448)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.IDEApplication.createDisplay(IDEApplication.java:122)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:75)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.ClassNotFoundException: com.mercury.javashared.agentloader.AgentBootstrap
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:402)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 17 more
UPDATE:
I had QTP (Quick Test Pro) installed on the machine. When I uninstalled QTP now I am able to both RCP product and Eclipse.exe.
Now, whats the relation between QTP and Eclipse? I want both to coexist.
That should mean a workspace issue: eclipse try to recreate a view for which the jar is missing.
Try to launch your eclipse with ‘-clean’ option, and making sure it does reference a fresh new workspace (with the
-dataoption, like illustrated in this eclipse.ini)This question illustrated a clean start:
Regarding QTP, check this article from IBM, which describes a similar situation.
Each was set to:
or more explicitly:
If this is indeed the case, that reminds me of my answer to the question:
“Why doesn’t the Java SDK installer set JAVA_HOME?“
😉
If you want both eclipse and QTP to coexist, you need to make sure any running configuration you may have (in or outside eclipse) needing to run “with” QTP are the scripts which set those extra variables (_JAVA_HOME or other).
If those variables are set globally (by the QTP installation process itself)… bad things can happens.