Generation of PikeOS configuration fails
Steps to reproduce:
- Open attached model
- Double-click on DSE ->DSE Knoten ->Copy of Platform Architecture ->Deployment ->DSE Schedule Result
- Hit Generate VMIT File button
- Select directory where generated
vmit.xml
should be placed
Result:
- Below exception is produced
- The
vmit.xml
file placed in the directory selected by the user is incomplete.
Analysis:
- The error is due to a change in
EcoreSerializerBase
that has been made to makecreateBundleURI()
work in both the developer version of AF3, as well as the pre-compiled RCP. - While the new version works fine for loading EMF resources from
Eclipse bundles, it fails when trying to save a resource into an
Eclipse bundle (protocol doesn’t support output). This is even
true if the target resource already exists in the bundle (if this
was the case, old implementation of
createBundleURI
was able to save to resource residing in the Eclipse bundle, but only in the developer installation of AF3).
Proposed fix:
- Add method to
EcoreSerializerBase
to create URI to (new) temporary file in the file system - Update configuration generator accordingly
java.net.UnknownServiceException: protocol doesn't support output
at java.net.URLConnection.getOutputStream(URLConnection.java:843)
at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl.createOutputStream(URIHandlerImpl.java:148)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:349)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:996)
at org.fortiss.tooling.kernel.utils.EcoreSerializerBase.save(EcoreSerializerBase.java:153)
at org.fortiss.tooling.kernel.utils.EcoreSerializerBase.save(EcoreSerializerBase.java:131)
at org.fortiss.af3.scheduling.pikeos.PikeOSConfigurator.saveConfig(PikeOSConfigurator.java:753)
at org.fortiss.af3.scheduling.pikeos.VmitGenerator.createVmitFile(VmitGenerator.java:154)
at org.fortiss.af3.efficientdeployment.ui.editor.generated.schedule.DSEScheduleEditorBackend.vmitGetSelected(DSEScheduleEditorBackend.java:219)
at org.fortiss.af3.efficientdeployment.ui.editor.generated.schedule.DSEScheduleEditorBackend.access$2(DSEScheduleEditorBackend.java:185)
at org.fortiss.af3.efficientdeployment.ui.editor.generated.schedule.DSEScheduleEditorBackend$2.widgetSelected(DSEScheduleEditorBackend.java:172)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.fortiss.af3.rcapplication.AF3Application.start(AF3Application.java:48)
at org.eclipse.equinox.internal.apEclipseAppHandle.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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
(from redmine: issue id 2844, created on 2017-02-17, closed on 2017-02-20)
- Uploads: