| Summary: | Exception when opening Application.e4xmi using private namespace | ||
|---|---|---|---|
| Product: | [Technology] XWT | Reporter: | Reto Urfer <reto.urfer> |
| Component: | Core | Assignee: | Project Inbox <e4.xwt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | marco, tom.schindl, yves.yang |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Reto Urfer
The plugin "org.eclipse.e4.demo.simpleide.model" is missing in eclipse. This plugin is generated by EMF and implementes the EMF model in java. Through the description, it is not really a bug. Please reopen if you find new stuffs. I have now just deployed the missing plugin "org.eclipse.e4.demo.simpleide.model" but now i get the following exception when opening the Application.e4xmi from SimpleIDE project with the "e4 Visual Design Editor": org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/ui/2010/UIModel/application/ui/basic' not found. (file:/D:/Daten/eclipse/e4/workspace/org.eclipse.e4.demo.simpleide/Application.e4xmi, 3, 157) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397) at org.eclipse.e4.tools.ui.designer.E4UIRenderer.doLoad(E4UIRenderer.java:69) at org.eclipse.e4.xwt.tools.ui.designer.core.ceditor.ConfigureDesigner$1.runInUIThread(ConfigureDesigner.java:151) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 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:369) 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:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/ui/2010/UIModel/application/ui/basic' not found. (file:/D:/Daten/eclipse/e4/workspace/org.eclipse.e4.demo.simpleide/Application.e4xmi, 3, 157) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2591) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2422) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2072) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2031) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:134) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1840) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1023) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:169) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1363) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181) at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1282) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270) ... 29 more and the following exception when opening the Application.e4xmi from Contacts exemaple project with the "e4 Visual Design Editor": java.lang.ClassCastException: org.eclipse.emf.ecore.impl.DynamicEObjectImpl cannot be cast to org.eclipse.e4.ui.model.application.impl.ApplicationImpl at org.eclipse.e4.tools.ui.designer.E4UIRenderer.doLoad(E4UIRenderer.java:70) at org.eclipse.e4.xwt.tools.ui.designer.core.ceditor.ConfigureDesigner$1.runInUIThread(ConfigureDesigner.java:151) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 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:369) 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:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) so something is now even worse?!? (In reply to comment #3) > I have now just deployed the missing plugin > "org.eclipse.e4.demo.simpleide.model" but now i get the following exception > when opening the Application.e4xmi from SimpleIDE project with the "e4 Visual > Design Editor": > org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: > org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri > 'http://www.eclipse.org/ui/2010/UIModel/application/ui/basic' not found. > (file:/D:/Daten/eclipse/e4/workspace/org.eclipse.e4.demo.simpleide/Application.e4xmi, > 3, 157) It is the same problem. Now you need deploy org.eclipse.e4.ui.model.workbench. Like Yves outlined the Simple-IDE uses an enhanced version of the Application-Model which has to be present. I'm not sure whether Yves Editor is able to deal with such a situation (I think it would also need the .edit-stuff, right?) because in the Simple-IDE Application Model the root is "SimpleIDEApplication". To open the SimpleIDE-Application model in my structure editor you need to have the following bundles installed in your running workbench: * org.eclipse.e4.demo.simpleide.model: The model extension * org.eclipse.e4.demo.tools.simpleide: Extensions to the default editor Paul can we add those 2 bundles to the build so that people can open them without having to install 2 additional bundles? (In reply to comment #5) > I'm not sure whether Yves Editor is able to deal with such a situation (I think > it would also need the .edit-stuff, right?) because in the Simple-IDE > Application Model the root is "SimpleIDEApplication". > Visual Design Editor doesn't need .edit-stuff. (In reply to comment #7) > (In reply to comment #5) > > I'm not sure whether Yves Editor is able to deal with such a situation (I think > > it would also need the .edit-stuff, right?) because in the Simple-IDE > > Application Model the root is "SimpleIDEApplication". > > > Visual Design Editor doesn't need .edit-stuff. So can we remove the bundle then - the only thing I'm loading from there are the images, I guess we could then move them to an extra bundle when we want to share them between our editors (If nobody uses the item-providers we should not ship them.) Tom (In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #5) > > > I'm not sure whether Yves Editor is able to deal with such a situation (I think > > > it would also need the .edit-stuff, right?) because in the Simple-IDE > > > Application Model the root is "SimpleIDEApplication". > > > > > Visual Design Editor doesn't need .edit-stuff. > So can we remove the bundle then - the only thing I'm loading from there are > the images, I guess we could then move them to an extra bundle when we want to > share them between our editors (If nobody uses the item-providers we should not > ship them.) Sorry, there is a misunderstanding. VDE does use the item-providers defined by org.eclipse.e4.model.workbench.edit for the outline view. I mean I doesn't need item-providers of "SimpleIDEApplication". I'm facing the same problem. I tried programmatically to open the application model with the following code:
URI uri = URI.createURI("file:///Users/marco/github-clones/osara/at.osara.rcp/Application.e4xmi");
E4XMIResource resource = new E4XMIResource();
resource.setURI(uri);
try {
resource.load(null);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I definitely included org.eclipse.e4.ui.model.workbench into my dependencies and i can see that the ecore model is located in there, and yet the following problem persists during the resource.load().
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://www.eclipse.org/ui/2010/UIModel/application' not found. (file:///Users/marco/github-clones/osara/at.osara.rcp/Application.e4xmi, 2, 548)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:77)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:185)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1284)
at at.descher.intent.extension.E4ApplicationModelParserFactory.createResource(E4ApplicationModelParserFactory.java:32)
at at.descher.intent.extension.E4ApplicationModelParserFactory.main(E4ApplicationModelParserFactory.java:64)
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/ui/2010/UIModel/application' not found. (file:///Users/marco/github-clones/osara/at.osara.rcp/Application.e4xmi, 2, 548)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2585)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2416)
The support of this tool is dropped. |