Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316865 - Error when attempting to open an xsd file
Summary: Error when attempting to open an xsd file
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsd (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: wst.xsd CLA
QA Contact: Valentin Baciu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-15 04:57 EDT by Luciana Moreira CLA
Modified: 2010-07-21 18:26 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luciana Moreira CLA 2010-06-15 04:57:09 EDT
What steps will reproduce the problem?
1. create a schema file (.xsd)
2. try to open it with XML schema editor

Looks like some class is missing in the plugin package


-- Error Details --
Date: Tue Jun 15 10:46:33 CEST 2010
Message: Problems occurred when invoking code from plug-in: "org.eclipse.jface".
Severity: Error
Product: Eclipse 1.2.2.20100122-1337 (org.eclipse.epp.package.jee.product)
Plugin: org.eclipse.jface
Session Data:
eclipse.buildId=unknown
java.version=1.5.0_17
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product


Exception Stack Trace:
java.lang.NoClassDefFoundError
	at org.eclipse.xsd.impl.XSDSchemaImpl.eStaticClass(XSDSchemaImpl.java:847)
	at org.eclipse.emf.ecore.impl.EObjectImpl.eClass(EObjectImpl.java:224)
	at org.eclipse.emf.ecore.impl.ENotificationImpl.getFeature(ENotificationImpl.java:223)
	at org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDConcreteComponentImpl.java:1006)
	at org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSchemaImpl.java:893)
	at org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImpl.java:855)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsEList.inverseAdd(ResourceImpl.java:416)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:318)
	at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307)
	at org.eclipse.wst.xsd.ui.internal.text.XSDModelAdapter.createSchema(XSDModelAdapter.java:101)
	at org.eclipse.wst.xsd.ui.internal.text.XSDModelAdapter.lookupOrCreateSchema(XSDModelAdapter.java:212)
	at org.eclipse.wst.xsd.ui.internal.editor.InternalXSDMultiPageEditor.buildModel(InternalXSDMultiPageEditor.java:246)
	at org.eclipse.wst.xsd.ui.internal.adt.editor.ADTMultiPageEditor.createPages(ADTMultiPageEditor.java:168)
	at org.eclipse.wst.xsd.ui.internal.editor.InternalXSDMultiPageEditor.createPages(InternalXSDMultiPageEditor.java:567)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99)
	at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99)
	at org.eclipse.ui.views.navigator.OpenActionGroup.runDefaultAction(OpenActionGroup.java:133)
	at org.eclipse.ui.views.navigator.MainActionGroup.runDefaultAction(MainActionGroup.java:330)
	at org.eclipse.ui.views.navigator.ResourceNavigator.handleOpen(ResourceNavigator.java:787)
	at org.eclipse.ui.views.navigator.ResourceNavigator$6.open(ResourceNavigator.java:499)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.runtime.Platform.run(Platform.java:888)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Comment 1 Valentin Baciu CLA 2010-07-20 16:37:15 EDT
Luciana, is this problem consistent or intermittent?

Ed, any chance you've seen similar XSD EMF model stack traces?
Comment 2 Ed Merks CLA 2010-07-20 17:09:53 EDT
It's hard to imagine this method could fail.

  protected EClass eStaticClass()
  {
    return XSDPackage.Literals.XSD_SCHEMA;
  }

It seems highly likely there would be other errors earlier in the log that would be more informative.
Comment 3 Luciana Moreira CLA 2010-07-21 03:47:32 EDT
I have tried to re-produce the error today but it did not happen again. Since I reported the bug I switched to XML Editor and cannot tell you at which point this problem disappeared. I have in the mean time done several modification in my eclipse environment with different plugins.

What I can tell you is that now it works nicely again. 
My eclipse version is now:
  Eclipse IDE for Java EE Developers	1.2.2.20100217-2310	epp.package.jee
Comment 4 Valentin Baciu CLA 2010-07-21 18:26:35 EDT
Thank you. I'll resolve as "works for me".