java.lang.NoClassDefFoundError: Could not initialize class

This topic contains 5 replies, has 3 voices, and was last updated by Profile photo of Riyad Kalla Riyad Kalla 7 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #288083 Reply


    We are doing plug-in development and after updating from CVS, and setting our plug-in dependencies (via Java Build Path). Ran Manifest, which starts our App. To test we click: “Sample Action”. However, when we do, I get the following error:

    java.lang.NoClassDefFoundError: Could not initialize class mezcalth.mcgsp.Main
    at org.eclipse.ui.internal.PluginAction.runWithEvent(
    at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
    at org.eclipse.jface.action.ActionContributionItem.access$2(
    at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(
    at org.eclipse.swt.widgets.EventTable.sendEvent(
    at org.eclipse.swt.widgets.Widget.sendEvent(
    at org.eclipse.swt.widgets.Display.runDeferredEvents(
    at org.eclipse.swt.widgets.Display.readAndDispatch(
    at org.eclipse.ui.internal.Workbench.runEventLoop(
    at org.eclipse.ui.internal.Workbench.runUI(
    at org.eclipse.ui.internal.Workbench.access$4(
    at org.eclipse.ui.internal.Workbench$
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
    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(
    at org.eclipse.equinox.launcher.Main.basicRun(
    at org.eclipse.equinox.launcher.Main.main(

    The interesting thing here is that only the people using MyEclipse is having this problem. If I start regular Eclipse and do the same thing, it works fine! Here is my installation summary:

    *** Date:
    Friday, August 8, 2008 3:46:15 PM PDT

    ** System properties:
    OS version=5.1
    Java version=1.5.0_11

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 6.5.1 GA
    Build id: 6.5.1-GA-20080715

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 6.5.1 GA
    Build id: 6.5.1-GA-20080715

    Eclipse Platform

    Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft
    Build id: M20080221-1800

    Eclipse RCP

    Version: 3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc
    Build id: M20080221-1800

    Eclipse Java Development Tools

    Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7
    Build id: M20080221-1800

    Eclipse Plug-in Development Environment

    Version: 3.3.3.r33x_r20080129-7N7M5DQVIA_6oJsEFkEL
    Build id: M20080221-1800

    Eclipse Project SDK

    Version: 3.3.3.r33x_r20080129-7M7J7LB-u3aphGW6o3_VmiVfGXWO
    Build id: M20080221-1800

    Eclipse Graphical Editing Framework

    Version: 3.3.2.v20080129
    Build id: 20080221-1602

    Eclipse startup command=-os
    C:\Program Files\MyEclipse 6.5\eclipse\eclipse.exe
    C:\Program Files\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
    C:\Program Files\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
    C:\Program Files\MyEclipse 6.5\jre\bin\javaw.exe

    Your help in this manner is greatly appreciated.

    Thank you,

    #288101 Reply
    Profile photo of Loyal Water
    Loyal Water

    Was the project that your working with created using MyEclipse ? Or is it a non MyEclipse project?

    #288107 Reply

    It was created using regular Eclipse (RCP).

    #288116 Reply
    Profile photo of Riyad Kalla
    Riyad Kalla


    Can you double-check the Java Build Path preferences between the two installs (ME: Not Working, E: Working) and just make sure all the same project refs and plugins refs are there? We don’t do anything special to change the base RCP tooling, so I wonder if some reference just got dorked somewhere.

    #288124 Reply

    The only difference in the Java Build Path is in the Plug-in Dependencies.

    MyEclipse has the following listed:

    It appears that MyEclipse automatically adds these jar files automatically. I’m not sure if this is causing my problems. Can you shed some light on what these jar files are?

    #288244 Reply
    Profile photo of Riyad Kalla
    Riyad Kalla

    IIRC both of those are related to our visual HTML designer that utilizes customized Mozilla code to execute. You shouldn’t need them to run your app.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: java.lang.NoClassDefFoundError: Could not initialize class