Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » [E4AP] Error on loading workbench.xmi(duplicate xmi:id for different parts)
[E4AP] Error on loading workbench.xmi [message #911396] Tue, 11 September 2012 14:14 Go to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 353
Registered: December 2010
Location: Germany
Senior Member
Hello,

I have a product with a basic application model. Other plug-ins are contributing to this model with fragments. On the first start of the application everything works fine. On the second start (even if I immediately close the window) I get the following error:

[2012-09-11 15:14:15,401] ERROR org.eclipse.equinox.logger Unable to load resource file:/D:/GosaEntwicklung/runtime-etisch_develop_autologin.product/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi 
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@13e6f83 (elementId: de.emsw.gosa.part.eingangsfach.live, tags: [NoClose], contributorURI: platform:/plugin/de.emsw.gosa.contrib.eingangsfach) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://de.emsw.gosa.contrib.eingangsfach/de.emsw.gosa.contrib.eingangsfach.live.EingangsfachLivePart, object: null, context: null, variables: null, label: Eingangsfach, iconURI: platform:/plugin/de.emsw.gosa.contrib.eingangsfach/icons/eingangsfach.png, tooltip: null, dirty: false, closeable: false, description: null)' is not legal. (file:/D:/GosaEntwicklung/runtime-etisch_develop_autologin.product/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi, 81, 237)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
...
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@13e6f83 (elementId: de.emsw.gosa.part.eingangsfach.live, tags: [NoClose], contributorURI: platform:/plugin/de.emsw.gosa.contrib.eingangsfach) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://de.emsw.gosa.contrib.eingangsfach/de.emsw.gosa.contrib.eingangsfach.live.EingangsfachLivePart, object: null, context: null, variables: null, label: Eingangsfach, iconURI: platform:/plugin/de.emsw.gosa.contrib.eingangsfach/icons/eingangsfach.png, tooltip: null, dirty: false, closeable: false, description: null)' is not legal. (file:/D:/GosaEntwicklung/runtime-etisch_develop_autologin.product/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi, 81, 237)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2657)
...
Caused by: java.lang.IllegalArgumentException: The selected element org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@9aca82 (elementId: de.emsw.gosa.part.eingangsfach.live, tags: [NoClose], contributorURI: platform:/plugin/de.emsw.gosa.contrib.eingangsfach) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://de.emsw.gosa.contrib.eingangsfach/de.emsw.gosa.contrib.eingangsfach.live.EingangsfachLivePart, object: null, context: null, variables: null, label: Eingangsfach, iconURI: platform:/plugin/de.emsw.gosa.contrib.eingangsfach/icons/eingangsfach.png, tooltip: null, dirty: false, closeable: false, description: null) is not a child of this container
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:158)
...


This leads to the orginal model being loaded, and user changes to the model are therefore lost.

This seems to be the relevant part of the workbench.xmi:

<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_KeraEfwXEeGu-tV2gbH-ZA" elementId="de.emsw.gosa.application" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" selectedElement="_KesBIPwXEeGu-tV2gbH-ZA">
  <children xsi:type="basic:TrimmedWindow" xmi:id="_KesBIPwXEeGu-tV2gbH-ZA" elementId="de.emsw.gosa.window.main" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" selectedElement="_KesBIfwXEeGu-tV2gbH-ZA" label="eSchreibtisch 1.7.1 Beta (beck@emxp64ck.emsw.local:1099)" iconURI="platform:/plugin/de.emsw.gosa.product.etisch/icons/app/app_etisch.png" x="0" y="0" width="1200" height="800">
    <tags>topLevel</tags>
    <children xsi:type="advanced:PerspectiveStack" xmi:id="_KesBIfwXEeGu-tV2gbH-ZA" elementId="perspectives" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" selectedElement="_KesBIvwXEeGu-tV2gbH-ZA">
      <children xsi:type="advanced:Perspective" xmi:id="_KesBIvwXEeGu-tV2gbH-ZA" elementId="persp.etisch" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" selectedElement="_KesBI_wXEeGu-tV2gbH-ZA" label="Elektronischer Schreibtisch" iconURI="platform:/plugin/de.emsw.gosa.product.etisch/icons/persp_etisch.png">
        <children xsi:type="basic:PartSashContainer" xmi:id="_KesBI_wXEeGu-tV2gbH-ZA" elementId="sash.main" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" selectedElement="_KesBJPwXEeGu-tV2gbH-ZA" horizontal="true">
          <children xsi:type="basic:PartSashContainer" xmi:id="_KesBJPwXEeGu-tV2gbH-ZA" elementId="sash.left" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" containerData="60" selectedElement="_KesBJfwXEeGu-tV2gbH-ZA">
            <children xsi:type="basic:PartStack" xmi:id="_KesBJfwXEeGu-tV2gbH-ZA" elementId="stack.left.top" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" containerData="50" selectedElement="_DhkoQKyREeCdbe-rhABTjg">
              <children xsi:type="basic:Part" xmi:id="_DhkoQKyREeCdbe-rhABTjg" elementId="de.emsw.gosa.part.eingangsfach.live" contributorURI="platform:/plugin/de.emsw.gosa.contrib.eingangsfach" contributionURI="bundleclass://de.emsw.gosa.contrib.eingangsfach/de.emsw.gosa.contrib.eingangsfach.live.EingangsfachLivePart" label="Eingangsfach" iconURI="platform:/plugin/de.emsw.gosa.contrib.eingangsfach/icons/eingangsfach.png">
                ...
          <children xsi:type="basic:PartSashContainer" xmi:id="_PzKgmfwZEeGkWqbY2vzguA" elementId="sash.right" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" containerData="40">
            <children xsi:type="basic:PartStack" xmi:id="_PzKgmvwZEeGkWqbY2vzguA" elementId="stack.right.top" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" containerData="50" selectedElement="_fJcM4K7mEeCWdr0cltTDYg">
              <children xsi:type="basic:Part" xmi:id="_fJcM4K7mEeCWdr0cltTDYg" elementId="de.emsw.gosa.part.umlauf.live" contributorURI="platform:/plugin/de.emsw.gosa.contrib.umlauf" contributionURI="bundleclass://de.emsw.gosa.contrib.umlauf/de.emsw.gosa.contrib.umlauf.live.UmlaufLivePart" label="Uml&#xe4;ufe" iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif">
                ...
            <children xsi:type="basic:PartStack" xmi:id="_PzKgm_wZEeGkWqbY2vzguA" elementId="stack.right.bottom" contributorURI="platform:/plugin/de.emsw.gosa.product.etisch" containerData="50" selectedElement="_DhkoQKyREeCdbe-rhABTjg">
              <children xsi:type="basic:Part" xmi:id="_DhkoQKyREeCdbe-rhABTjg" elementId="de.emsw.gosa.part.egvp" contributorURI="platform:/plugin/de.emsw.gosa.contrib.egvp" contributionURI="bundleclass://de.emsw.gosa.contrib.egvp/de.emsw.gosa.contrib.egvp.live.EgvpLivePart" label="EGVP" iconURI="platform:/plugin/de.emsw.gosa.contrib.egvp/icons/egvp.gif">
                ...


Running the debugger with a breakpoint in ElementContainerImpl.setSelectedElement() I noticed that the newSelectedElement "de.emsw.gosa.part.eingangsfach.live" is beeing set for the container "stack.right.bottom". Looking back at the workbench.xmi I noticed that the xmi:id is the same for "de.emsw.gosa.part.eingangsfach.live" and "de.emsw.gosa.part.egvp".

There seems to be an error in the generation of the xmi:id. Maybe because these parts are contributed by different fragments?

Is this a known bug, or would you like a bug report?
Does anyone have an idea for a workaround?

Greetings
Christoph
Re: [E4AP] Error on loading workbench.xmi [message #911407 is a reply to message #911396] Tue, 11 September 2012 14:37 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 353
Registered: December 2010
Location: Germany
Senior Member
I found the solution: Since the xmi:id is generated when the Part is created in the e4.tools editor, it is sufficient to change the xmi:id in the fragment.e4xmi.
Re: [E4AP] Error on loading workbench.xmi [message #911428 is a reply to message #911407] Tue, 11 September 2012 15:28 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 353
Registered: December 2010
Location: Germany
Senior Member
Another hint: Don't copy/paste your fragment.xmi Wink
Re: [E4AP] Error on loading workbench.xmi [message #911503 is a reply to message #911428] Tue, 11 September 2012 18:42 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Right wanted to reply and ask if you by chance copied your
fragment.e4xmi which is a really bad idea :-)

Tom

Am 11.09.12 17:28, schrieb Christoph Keimel:
> Another hint: Don't copy/paste your fragment.xmi ;)
Re: [E4AP] Error on loading workbench.xmi [message #1405196 is a reply to message #911503] Wed, 06 August 2014 20:28 Go to previous message
Gernot Krause is currently offline Gernot Krause
Messages: 2
Registered: June 2014
Junior Member
Hi!

I recently had the same error message as I dragged and dropped a Part from one PartStack to another in a model fragment.
(using Luna 4.4 and latest e4 tools 0.14.0.v20140624-1329)

Is this a known bug?

As a workaround I created a new Part under the target PartStack and copied all the settings...

Thanks,
Gernot.
Previous Topic:error if opening Application.e4xmi
Next Topic:@PreDestroy for singletons
Goto Forum:
  


Current Time: Sat Sep 20 12:06:10 GMT 2014

Powered by FUDForum. Page generated in 0.01683 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software