Bug 113092 - o.e.g.tests.runtime.emf.core do not run
Summary: o.e.g.tests.runtime.emf.core do not run
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P1 critical
Target Milestone: ---   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-10-19 10:50 EDT by Christian Damus CLA
Modified: 2010-07-19 12:24 EDT (History)
0 users

See Also:


Attachments
Patch to fix test plug-in (1.15 KB, patch)
2005-10-19 12:31 EDT, Christian Damus CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2005-10-19 10:50:15 EDT
The org.eclipse.gmf.tests.runtime.emf.core JUnit test suite doesn't run on
Linux, but fails with a NoClassDefFoundError on the MListener class.  This is
not reproducible on Windows.

Stack tracke:

Failed to invoke suite():java.lang.NoClassDefFoundError:
org/eclipse/gmf/runtime/emf/core/edit/MListener

org.eclipse.test.EclipseTestRunner$TestFailedException: Failed to invoke
suite():java.lang.NoClassDefFoundError:
org/eclipse/gmf/runtime/emf/core/edit/MListener
at org.eclipse.test.EclipseTestRunner.runFailed(EclipseTestRunner.java:269)
at org.eclipse.test.EclipseTestRunner.getTest(EclipseTestRunner.java:256)
at org.eclipse.test.EclipseTestRunner.<init>(EclipseTestRunner.java:213)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:197)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Comment 1 Christian Damus CLA 2005-10-19 12:31:28 EDT
Created attachment 28456 [details]
Patch to fix test plug-in

The problem in running the tests traces to a ClassCircularityError in
initializing the MListener class.  This error is thrown
  - when the MetamodelProviderTestCase's inner-class provider is being asked
    whether it provides for the Ecore package
  - when the MSLAdapterFactoryManager forces initialization of all providers
    by asking for the provider for the Ecore package
  - when the MSLPlugin (o.e.g.runtime.emf.core) is initializing
  - when the o.e.g.tests.runtime.emf.core.AllTests class is initializing
    one of its test cases which depends on MListener and is, therefore,
    already trying to initialize MListener

The re-entrance into the initialization of the MListener class is the
circularity in question.  The simplest fix is just to force the initialization
of the o.e.g.runtime.emf.core plug-in before initializing any of the test
classes.
Comment 2 Christian Damus CLA 2005-10-19 12:46:07 EDT
Just to clarify the remark about "this is not reproducible on Windows":  the
problem is not actually a platform issue, but a VM-dependent issue.  The Sun VM
manifests the problem because of an apparently more aggressive class
verification strategy, which causes classes to be loaded sooner than in some
other VMs such as the IBM runtime.
Comment 3 Anthony Hunter CLA 2005-10-19 13:53:51 EDT
Committed the patch to CVS
Comment 4 Eclipse Webmaster CLA 2010-07-19 12:24:02 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug