Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] java.lang.NoClassDefFoundError when executing outside Eclipse

NoClassDefFoundError exceptions often indicate that a class couldn’t be loaded due to an exception occurring in a static initializer.  Unfortunately these exceptions (wrapped in ExceptionInInitializerError) are silently swallowed.

The easiest way to diagnose this is to attach a remote debugger and set an exception breakpoint on ExceptionInInitializerError.

Brian.

On 8-Apr-2016, at 4:50 PM, Vince S. <vinceos@xxxxxxxxxxx> wrote:

We use tycho to produce our Eclipse maven builds. We create a product (eclipse-repository) and use a target platform (eclipse-target-definition). The  problem that I'm having is after the tycho build in Eclipse, I can successfully run the app using the "Launch an Eclipse Application" option from within Eclipse, but when we attempt to run the generated C:\<proj_dir>\com.sma.em.product\target\products\com.sma.ui.em.product\win32\win32\x86\EnterpriseManager.exe from the command line, I get the following exception:

!SESSION 2016-04-08 11:21:22.201 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86 -debug

!ENTRY org.eclipse.osgi 4 0 2016-04-08 11:21:27.091
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: com/sma/ui/core/widgets/dialogs/ProgressTitleAreaDialog
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.sma.ui.application.Application.showLoginDialog(Application.java:83)
at com.sma.ui.application.Application.start(Application.java:36)
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(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:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: java.lang.ClassNotFoundException: com.sma.ui.core.widgets.dialogs.ProgressTitleAreaDialog cannot be found by com.sma.ui.em_16.0.0.201604081605
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 28 more

What could be the cause of the issue? I've attached the product file (EnterpriseManager.product) and the product pom file, as well as the main configurator pom.xml

<EnterpriseManager.product><pom.xml><pom.xml>_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top