Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321179 - ExceptionInInitializerError when opening a diagram or creating from the palette
Summary: ExceptionInInitializerError when opening a diagram or creating from the palette
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.4.0   Edit
Hardware: PC Linux
: P3 major
Target Milestone: 1.4.1   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 16:46 EDT by Anthony Hunter CLA
Modified: 2010-07-28 16:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Hunter CLA 2010-07-28 16:46:09 EDT
When using one of the new GMF Runtime 1.4.1 builds, a catastrophic issue occurs that you cannot open an existing diagram or create new shapes from the palette. Can be duplicated on a geoshapes diagram and create a dropshadow rectangle.

!ENTRY org.eclipse.ui 4 0 2010-07-27 10:36:25.968
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ExceptionInInitializerError
	at java.lang.J9VMInternals.initialize(Unknown Source)
	at org.eclipse.gmf.runtime.draw2d.ui.figures.RectangularDropShadow.<clinit>(Unknown Source)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(Unknown Source)
	at org.eclipse.gmf.runtime.draw2d.ui.figures.RectangularDropShadowLineBorder.<clinit>(Unknown Source)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(Unknown Source)
	at java.lang.J9VMInternals.initialize(Unknown Source)
[snip]
Comment 1 Anthony Hunter CLA 2010-07-28 16:48:20 EDT
The problem is caused by the latest GMF 1.4.1 builds.

I can duplicate a similar issue by using the Eclipse GMF Geoshapes example and dropping a shadow rectangle on the diagram.

I took Helios GA and the Geoshapes example is fine.

As soon as I install only the GMF Runtime 1.4.1 build, I get the error:

java.lang.NoClassDefFoundError: org.eclipse.gmf.runtime.draw2d.ui.figures.RectangularDropShadowLineBorder (initialization failure)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
	at org.eclipse.gmf.runtime.diagram.ui.geoshapes.internal.editparts.ShadowRectangleEditPart.createNodeFigure(ShadowRectangleEditPart.java:43)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.createFigure(ShapeNodeEditPart.java:90)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigure(AbstractGraphicalEditPart.java:494)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart.addChildVisual(DiagramEditPart.java:258)
	at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:210)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.addChild(GraphicalEditPart.java:1319)
	at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:771)
	at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:718)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:633)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$3(GraphicalEditPart.java:1)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$3.run(GraphicalEditPart.java:861)
[snip]
Comment 2 Anthony Hunter CLA 2010-07-28 16:55:09 EDT
The problem is with the MANIFEST.MF in org.eclipse.gmf.runtime.draw2d.ui_1.4.1.v20100720-0030.jar . The problem has nothing to do with the code changes submitted in GMF.

Somehow 
Bundle-ActivationPolicy: lazy
was removed from the plugin when we incremented the bundle service version.

It would appear Anthony mistakenly clicked the "Activate this plug-in when one of it's classes is loaded" when activating the editor and then blindly committed the change.
Comment 3 Anthony Hunter CLA 2010-07-28 16:55:36 EDT
Fixed in HEAD and R1_4_maintenance