Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » dangling '/' after remove.
dangling '/' after remove. [message #405564] Mon, 27 November 2006 17:52 Go to next message
Eclipse UserFriend
Originally posted by: kellypu.ie.ibm.com

Hi all,

I get the following exception thrown when I try to load a resource :

Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'com.ibm.mtools.repository.repository.impl.ModelSetContentsI mpl @1dc81dc8'
is not legal.
(file:/C:/development/runtime-build2311/.metadata/.plugins/c om.ibm.mtools.repository/_ecST0HsUEdunDsMuGFmZ1g-FB4DDB9C-F2 B9-79DF-9F56-54F6EF8F9D61.scp,
3, 122)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2393)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2378)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setValueFromId(XML Handler.java:2525)

It happens when I try to load a resource after performing a delete and
save operation. Here is the contents of the model before and after
the save :

before the delete command is performed.

<?xml version="1.0" encoding="UTF-8"?>
<mrd:ModelSetContents xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<artifact xsi:type="mrd:ViewModel" name="ScopeModel"
view="//@artifact.1"/>
<artifact xsi:type="mrd:View" name="NewScope" local="true"/>
</mrd:ModelSetContents>

This is the contents of the model after the delete command is performed
(Note the dangling '/')

<?xml version="1.0" encoding="UTF-8"?>
<mrd:ModelSetContents xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<artifact xsi:type="mrd:ViewModel" name="ScopeModel" view="/"/>
</mrd:ModelSetContents>

Because of the view="/", i get an IllegalValueException thrown.
I have a feeling it might be a containment issue, but I can't be sure.
I tried stepping through ResourceImpl.getURIFragment but nothing is
looking too obvious.

Any help appreciated,

Cheers,

Paul
Re: dangling '/' after remove. [message #405571 is a reply to message #405564] Mon, 27 November 2006 22:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Paul,

In EMF 2.2, dangling IDREFs are not properly detected which as been
fixed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=153577. But the
changes were quite extensive and didn't seem suitable for the 2.2
maintenance stream. That bugzilla explains a work around...


Paul Kelly wrote:
> Hi all,
>
> I get the following exception thrown when I try to load a resource :
>
> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
> 'com.ibm.mtools.repository.repository.impl.ModelSetContentsI mpl @1dc81dc8'
> is not legal.
> (file:/C:/development/runtime-build2311/.metadata/.plugins/c om.ibm.mtools.repository/_ecST0HsUEdunDsMuGFmZ1g-FB4DDB9C-F2 B9-79DF-9F56-54F6EF8F9D61.scp,
> 3, 122)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2393)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2378)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setValueFromId(XML Handler.java:2525)
>
>
> It happens when I try to load a resource after performing a delete and
> save operation. Here is the contents of the model before and after
> the save :
>
> before the delete command is performed.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mrd:ModelSetContents xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <artifact xsi:type="mrd:ViewModel" name="ScopeModel"
> view="//@artifact.1"/>
> <artifact xsi:type="mrd:View" name="NewScope" local="true"/>
> </mrd:ModelSetContents>
>
> This is the contents of the model after the delete command is
> performed (Note the dangling '/')
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mrd:ModelSetContents xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <artifact xsi:type="mrd:ViewModel" name="ScopeModel" view="/"/>
> </mrd:ModelSetContents>
>
> Because of the view="/", i get an IllegalValueException thrown.
> I have a feeling it might be a containment issue, but I can't be sure.
> I tried stepping through ResourceImpl.getURIFragment but nothing is
> looking too obvious.
>
> Any help appreciated,
>
> Cheers,
>
> Paul


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: dangling '/' after remove. [message #405577 is a reply to message #405564] Tue, 28 November 2006 09:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: spider_a.freenet.am

hi, whay do you delete View at all..? Did you try same thing with View="", i think you just can keep it empty, and in this way it should works.

regards,
Re: dangling '/' after remove. [message #405585 is a reply to message #405571] Tue, 28 November 2006 16:16 Go to previous message
Eclipse UserFriend
Originally posted by: kellypu.ie.ibm.com

Hi all,

Workaround in bugzilla did the trick.

Thanks again,

Paul

Ed Merks wrote:
> Paul,
>
> In EMF 2.2, dangling IDREFs are not properly detected which as been
> fixed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=153577. But the
> changes were quite extensive and didn't seem suitable for the 2.2
> maintenance stream. That bugzilla explains a work around...
>
>
> Paul Kelly wrote:
>> Hi all,
>>
>> I get the following exception thrown when I try to load a resource :
>>
>> Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value
>> 'com.ibm.mtools.repository.repository.impl.ModelSetContentsI mpl @1dc81dc8'
>> is not legal.
>> (file:/C:/development/runtime-build2311/.metadata/.plugins/c om.ibm.mtools.repository/_ecST0HsUEdunDsMuGFmZ1g-FB4DDB9C-F2 B9-79DF-9F56-54F6EF8F9D61.scp,
>> 3, 122)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2393)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2378)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setValueFromId(XML Handler.java:2525)
>>
>>
>> It happens when I try to load a resource after performing a delete and
>> save operation. Here is the contents of the model before and after
>> the save :
>>
>> before the delete command is performed.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <mrd:ModelSetContents xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> <artifact xsi:type="mrd:ViewModel" name="ScopeModel"
>> view="//@artifact.1"/>
>> <artifact xsi:type="mrd:View" name="NewScope" local="true"/>
>> </mrd:ModelSetContents>
>>
>> This is the contents of the model after the delete command is
>> performed (Note the dangling '/')
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <mrd:ModelSetContents xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> <artifact xsi:type="mrd:ViewModel" name="ScopeModel" view="/"/>
>> </mrd:ModelSetContents>
>>
>> Because of the view="/", i get an IllegalValueException thrown.
>> I have a feeling it might be a containment issue, but I can't be sure.
>> I tried stepping through ResourceImpl.getURIFragment but nothing is
>> looking too obvious.
>>
>> Any help appreciated,
>>
>> Cheers,
>>
>> Paul
Previous Topic:XML binding: tabs replaced with spaces?
Next Topic:Metamodel mapping with ecore2ecore
Goto Forum:
  


Current Time: Thu Apr 18 23:08:38 GMT 2024

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

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

Back to the top