Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] Problem starting EMF Compare Standalone
[EMF Compare] Problem starting EMF Compare Standalone [message #538483] Mon, 07 June 2010 17:47 Go to next message
Eclipse UserFriend
Originally posted by: mdsamh.yahoo.com

This is a multi-part message in MIME format.

------=_NextPart_000_0006_01CB0671.DEE594D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,



I am new to EMF and EMF Compare and would like to get started by running =
the standalone example. I have looked into previous posted messages =
about problems getting this program to run such as =
http://www.eclipse.org/forums/index.php?t=3Dmsg&goto=3D4 91904&#msg_491904=
but could not find a solution to the problem I have. I would =
appreciate any hints or advice.

=20

Basically, I defined an (ecore) metamodel, (xmi) source and target =
models both conforming to the same metamodel. Comparing these two =
models by hand using Compare UI in Eclipse gives correct results. =
However, running EMF Compare standalone program gives me an error: =
Package with uri 'http://simpleMeta/2.0' not found. =
(file:/C:/tmp/sm1.xmi, 8, 18)

=20

This is the top part of my metamodel (in ecore):

=20

<?xml version=3D"1.0" encoding=3D"UTF-8"?>

<ecore:EPackage xmi:version=3D"2.0"

xmlns:xmi=3D"http://www.omg.org/XMI" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"

xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore" =
name=3D"simpleMeta"

nsURI=3D"http://simpleMeta/2.0" nsPrefix=3D"myPrefix">

<eClassifiers xsi:type=3D"ecore:EClass" name=3D"SimpleModel">

=20

I have used 'Create Dynamic Instance' option to create a source and a =
target models (in xmi). Basically, the source model has a root class =
SimpleModel and 3 other classes : ClsA, ClsB and ClsC. Each linked to =
SimpleModel through containment relation. Each class also has a name =
attribute and ClsA, in addition, has a refAAttribute that references =
ClsB. My target model is exactly the same with ClsC deleted=20

=20

This is my source model:

<?xml version=3D"1.0" encoding=3D"ASCII"?>

<myPrefix:SimpleModel xmi:version=3D"2.0"=20

xmlns:xmi=3D"http://www.omg.org/XMI"=20

xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20

xmlns:myPrefix=3D"http://simpleMeta/2.0"=20

xsi:schemaLocation=3D"http://simpleMeta/2.0=20

E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20

SMName=3D"simple1">

<aes CAName=3D"c1" refA=3D"//@bes.1"/>

<bes CBName=3D"b1"/>

<bes CBName=3D"b2"/>

<ces CCName=3D"c1"/>

</myPrefix:SimpleModel>


=20

This is my target model:


<?xml version=3D"1.0" encoding=3D"ASCII"?>

<myPrefix:SimpleModel xmi:version=3D"2.0" =
xmlns:xmi=3D"http://www.omg.org/XMI" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xmlns:myPrefix=3D"http://simpleMeta/2.0" =
xsi:schemaLocation=3D"http://simpleMeta/2.0 =
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore" SMName=3D"simple1">

<aes CAName=3D"c1" refA=3D"//@bes.1"/>

<bes CBName=3D"b1"/>

<bes CBName=3D"b2"/>

</myPrefix:SimpleModel>

=20

This is how I registered xmi resource factory in the program:

=20

resourceSet1.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi", new XMIResourceFactoryImpl());


resourceSet2.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi", new XMIResourceFactoryImpl());

=20

EcoreFactory ecoreFactory =3D EcoreFactory.eINSTANCE;

EPackage simpleMeta =3D ecoreFactory.createEPackage();

simpleMeta.setName("simpleMeta");

simpleMeta.setNsURI("http://simpleMeta/2.0");

Registry.INSTANCE.put("simpleMeta",simpleMeta);

=20

resourceSet1.getPackageRegistry().put("simpleMeta",simpleMeta);

resourceSet2.getPackageRegistry().put("simpleMeta",simpleMeta);

=20

In debug mode, I can see that the error happens at this step :=20

=20

final EObject model1 =3D ModelUtils.load(new File(args[0]), =
resourceSet1);

=20

Sorry for this beginner question. Any help or advice is highly =
appreciated.



Thanks in advance,

=20

=20
=20

=20



=20

=20

=20

=20

=20

=20

=20

=20

=20

------=_NextPart_000_0006_01CB0671.DEE594D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18904">
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal =
align=3Dleft><?xml:namespace prefix=20
=3D o ns =3D "urn:schemas-microsoft-com:office:office" /><o:p><FONT =
size=3D2=20
face=3DArial>Hi,</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal =
align=3Dleft><o:p><FONT size=3D2=20
face=3DArial></FONT></o:p>&nbsp;</P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal align=3Dleft><FONT =
size=3D2=20
face=3DArial>I am new to EMF and EMF Compare and would like to get =
started by=20
running the standalone example.<SPAN style=3D"mso-spacerun: yes">&nbsp; =
</SPAN>I=20
have looked into previous posted messages about problems getting this =
program to=20
run such as <SPAN style=3D"BACKGROUND: yellow; mso-highlight: =
yellow"><FONT=20
style=3D"BACKGROUND-COLOR: #ffffff"><A=20
href=3D"http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D491904=
&amp;#msg_491904">http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;got=
o=3D491904&amp;#msg_491904</FONT></A></SPAN>&nbsp;but=20
could not find a solution to the problem I have.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>I would appreciate any hints =
or=20
advice.</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal =
align=3Dleft><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal align=3Dleft><FONT =
size=3D2><FONT=20
face=3DArial>Basically, I defined an (ecore) metamodel, (xmi) source and =
target=20
models both conforming to the same metamodel.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Comparing these two models by =
hand using=20
Compare UI in Eclipse gives correct results. <SPAN=20
style=3D"mso-spacerun: yes">&nbsp;</SPAN>However, running EMF Compare =
standalone=20
program gives me an error: <SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt">Package with uri=20
'http://simpleMeta/2.0' not found. (file:/C:/tmp/sm1.xmi, 8,=20
18)</SPAN></FONT></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal =
align=3Dleft><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal align=3Dleft><FONT =
size=3D2=20
face=3DArial>This is the top part of my metamodel (in ecore):</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>&lt;?<SPAN style=3D"COLOR: black">xml</SPAN> =
version=3D"1.0"=20
encoding=3D"UTF-8"?&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>&lt;ecore:EPackage =
xmi:version=3D"2.0"<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>xmlns:xmi=3D"http://www.omg.org/XMI"=20
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"<o:p></o:p></FONT>=
</SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore"=20
name=3D"simpleMeta"<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>nsURI=3D"http://simpleMeta/2.0"=20
nsPrefix=3D"myPrefix"&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT =
face=3DArial><SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;eClassifiers =
xsi:type=3D"ecore:EClass"=20
name=3D"SimpleModel"&gt;</FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT size=3D2 =
face=3DArial>I have=20
used =91Create Dynamic Instance=92 option to create a source and a =
target models (in=20
xmi). <SPAN style=3D"mso-spacerun: yes">&nbsp;</SPAN>Basically, the =
source model=20
has a root class SimpleModel and 3 other classes : ClsA, ClsB and =
ClsC.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Each linked to SimpleModel =
through=20
containment relation.<SPAN style=3D"mso-spacerun: yes">&nbsp; =
</SPAN>Each class=20
also has a name attribute and ClsA, in addition, has a refAAttribute =
that=20
references ClsB. My target model is exactly the same with ClsC deleted=20
</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT size=3D2 =
face=3DArial>This is=20
my source model:</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial>&lt;?xml version=3D"1.0"=20
encoding=3D"ASCII"?&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial>&lt;myPrefix:SimpleModel =
xmi:version=3D"2.0"=20
<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial>xmlns:xmi=3D"http://www.omg.org/XMI"=20
<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT=20
face=3DArial>xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20
<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial>xmlns:myPrefix=3D"http://simpleMeta/2.0" =

<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT =
face=3DArial>xsi:schemaLocation=3D"http://simpleMeta/2.0=20
<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT=20
face=3DArial> E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ =
simpleMeta.ecore"=20
<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT =
face=3DArial>SMName=3D"simple1"&gt;<o:p></o:p></FONT ></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;aes CAName=3D"c1" =
refA=3D"//@bes.1"/&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;bes CBName=3D"b1"/&gt;<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;bes CBName=3D"b2"/&gt;<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;ces CCName=3D"c1"/&gt;<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT=20
face=3DArial>&lt;/myPrefix:SimpleModel&gt;<o:p></o:p ></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><o:p><FONT face=3DArial></FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><o:p><FONT face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT size=3D2 =
face=3DArial>This is=20
my target model:</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><o:p><FONT face=3DArial></FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial>&lt;?xml version=3D"1.0"=20
encoding=3D"ASCII"?&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial>&lt;myPrefix:SimpleModel =
xmi:version=3D"2.0"=20
xmlns:xmi=3D"http://www.omg.org/XMI"=20
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20
xmlns:myPrefix=3D"http://simpleMeta/2.0" =
xsi:schemaLocation=3D"http://simpleMeta/2.0=20
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
SMName=3D"simple1"&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;aes CAName=3D"c1" =
refA=3D"//@bes.1"/&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;bes CBName=3D"b1"/&gt;<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT face=3DArial><SPAN style=3D"mso-spacerun: yes">&nbsp; =

</SPAN>&lt;bes CBName=3D"b2"/&gt;<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><FONT=20
face=3DArial>&lt;/myPrefix:SimpleModel&gt;<o:p></o:p ></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT size=3D2 =
face=3DArial>This is=20
how I registered xmi resource factory in the program:</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"> resourceSet1.getResourceFactoryRegistry().getExtensionToFact oryMap(=
).put(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"xmi"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">, =
</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: =
10pt">new</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">=20
XMIResourceFactoryImpl());</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><o:p><FONT=20
face=3DArial></FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT =
face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"> resourceSet2.getResourceFactoryRegistry().getExtensionToFact oryMap(=
).put(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"xmi"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">, =
</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: =
10pt">new</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">=20
XMIResourceFactoryImpl());<o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">EcoreFactory=20
ecoreFactory =3D EcoreFactory.</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: =
10pt">eINSTANCE</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">;</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">EPackage=20
simpleMeta =3D ecoreFactory.createEPackage();</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">simpleMeta.setName(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"simpleMeta"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">);</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">simpleMeta.setNsURI(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"http://simpleMeta/2.0"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">);</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">Registry.</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: =
10pt">INSTANCE</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">.put(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"simpleMeta"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">,simpleMeta);</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: =
3"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN></SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">resourceSet1.getPackageRegistry().put(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"simpleMeta"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">,simpleMeta);</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"=20
class=3DMsoNormal><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">resourceSet2.getPackageRegistry().put(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: =
10pt">"simpleMeta"</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt">,simpleMeta);</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: 3"><FONT=20
face=3DArial> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
</FONT></SPAN></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT size=3D2 =
face=3DArial>In debug=20
mode, I can see that the error happens at this step : </FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><FONT =
face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: =
10pt">final</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> =
EObject=20
model1 =3D ModelUtils.load(</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: =
10pt">new</SPAN><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">=20
File(args[0]), resourceSet1);<o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Sorry for this beginner question.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Any help or advice is highly=20
appreciated.</FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><FONT size=3D2=20
face=3DArial></FONT></SPAN>&nbsp;</P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Thanks in advance,</FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P></DIV>
<DIV style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2 =

face=3DArial>&nbsp;</FONT></o:p></DIV>
<DIV>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><SPAN=20
style=3D"mso-spacerun: yes"><FONT size=3D2 =
face=3DArial></FONT></SPAN>&nbsp;</P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt" class=3DMsoNormal><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P></DIV></BODY></HTML >

------=_NextPart_000_0006_01CB0671.DEE594D0--
Re: [EMF Compare] Problem starting EMF Compare Standalone [message #538629 is a reply to message #538483] Tue, 08 June 2010 09:10 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000108060706070204020601
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

The usual problem ... with the usual solution :).

"Package with uri '*' not found" means that the package hasn't been
properly registered in the EPackage.Registry instance.

EPackage simpleMeta = ecoreFactory.createEPackage();
simpleMeta.setName("simpleMeta");
simpleMeta.setNsURI("http://simpleMeta/2.0");

Registry.INSTANCE.put("http://simpleMeta/2.0",simpleMeta); <= NsURI, not
name

the two resourceSet?.getPackageRegistry* are useless as you set it in
the global registry above.

Regards,

Laurent Goubet
Obeo

medo samh wrote:
> Hi,
>
>
>
> I am new to EMF and EMF Compare and would like to get started by running
> the standalone example. I have looked into previous posted messages
> about problems getting this program to run such as
> http://www.eclipse.org/forums/index.php?t=msg&goto=49190 4&#msg_491904
> < http://www.eclipse.org/forums/index.php?t=msg&goto=49190 4&#msg_491904> but
> could not find a solution to the problem I have. I would appreciate any
> hints or advice.
>
>
>
> Basically, I defined an (ecore) metamodel, (xmi) source and target
> models both conforming to the same metamodel. Comparing these two
> models by hand using Compare UI in Eclipse gives correct results.
> However, running EMF Compare standalone program gives me an error:
> Package with uri 'http://simpleMeta/2.0' not found.
> (file:/C:/tmp/sm1.xmi, 8, 18)
>
>
>
> This is the top part of my metamodel (in ecore):
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <ecore:EPackage xmi:version="2.0"
>
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="simpleMeta"
>
> nsURI="http://simpleMeta/2.0" nsPrefix="myPrefix">
>
> <eClassifiers xsi:type="ecore:EClass" name="SimpleModel">
>
>
>
> I have used
Re: [EMF Compare] Problem starting EMF Compare Standalone [message #538697 is a reply to message #538629] Tue, 08 June 2010 12:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mdsamh.yahoo.com

This is a multi-part message in MIME format.

------=_NextPart_000_0032_01CB0711.B05CC7A0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hi, =20
The =91usual=92 solution worked for me!. Many thanks for your help.

=20

But I got another beginner problem: =91ClassNotFoundException: Class =
'SimpleModel' is not found or is abstract=92

=20

I understand that I get this error because the load() operation is =
unable to locate 'SimpleModel' EClass identified in my simpleMeta =
(below):

=20

<?xml version=3D"1.0" encoding=3D"UTF-8"?>

<ecore:EPackage xmi:version=3D"2.0"

xmlns:xmi=3D"http://www.omg.org/XMI" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"

xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore" =
name=3D"simpleMeta"

nsURI=3D"http://simpleMeta/2.0" nsPrefix=3D"myPrefix">

<eClassifiers xsi:type=3D"ecore:EClass" name=3D"SimpleModel">

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"aes" =
upperBound=3D"-1" eType=3D"#//ClsA" containment=3D"true"/>

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"bes" =
upperBound=3D"-1" eType=3D"#//ClsB" containment=3D"true"/>

<eStructuralFeatures xsi:type=3D"ecore:EAttribute" name=3D"SMName" =
eType=3D"ecore:EDataType =
http://www.eclipse.org/emf/2002/Ecore#//EString"/>

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"ces" =
upperBound=3D"-1" eType=3D"#//ClsC" containment=3D"true"/>

</eClassifiers>

=85

=20


Clearly, in my source model (below), I do not see a node for =
=91SimpleModel=92:

=20

<?xml version=3D"1.0" encoding=3D"ASCII"?>

<myPrefix:SimpleModel xmi:version=3D"2.0"=20

xmlns:xmi=3D"http://www.omg.org/XMI"=20

xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20

xmlns:myPrefix=3D"http://simpleMeta/2.0"=20

xsi:schemaLocation=3D"http://simpleMeta/2.0=20

=
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20

SMName=3D"simple1">

<aes CAName=3D"c1" refA=3D"//@bes.1"/>

<bes CBName=3D"b1"/>

<bes CBName=3D"b2"/>

<ces CCName=3D"c1"/>

</myPrefix:SimpleModel>

=20

I was assuming that when using =91Create Dynamic Instance=92 in =
Sample Ecore Model Editor, I will get a well-formed model instance.

=20

Would greatly appreciate any hints how to fix this problem.

=20

Best regards,



"Laurent Goubet" <laurent.goubet@obeo.fr> wrote in message =
news:hul1da$ise$1@build.eclipse.org...

> Hi,
>=20
> The usual problem ... with the usual solution :).
>=20
> "Package with uri '*' not found" means that the package hasn't been=20
> properly registered in the EPackage.Registry instance.
>=20
> EPackage simpleMeta =3D ecoreFactory.createEPackage();
> simpleMeta.setName("simpleMeta");
> simpleMeta.setNsURI("http://simpleMeta/2.0");
>=20
> Registry.INSTANCE.put("http://simpleMeta/2.0",simpleMeta); <=3D NsURI, =
not=20
> name
>=20
> the two resourceSet?.getPackageRegistry* are useless as you set it in=20
> the global registry above.
>=20
> Regards,
>=20
> Laurent Goubet
> Obeo
>=20
> medo samh wrote:
>> Hi,
>>=20
>> =20
>>=20
>> I am new to EMF and EMF Compare and would like to get started by =
running=20
>> the standalone example. I have looked into previous posted messages=20
>> about problems getting this program to run such as=20
>> =
http://www.eclipse.org/forums/index.php?t=3Dmsg&goto=3D4 91904&#msg_491904=
=20
>> =
< http://www.eclipse.org/forums/index.php?t=3Dmsg&goto=3D4 91904&#msg_49190=
4> but=20
>> could not find a solution to the problem I have. I would appreciate =
any=20
>> hints or advice.
>>=20
>> =20
>>=20
>> Basically, I defined an (ecore) metamodel, (xmi) source and target=20
>> models both conforming to the same metamodel. Comparing these two=20
>> models by hand using Compare UI in Eclipse gives correct results.=20
>> However, running EMF Compare standalone program gives me an error:=20
>> Package with uri 'http://simpleMeta/2.0' not found.=20
>> (file:/C:/tmp/sm1.xmi, 8, 18)
>>=20
>> =20
>>=20
>> This is the top part of my metamodel (in ecore):
>>=20
>> =20
>>=20
>> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
>>=20
>> <ecore:EPackage xmi:version=3D"2.0"
>>=20
>> xmlns:xmi=3D"http://www.omg.org/XMI"=20
>> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
>>=20
>> xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore" =
name=3D"simpleMeta"
>>=20
>> nsURI=3D"http://simpleMeta/2.0" nsPrefix=3D"myPrefix">
>>=20
>> <eClassifiers xsi:type=3D"ecore:EClass" name=3D"SimpleModel">
>>=20
>> =20
>>=20
>> I have used =91Create Dynamic Instance=92 option to create a source =
and a=20
>> target models (in xmi). Basically, the source model has a root class =

>> SimpleModel and 3 other classes : ClsA, ClsB and ClsC. Each linked =
to=20
>> SimpleModel through containment relation. Each class also has a name =

>> attribute and ClsA, in addition, has a refAAttribute that references=20
>> ClsB. My target model is exactly the same with ClsC deleted
>>=20
>> =20
>>=20
>> This is my source model:
>>=20
>> <?xml version=3D"1.0" encoding=3D"ASCII"?>
>>=20
>> <myPrefix:SimpleModel xmi:version=3D"2.0"
>>=20
>> xmlns:xmi=3D"http://www.omg.org/XMI"
>>=20
>> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
>>=20
>> xmlns:myPrefix=3D"http://simpleMeta/2.0"
>>=20
>> xsi:schemaLocation=3D"http://simpleMeta/2.0
>>=20
>> =
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
>>=20
>>=20
>> SMName=3D"simple1">
>>=20
>> <aes CAName=3D"c1" refA=3D"//@bes.1"/>
>>=20
>> <bes CBName=3D"b1"/>
>>=20
>> <bes CBName=3D"b2"/>
>>=20
>> <ces CCName=3D"c1"/>
>>=20
>> </myPrefix:SimpleModel>
>>=20
>> =20
>>=20
>> This is my target model:
>>=20
>> <?xml version=3D"1.0" encoding=3D"ASCII"?>
>>=20
>> <myPrefix:SimpleModel xmi:version=3D"2.0"=20
>> xmlns:xmi=3D"http://www.omg.org/XMI"=20
>> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20
>> xmlns:myPrefix=3D"http://simpleMeta/2.0"=20
>> xsi:schemaLocation=3D"http://simpleMeta/2.0=20
>> =
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
>> SMName=3D"simple1">
>>=20
>> <aes CAName=3D"c1" refA=3D"//@bes.1"/>
>>=20
>> <bes CBName=3D"b1"/>
>>=20
>> <bes CBName=3D"b2"/>
>>=20
>> </myPrefix:SimpleModel>
>>=20
>> =20
>>=20
>> This is how I registered xmi resource factory in the program:
>>=20
>> =20
>>=20
>> =
resourceSet1.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
>> new XMIResourceFactoryImpl());
>>=20
>> =
resourceSet2.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
>> new XMIResourceFactoryImpl());
>>=20
>> =20
>>=20
>> EcoreFactory ecoreFactory =3D EcoreFactory.eINSTANCE;
>>=20
>> EPackage simpleMeta =3D ecoreFactory.createEPackage();
>>=20
>> simpleMeta.setName("simpleMeta");
>>=20
>> simpleMeta.setNsURI("http://simpleMeta/2.0");
>>=20
>> Registry.INSTANCE.put("simpleMeta",simpleMeta);
>>=20
>> =20
>>=20
>> resourceSet1.getPackageRegistry().put("simpleMeta",simpleMeta);
>>=20
>> resourceSet2.getPackageRegistry().put("simpleMeta",simpleMeta);
>>=20
>> =20
>>=20
>> In debug mode, I can see that the error happens at this step :
>>=20
>> =20
>>=20
>> final EObject model1 =3D ModelUtils.load(new File(args[0]), =
resourceSet1);
>>=20
>> =20
>>=20
>> Sorry for this beginner question. Any help or advice is highly =
appreciated.
>>=20
>> =20
>>=20
>> Thanks in advance,
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>=20
>
------=_NextPart_000_0032_01CB0711.B05CC7A0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18904">
<STYLE></STYLE>
</HEAD>
<BODY>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px" dir=3Dltr>
<DIV style=3D"MARGIN-RIGHT: 0px" dir=3Dltr><FONT size=3D2=20
face=3DArial>Hi,&nbsp;&nbsp;&nbsp; </FONT></DIV></BLOCKQUOTE>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px" dir=3Dltr>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px" dir=3Dltr>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT size=3D2 face=3DArial>The =91usual=92 solution =
worked for me!.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Many thanks for your=20
help.</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><?xml:namespace prefix =3D o ns =3D=20
"urn:schemas-microsoft-com:office:office" /><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT face=3DArial><FONT size=3D2>But I got another =
beginner problem:=20
=91<SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt">ClassNotFoundException:=20
Class 'SimpleModel' is not found or is=20
abstract=92<o:p></o:p></SPAN></FONT></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt">I understand =
that I get=20
this error because <TT>the</TT></SPAN><FONT size=3D2> <TT><SPAN=20
style=3D"FONT-SIZE: 10pt">load()</SPAN></TT> operation is unable to =
locate=20
<SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt">'SimpleModel'=20
</SPAN><SPAN class=3Ddocemphstrong>EClass</SPAN> identified in my =
simpleMeta=20
(below):</FONT></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><o:p><FONT size=3D2 =
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt">&lt;?<SPAN=20
style=3D"COLOR: black">xml</SPAN> version=3D"1.0"=20
encoding=3D"UTF-8"?&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt">&lt;ecore:EPackage=20
xmi:version=3D"2.0"<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>xmlns:xmi=3D"http://www.omg.org/XMI"=20
=
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"<o:p></o:p></SPAN>=
</P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore"=20
name=3D"simpleMeta"<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>nsURI=3D"http://simpleMeta/2.0"=20
nsPrefix=3D"myPrefix"&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eClassifiers xsi:type=3D"ecore:EClass"=20
name=3D"SimpleModel"&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EReference"=20
name=3D"<U><SPAN style=3D"COLOR: black">aes</SPAN></U>" =
upperBound=3D"-1"=20
eType=3D"#//ClsA" =
containment=3D"true"/&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EReference" =
name=3D"bes"=20
upperBound=3D"-1" eType=3D"#//ClsB"=20
containment=3D"true"/&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EAttribute" =
name=3D"SMName"=20
eType=3D"ecore:EDataType=20
=
http://www.eclipse.org/emf/2002/Ecore#//EString"/&gt;<o:p></o:p></FONT></=
SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EReference"=20
name=3D"<U><SPAN style=3D"COLOR: black">ces</SPAN></U>" =
upperBound=3D"-1"=20
eType=3D"#//ClsC" =
containment=3D"true"/&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt">&lt;/eClassifiers&gt;</SPAN><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: Arial; FONT-SIZE: =
10pt">=85</SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" dir=3Dltr class=3DMsoNormal =
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial></FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Clearly, in my source model (below), I do not see a =
node for=20
=91SimpleModel=92:<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>&lt;?xml version=3D"1.0"=20
encoding=3D"ASCII"?&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>&lt;myPrefix:SimpleModel xmi:version=3D"2.0" =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xmlns:xmi=3D"http://www.omg.org/XMI" =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =

<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xmlns:myPrefix=3D"http://simpleMeta/2.0" =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xsi:schemaLocation=3D"http://simpleMeta/2.0 =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
=
lang=3DEN-GB> E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ =
simpleMeta.ecore"=20
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>SMName=3D"simple1"&gt;<o:p></o:p></SPAN ></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;aes =
CAName=3D"c1"=20
refA=3D"//@bes.1"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;bes =

CBName=3D"b1"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;bes =

CBName=3D"b2"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;ces =

CCName=3D"c1"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>&lt;/myPrefix:SimpleModel&gt;<o:p></o:p ></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>I was assuming that when using =91Create Dynamic =
Instance=92 in=20
Sample Ecore Model Editor, I will get a well-formed model=20
instance.<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Would greatly appreciate any hints how to fix this=20
problem.<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Best regards,</FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial><o:p></o:p></FONT></SPAN>&nbsp;</P></BLOCKQUOTE >
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" class=3DMsoNormal =
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN><FONT size=3D2 =
face=3DArial>"Laurent Goubet"=20
&lt;</FONT><A href=3D"mailto:laurent.goubet@obeo.fr"><FONT size=3D2=20
face=3DArial>laurent.goubet@obeo.fr</FONT></A><FONT size=3D2 =
face=3DArial>&gt; wrote=20
in message </FONT><A =
href=3D"news:hul1da$ise$1@build.eclipse.org"><FONT size=3D2=20
face=3DArial>news:hul1da$ise$1@build.eclipse.org</FONT></A><FONT =
size=3D2=20
face=3DArial>...</FONT></P></BLOCKQUOTE><FONT size=3D2 =
face=3DArial>&gt; Hi,<BR>&gt;=20
<BR>&gt; The usual problem ... with the usual solution :).<BR>&gt; =
<BR>&gt;=20
"Package with uri '*' not found" means that the package hasn't been =
<BR>&gt;=20
properly registered in the EPackage.Registry instance.<BR>&gt; <BR>&gt; =
EPackage=20
simpleMeta =3D ecoreFactory.createEPackage();<BR>&gt;=20
simpleMeta.setName("simpleMeta");<BR>&gt; simpleMeta.setNsURI("</FONT><A =

href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>");<BR>&gt;=20
<BR>&gt; Registry.INSTANCE.put("</FONT><A=20
href=3D'http://simpleMeta/2.0",simpleMeta'><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0",simpleMeta</FONT></A><FONT size=3D2=20
face=3DArial>); &lt;=3D NsURI, not <BR>&gt; name<BR>&gt; <BR>&gt; the =
two=20
resourceSet?.getPackageRegistry* are useless as you set it in <BR>&gt; =
the=20
global registry above.<BR>&gt; <BR>&gt; Regards,<BR>&gt; <BR>&gt; =
Laurent=20
Goubet<BR>&gt; Obeo<BR>&gt; <BR>&gt; medo samh wrote:<BR>&gt;&gt;=20
Hi,<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; I am new to =
EMF and=20
EMF Compare and would like to get started by running <BR>&gt;&gt; the =
standalone=20
example.&nbsp; I have looked into previous posted messages <BR>&gt;&gt; =
about=20
problems getting this program to run such as <BR>&gt;&gt; </FONT><A=20
href=3D"http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D491904=
&amp;#msg_491904"><FONT=20
size=3D2=20
face=3DArial>http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D4=
91904&amp;#msg_491904</FONT></A><FONT=20
size=3D2 face=3DArial> <BR>&gt;&gt; &lt;</FONT><A=20
href=3D"http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D491904=
&amp;#msg_491904"><FONT=20
size=3D2=20
face=3DArial>http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D4=
91904&amp;#msg_491904</FONT></A><FONT=20
size=3D2 face=3DArial>&gt; but <BR>&gt;&gt; could not find a solution to =
the problem=20
I have.&nbsp; I would appreciate any <BR>&gt;&gt; hints or =
advice.<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; Basically, I defined an =
(ecore)=20
metamodel, (xmi) source and target <BR>&gt;&gt; models both conforming =
to the=20
same metamodel.&nbsp; Comparing these two <BR>&gt;&gt; models by hand =
using=20
Compare UI in Eclipse gives correct results. <BR>&gt;&gt;&nbsp; However, =
running=20
EMF Compare standalone program gives me an error: <BR>&gt;&gt; Package =
with uri=20
'http://simpleMeta/2.0' not found. <BR>&gt;&gt; (file:/C:/tmp/sm1.xmi, =
8,=20
18)<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; This is the =
top=20
part of my metamodel (in ecore):<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; =
<BR>&gt;&gt;=20
<BR>&gt;&gt; &lt;?xml version=3D"1.0" =
encoding=3D"UTF-8"?&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt; &lt;ecore:EPackage xmi:version=3D"2.0"<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:xmi=3D"</FONT><A=20
href=3D"http://www.omg.org/XMI"><FONT size=3D2=20
face=3DArial>http://www.omg.org/XMI</FONT></A><FONT size=3D2 =
face=3DArial>"=20
<BR>&gt;&gt; xmlns:xsi=3D"</FONT><A=20
href=3D"http://www.w3.org/2001/XMLSchema-instance"><FONT size=3D2=20
face=3DArial>http://www.w3.org/2001/XMLSchema-instance</FONT></A><FONT =
size=3D2=20
face=3DArial>"<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
xmlns:ecore=3D"</FONT><A =
href=3D"http://www.eclipse.org/emf/2002/Ecore"><FONT size=3D2=20
face=3DArial>http://www.eclipse.org/emf/2002/Ecore</FONT></A><FONT =
size=3D2=20
face=3DArial>" name=3D"simpleMeta"<BR>&gt;&gt; =
<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
nsURI=3D"</FONT><A href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>"=20
nsPrefix=3D"myPrefix"&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; =
&lt;eClassifiers=20
xsi:type=3D"ecore:EClass" name=3D"SimpleModel"&gt;<BR>&gt;&gt; =
<BR>&gt;&gt;&nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; I have used =91Create Dynamic Instance=92 =
option to create=20
a source and a <BR>&gt;&gt; target models (in xmi).&nbsp; Basically, the =
source=20
model has a root class <BR>&gt;&gt; SimpleModel and 3 other classes : =
ClsA, ClsB=20
and ClsC.&nbsp; Each linked to <BR>&gt;&gt; SimpleModel through =
containment=20
relation.&nbsp; Each class also has a name <BR>&gt;&gt; attribute and =
ClsA, in=20
addition, has a refAAttribute that references <BR>&gt;&gt; ClsB. My =
target model=20
is exactly the same with ClsC deleted<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; This is my source model:<BR>&gt;&gt; =
<BR>&gt;&gt;=20
&lt;?xml version=3D"1.0" encoding=3D"ASCII"?&gt;<BR>&gt;&gt; =
<BR>&gt;&gt;=20
&lt;myPrefix:SimpleModel xmi:version=3D"2.0"<BR>&gt;&gt; <BR>&gt;&gt;=20
xmlns:xmi=3D"</FONT><A href=3D"http://www.omg.org/XMI"><FONT size=3D2=20
face=3DArial>http://www.omg.org/XMI</FONT></A><FONT size=3D2=20
face=3DArial>"<BR>&gt;&gt; <BR>&gt;&gt; xmlns:xsi=3D"</FONT><A=20
href=3D"http://www.w3.org/2001/XMLSchema-instance"><FONT size=3D2=20
face=3DArial>http://www.w3.org/2001/XMLSchema-instance</FONT></A><FONT =
size=3D2=20
face=3DArial>"<BR>&gt;&gt; <BR>&gt;&gt; xmlns:myPrefix=3D"</FONT><A=20
href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>"<BR>&gt;&gt;=20
<BR>&gt;&gt; xsi:schemaLocation=3D"</FONT><A =
href=3D"http://simpleMeta/2.0"><FONT=20
size=3D2 face=3DArial>http://simpleMeta/2.0</FONT></A><BR><FONT size=3D2 =

face=3DArial>&gt;&gt; <BR>&gt;&gt;=20
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
<BR>&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt; =
SMName=3D"simple1"&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;aes CAName=3D"c1" refA=3D"</FONT><A><FONT =
size=3D2=20
face=3DArial>//@bes.1"/</FONT></A><FONT size=3D2 =
face=3DArial>&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;bes CBName=3D"b1"/&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;bes CBName=3D"b2"/&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;ces CCName=3D"c1"/&gt;<BR>&gt;&gt; =
<BR>&gt;&gt;=20
&lt;/myPrefix:SimpleModel&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; =
<BR>&gt;&gt;=20
<BR>&gt;&gt; This is my target model:<BR>&gt;&gt; <BR>&gt;&gt; &lt;?xml=20
version=3D"1.0" encoding=3D"ASCII"?&gt;<BR>&gt;&gt; <BR>&gt;&gt;=20
&lt;myPrefix:SimpleModel xmi:version=3D"2.0" <BR>&gt;&gt; =
xmlns:xmi=3D"</FONT><A=20
href=3D"http://www.omg.org/XMI"><FONT size=3D2=20
face=3DArial>http://www.omg.org/XMI</FONT></A><FONT size=3D2 =
face=3DArial>"=20
<BR>&gt;&gt; xmlns:xsi=3D"</FONT><A=20
href=3D"http://www.w3.org/2001/XMLSchema-instance"><FONT size=3D2=20
face=3DArial>http://www.w3.org/2001/XMLSchema-instance</FONT></A><FONT =
size=3D2=20
face=3DArial>" <BR>&gt;&gt; xmlns:myPrefix=3D"</FONT><A=20
href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>"=20
<BR>&gt;&gt; xsi:schemaLocation=3D"</FONT><A =
href=3D"http://simpleMeta/2.0"><FONT=20
size=3D2 face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>=20
<BR>&gt;&gt;=20
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
<BR>&gt;&gt; SMName=3D"simple1"&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; =
&lt;aes=20
CAName=3D"c1" refA=3D"</FONT><A><FONT size=3D2 =
face=3DArial>//@bes.1"/</FONT></A><FONT=20
size=3D2 face=3DArial>&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; &lt;bes=20
CBName=3D"b1"/&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; &lt;bes=20
CBName=3D"b2"/&gt;<BR>&gt;&gt; <BR>&gt;&gt;=20
&lt;/myPrefix:SimpleModel&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; =
<BR>&gt;&gt;=20
<BR>&gt;&gt; This is how I registered xmi resource factory in the=20
program:<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;=20
resourceSet1.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
<BR>&gt;&gt; new XMIResourceFactoryImpl());<BR>&gt;&gt; <BR>&gt;&gt;=20
resourceSet2.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
<BR>&gt;&gt; new XMIResourceFactoryImpl());<BR>&gt;&gt; =
<BR>&gt;&gt;&nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; EcoreFactory ecoreFactory =3D=20
EcoreFactory.eINSTANCE;<BR>&gt;&gt; <BR>&gt;&gt; EPackage simpleMeta =3D =

ecoreFactory.createEPackage();<BR>&gt;&gt; <BR>&gt;&gt;=20
simpleMeta.setName("simpleMeta");<BR>&gt;&gt; <BR>&gt;&gt;=20
simpleMeta.setNsURI("</FONT><A href=3D"http://simpleMeta/2.0"><FONT =
size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2=20
face=3DArial>");<BR>&gt;&gt; <BR>&gt;&gt;=20
Registry.INSTANCE.put("simpleMeta",simpleMeta);<BR>&gt;&gt;=20
<BR> &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt;=20
resourceSet1.getPackageRegistry().put("simpleMeta",simpleMeta); <BR>&gt;&g=
t;=20
<BR>&gt;&gt;=20
resourceSet2.getPackageRegistry().put("simpleMeta",simpleMeta); <BR>&gt;&g=
t;=20
<BR> &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; In debug mode, I can see that the error =
happens at=20
this step :<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; =
final=20
EObject model1 =3D ModelUtils.load(new File(args[0]), =
resourceSet1);<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; Sorry for this beginner=20
question.&nbsp; Any help or advice is highly appreciated.<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; Thanks in =
advance,<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt; =

<BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_0032_01CB0711.B05CC7A0--
Re: [EMF Compare] Problem starting EMF Compare Standalone [message #538744 is a reply to message #538697] Tue, 08 June 2010 14:02 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090407060402070009090603
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

Okay, this second one doesn't seem 'usual' ^^.

The problem you get is when loading a dynamic instance from a standalone
application ... and I don't know if this is allowed by EMF. Could you
ask the same on the EMF newsgroup (as a side note, EMF Compare questions
should be asked on the EMF newsgroup too :p) so that Ed can take a look?

Laurent Goubet
Obeo

medo samh wrote:
>
> Hi,
>
> The
Re: [EMF Compare] Problem starting EMF Compare Standalone [message #622988 is a reply to message #538483] Tue, 08 June 2010 09:10 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000108060706070204020601
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

The usual problem ... with the usual solution :).

"Package with uri '*' not found" means that the package hasn't been
properly registered in the EPackage.Registry instance.

EPackage simpleMeta = ecoreFactory.createEPackage();
simpleMeta.setName("simpleMeta");
simpleMeta.setNsURI("http://simpleMeta/2.0");

Registry.INSTANCE.put("http://simpleMeta/2.0",simpleMeta); <= NsURI, not
name

the two resourceSet?.getPackageRegistry* are useless as you set it in
the global registry above.

Regards,

Laurent Goubet
Obeo

medo samh wrote:
> Hi,
>
>
>
> I am new to EMF and EMF Compare and would like to get started by running
> the standalone example. I have looked into previous posted messages
> about problems getting this program to run such as
> http://www.eclipse.org/forums/index.php?t=msg&goto=49190 4&#msg_491904
> < http://www.eclipse.org/forums/index.php?t=msg&goto=49190 4&#msg_491904> but
> could not find a solution to the problem I have. I would appreciate any
> hints or advice.
>
>
>
> Basically, I defined an (ecore) metamodel, (xmi) source and target
> models both conforming to the same metamodel. Comparing these two
> models by hand using Compare UI in Eclipse gives correct results.
> However, running EMF Compare standalone program gives me an error:
> Package with uri 'http://simpleMeta/2.0' not found.
> (file:/C:/tmp/sm1.xmi, 8, 18)
>
>
>
> This is the top part of my metamodel (in ecore):
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <ecore:EPackage xmi:version="2.0"
>
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="simpleMeta"
>
> nsURI="http://simpleMeta/2.0" nsPrefix="myPrefix">
>
> <eClassifiers xsi:type="ecore:EClass" name="SimpleModel">
>
>
>
> I have used
Re: [EMF Compare] Problem starting EMF Compare Standalone [message #622989 is a reply to message #538629] Tue, 08 June 2010 12:51 Go to previous message
Eclipse UserFriend
Originally posted by: mdsamh.yahoo.com

This is a multi-part message in MIME format.

------=_NextPart_000_0032_01CB0711.B05CC7A0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hi, =20
The =91usual=92 solution worked for me!. Many thanks for your help.

=20

But I got another beginner problem: =91ClassNotFoundException: Class =
'SimpleModel' is not found or is abstract=92

=20

I understand that I get this error because the load() operation is =
unable to locate 'SimpleModel' EClass identified in my simpleMeta =
(below):

=20

<?xml version=3D"1.0" encoding=3D"UTF-8"?>

<ecore:EPackage xmi:version=3D"2.0"

xmlns:xmi=3D"http://www.omg.org/XMI" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"

xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore" =
name=3D"simpleMeta"

nsURI=3D"http://simpleMeta/2.0" nsPrefix=3D"myPrefix">

<eClassifiers xsi:type=3D"ecore:EClass" name=3D"SimpleModel">

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"aes" =
upperBound=3D"-1" eType=3D"#//ClsA" containment=3D"true"/>

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"bes" =
upperBound=3D"-1" eType=3D"#//ClsB" containment=3D"true"/>

<eStructuralFeatures xsi:type=3D"ecore:EAttribute" name=3D"SMName" =
eType=3D"ecore:EDataType =
http://www.eclipse.org/emf/2002/Ecore#//EString"/>

<eStructuralFeatures xsi:type=3D"ecore:EReference" name=3D"ces" =
upperBound=3D"-1" eType=3D"#//ClsC" containment=3D"true"/>

</eClassifiers>

=85

=20


Clearly, in my source model (below), I do not see a node for =
=91SimpleModel=92:

=20

<?xml version=3D"1.0" encoding=3D"ASCII"?>

<myPrefix:SimpleModel xmi:version=3D"2.0"=20

xmlns:xmi=3D"http://www.omg.org/XMI"=20

xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20

xmlns:myPrefix=3D"http://simpleMeta/2.0"=20

xsi:schemaLocation=3D"http://simpleMeta/2.0=20

=
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20

SMName=3D"simple1">

<aes CAName=3D"c1" refA=3D"//@bes.1"/>

<bes CBName=3D"b1"/>

<bes CBName=3D"b2"/>

<ces CCName=3D"c1"/>

</myPrefix:SimpleModel>

=20

I was assuming that when using =91Create Dynamic Instance=92 in =
Sample Ecore Model Editor, I will get a well-formed model instance.

=20

Would greatly appreciate any hints how to fix this problem.

=20

Best regards,



"Laurent Goubet" <laurent.goubet@obeo.fr> wrote in message =
news:hul1da$ise$1@build.eclipse.org...

> Hi,
>=20
> The usual problem ... with the usual solution :).
>=20
> "Package with uri '*' not found" means that the package hasn't been=20
> properly registered in the EPackage.Registry instance.
>=20
> EPackage simpleMeta =3D ecoreFactory.createEPackage();
> simpleMeta.setName("simpleMeta");
> simpleMeta.setNsURI("http://simpleMeta/2.0");
>=20
> Registry.INSTANCE.put("http://simpleMeta/2.0",simpleMeta); <=3D NsURI, =
not=20
> name
>=20
> the two resourceSet?.getPackageRegistry* are useless as you set it in=20
> the global registry above.
>=20
> Regards,
>=20
> Laurent Goubet
> Obeo
>=20
> medo samh wrote:
>> Hi,
>>=20
>> =20
>>=20
>> I am new to EMF and EMF Compare and would like to get started by =
running=20
>> the standalone example. I have looked into previous posted messages=20
>> about problems getting this program to run such as=20
>> =
http://www.eclipse.org/forums/index.php?t=3Dmsg&goto=3D4 91904&#msg_491904=
=20
>> =
< http://www.eclipse.org/forums/index.php?t=3Dmsg&goto=3D4 91904&#msg_49190=
4> but=20
>> could not find a solution to the problem I have. I would appreciate =
any=20
>> hints or advice.
>>=20
>> =20
>>=20
>> Basically, I defined an (ecore) metamodel, (xmi) source and target=20
>> models both conforming to the same metamodel. Comparing these two=20
>> models by hand using Compare UI in Eclipse gives correct results.=20
>> However, running EMF Compare standalone program gives me an error:=20
>> Package with uri 'http://simpleMeta/2.0' not found.=20
>> (file:/C:/tmp/sm1.xmi, 8, 18)
>>=20
>> =20
>>=20
>> This is the top part of my metamodel (in ecore):
>>=20
>> =20
>>=20
>> <?xml version=3D"1.0" encoding=3D"UTF-8"?>
>>=20
>> <ecore:EPackage xmi:version=3D"2.0"
>>=20
>> xmlns:xmi=3D"http://www.omg.org/XMI"=20
>> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
>>=20
>> xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore" =
name=3D"simpleMeta"
>>=20
>> nsURI=3D"http://simpleMeta/2.0" nsPrefix=3D"myPrefix">
>>=20
>> <eClassifiers xsi:type=3D"ecore:EClass" name=3D"SimpleModel">
>>=20
>> =20
>>=20
>> I have used =91Create Dynamic Instance=92 option to create a source =
and a=20
>> target models (in xmi). Basically, the source model has a root class =

>> SimpleModel and 3 other classes : ClsA, ClsB and ClsC. Each linked =
to=20
>> SimpleModel through containment relation. Each class also has a name =

>> attribute and ClsA, in addition, has a refAAttribute that references=20
>> ClsB. My target model is exactly the same with ClsC deleted
>>=20
>> =20
>>=20
>> This is my source model:
>>=20
>> <?xml version=3D"1.0" encoding=3D"ASCII"?>
>>=20
>> <myPrefix:SimpleModel xmi:version=3D"2.0"
>>=20
>> xmlns:xmi=3D"http://www.omg.org/XMI"
>>=20
>> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
>>=20
>> xmlns:myPrefix=3D"http://simpleMeta/2.0"
>>=20
>> xsi:schemaLocation=3D"http://simpleMeta/2.0
>>=20
>> =
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
>>=20
>>=20
>> SMName=3D"simple1">
>>=20
>> <aes CAName=3D"c1" refA=3D"//@bes.1"/>
>>=20
>> <bes CBName=3D"b1"/>
>>=20
>> <bes CBName=3D"b2"/>
>>=20
>> <ces CCName=3D"c1"/>
>>=20
>> </myPrefix:SimpleModel>
>>=20
>> =20
>>=20
>> This is my target model:
>>=20
>> <?xml version=3D"1.0" encoding=3D"ASCII"?>
>>=20
>> <myPrefix:SimpleModel xmi:version=3D"2.0"=20
>> xmlns:xmi=3D"http://www.omg.org/XMI"=20
>> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20
>> xmlns:myPrefix=3D"http://simpleMeta/2.0"=20
>> xsi:schemaLocation=3D"http://simpleMeta/2.0=20
>> =
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
>> SMName=3D"simple1">
>>=20
>> <aes CAName=3D"c1" refA=3D"//@bes.1"/>
>>=20
>> <bes CBName=3D"b1"/>
>>=20
>> <bes CBName=3D"b2"/>
>>=20
>> </myPrefix:SimpleModel>
>>=20
>> =20
>>=20
>> This is how I registered xmi resource factory in the program:
>>=20
>> =20
>>=20
>> =
resourceSet1.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
>> new XMIResourceFactoryImpl());
>>=20
>> =
resourceSet2.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
>> new XMIResourceFactoryImpl());
>>=20
>> =20
>>=20
>> EcoreFactory ecoreFactory =3D EcoreFactory.eINSTANCE;
>>=20
>> EPackage simpleMeta =3D ecoreFactory.createEPackage();
>>=20
>> simpleMeta.setName("simpleMeta");
>>=20
>> simpleMeta.setNsURI("http://simpleMeta/2.0");
>>=20
>> Registry.INSTANCE.put("simpleMeta",simpleMeta);
>>=20
>> =20
>>=20
>> resourceSet1.getPackageRegistry().put("simpleMeta",simpleMeta);
>>=20
>> resourceSet2.getPackageRegistry().put("simpleMeta",simpleMeta);
>>=20
>> =20
>>=20
>> In debug mode, I can see that the error happens at this step :
>>=20
>> =20
>>=20
>> final EObject model1 =3D ModelUtils.load(new File(args[0]), =
resourceSet1);
>>=20
>> =20
>>=20
>> Sorry for this beginner question. Any help or advice is highly =
appreciated.
>>=20
>> =20
>>=20
>> Thanks in advance,
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>> =20
>>=20
>=20
>
------=_NextPart_000_0032_01CB0711.B05CC7A0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18904">
<STYLE></STYLE>
</HEAD>
<BODY>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px" dir=3Dltr>
<DIV style=3D"MARGIN-RIGHT: 0px" dir=3Dltr><FONT size=3D2=20
face=3DArial>Hi,&nbsp;&nbsp;&nbsp; </FONT></DIV></BLOCKQUOTE>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px" dir=3Dltr>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px" dir=3Dltr>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT size=3D2 face=3DArial>The =91usual=92 solution =
worked for me!.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Many thanks for your=20
help.</FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><?xml:namespace prefix =3D o ns =3D=20
"urn:schemas-microsoft-com:office:office" /><o:p><FONT size=3D2=20
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT face=3DArial><FONT size=3D2>But I got another =
beginner problem:=20
=91<SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt">ClassNotFoundException:=20
Class 'SimpleModel' is not found or is=20
abstract=92<o:p></o:p></SPAN></FONT></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt">I understand =
that I get=20
this error because <TT>the</TT></SPAN><FONT size=3D2> <TT><SPAN=20
style=3D"FONT-SIZE: 10pt">load()</SPAN></TT> operation is unable to =
locate=20
<SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt">'SimpleModel'=20
</SPAN><SPAN class=3Ddocemphstrong>EClass</SPAN> identified in my =
simpleMeta=20
(below):</FONT></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><o:p><FONT size=3D2 =
face=3DArial>&nbsp;</FONT></o:p></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt">&lt;?<SPAN=20
style=3D"COLOR: black">xml</SPAN> version=3D"1.0"=20
encoding=3D"UTF-8"?&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt">&lt;ecore:EPackage=20
xmi:version=3D"2.0"<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>xmlns:xmi=3D"http://www.omg.org/XMI"=20
=
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"<o:p></o:p></SPAN>=
</P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>xmlns:ecore=3D"http://www.eclipse.org/emf/2002/Ecore"=20
name=3D"simpleMeta"<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt"><SPAN=20
style=3D"mso-spacerun: yes">&nbsp;&nbsp;&nbsp;=20
</SPAN>nsURI=3D"http://simpleMeta/2.0"=20
nsPrefix=3D"myPrefix"&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eClassifiers xsi:type=3D"ecore:EClass"=20
name=3D"SimpleModel"&gt;<o:p></o:p></FONT></SPAN></P >
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EReference"=20
name=3D"<U><SPAN style=3D"COLOR: black">aes</SPAN></U>" =
upperBound=3D"-1"=20
eType=3D"#//ClsA" =
containment=3D"true"/&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EReference" =
name=3D"bes"=20
upperBound=3D"-1" eType=3D"#//ClsB"=20
containment=3D"true"/&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EAttribute" =
name=3D"SMName"=20
eType=3D"ecore:EDataType=20
=
http://www.eclipse.org/emf/2002/Ecore#//EString"/&gt;<o:p></o:p></FONT></=
SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><FONT=20
face=3DArial>&lt;eStructuralFeatures xsi:type=3D"ecore:EReference"=20
name=3D"<U><SPAN style=3D"COLOR: black">ces</SPAN></U>" =
upperBound=3D"-1"=20
eType=3D"#//ClsC" =
containment=3D"true"/&gt;<o:p></o:p></FONT></SPAN> </P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><FONT face=3DArial><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt">&lt;/eClassifiers&gt;</SPAN><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: =
10pt"><o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN: 0in 0in 0pt -27pt" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: Arial; FONT-SIZE: =
10pt">=85</SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt" dir=3Dltr class=3DMsoNormal =
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial></FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Clearly, in my source model (below), I do not see a =
node for=20
=91SimpleModel=92:<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>&lt;?xml version=3D"1.0"=20
encoding=3D"ASCII"?&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>&lt;myPrefix:SimpleModel xmi:version=3D"2.0" =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xmlns:xmi=3D"http://www.omg.org/XMI" =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =

<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xmlns:myPrefix=3D"http://simpleMeta/2.0" =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>xsi:schemaLocation=3D"http://simpleMeta/2.0 =
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
=
lang=3DEN-GB> E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ =
simpleMeta.ecore"=20
<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>SMName=3D"simple1"&gt;<o:p></o:p></SPAN ></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;aes =
CAName=3D"c1"=20
refA=3D"//@bes.1"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;bes =

CBName=3D"b1"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;bes =

CBName=3D"b2"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB><SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>&lt;ces =

CCName=3D"c1"/&gt;<o:p></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in; mso-layout-grid-align: none" =
dir=3Dltr=20
class=3DMsoNormal align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt; mso-ansi-language: =
EN-GB"=20
lang=3DEN-GB>&lt;/myPrefix:SimpleModel&gt;<o:p></o:p ></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>I was assuming that when using =91Create Dynamic =
Instance=92 in=20
Sample Ecore Model Editor, I will get a well-formed model=20
instance.<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Would greatly appreciate any hints how to fix this=20
problem.<o:p></o:p></FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial>Best regards,</FONT></SPAN></P>
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" dir=3Dltr class=3DMsoNormal=20
align=3Dleft><SPAN style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: =
10pt"><FONT=20
face=3DArial><o:p></o:p></FONT></SPAN>&nbsp;</P></BLOCKQUOTE >
<P style=3D"MARGIN: 0in 0in 0pt -0.5in" class=3DMsoNormal =
align=3Dleft><SPAN=20
style=3D"FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><o:p><FONT=20
face=3DArial>&nbsp;</FONT></o:p></SPAN><FONT size=3D2 =
face=3DArial>"Laurent Goubet"=20
&lt;</FONT><A href=3D"mailto:laurent.goubet@obeo.fr"><FONT size=3D2=20
face=3DArial>laurent.goubet@obeo.fr</FONT></A><FONT size=3D2 =
face=3DArial>&gt; wrote=20
in message </FONT><A =
href=3D"news:hul1da$ise$1@build.eclipse.org"><FONT size=3D2=20
face=3DArial>news:hul1da$ise$1@build.eclipse.org</FONT></A><FONT =
size=3D2=20
face=3DArial>...</FONT></P></BLOCKQUOTE><FONT size=3D2 =
face=3DArial>&gt; Hi,<BR>&gt;=20
<BR>&gt; The usual problem ... with the usual solution :).<BR>&gt; =
<BR>&gt;=20
"Package with uri '*' not found" means that the package hasn't been =
<BR>&gt;=20
properly registered in the EPackage.Registry instance.<BR>&gt; <BR>&gt; =
EPackage=20
simpleMeta =3D ecoreFactory.createEPackage();<BR>&gt;=20
simpleMeta.setName("simpleMeta");<BR>&gt; simpleMeta.setNsURI("</FONT><A =

href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>");<BR>&gt;=20
<BR>&gt; Registry.INSTANCE.put("</FONT><A=20
href=3D'http://simpleMeta/2.0",simpleMeta'><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0",simpleMeta</FONT></A><FONT size=3D2=20
face=3DArial>); &lt;=3D NsURI, not <BR>&gt; name<BR>&gt; <BR>&gt; the =
two=20
resourceSet?.getPackageRegistry* are useless as you set it in <BR>&gt; =
the=20
global registry above.<BR>&gt; <BR>&gt; Regards,<BR>&gt; <BR>&gt; =
Laurent=20
Goubet<BR>&gt; Obeo<BR>&gt; <BR>&gt; medo samh wrote:<BR>&gt;&gt;=20
Hi,<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; I am new to =
EMF and=20
EMF Compare and would like to get started by running <BR>&gt;&gt; the =
standalone=20
example.&nbsp; I have looked into previous posted messages <BR>&gt;&gt; =
about=20
problems getting this program to run such as <BR>&gt;&gt; </FONT><A=20
href=3D"http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D491904=
&amp;#msg_491904"><FONT=20
size=3D2=20
face=3DArial>http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D4=
91904&amp;#msg_491904</FONT></A><FONT=20
size=3D2 face=3DArial> <BR>&gt;&gt; &lt;</FONT><A=20
href=3D"http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D491904=
&amp;#msg_491904"><FONT=20
size=3D2=20
face=3DArial>http://www.eclipse.org/forums/index.php?t=3Dmsg&amp;goto=3D4=
91904&amp;#msg_491904</FONT></A><FONT=20
size=3D2 face=3DArial>&gt; but <BR>&gt;&gt; could not find a solution to =
the problem=20
I have.&nbsp; I would appreciate any <BR>&gt;&gt; hints or =
advice.<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; Basically, I defined an =
(ecore)=20
metamodel, (xmi) source and target <BR>&gt;&gt; models both conforming =
to the=20
same metamodel.&nbsp; Comparing these two <BR>&gt;&gt; models by hand =
using=20
Compare UI in Eclipse gives correct results. <BR>&gt;&gt;&nbsp; However, =
running=20
EMF Compare standalone program gives me an error: <BR>&gt;&gt; Package =
with uri=20
'http://simpleMeta/2.0' not found. <BR>&gt;&gt; (file:/C:/tmp/sm1.xmi, =
8,=20
18)<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; This is the =
top=20
part of my metamodel (in ecore):<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; =
<BR>&gt;&gt;=20
<BR>&gt;&gt; &lt;?xml version=3D"1.0" =
encoding=3D"UTF-8"?&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt; &lt;ecore:EPackage xmi:version=3D"2.0"<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:xmi=3D"</FONT><A=20
href=3D"http://www.omg.org/XMI"><FONT size=3D2=20
face=3DArial>http://www.omg.org/XMI</FONT></A><FONT size=3D2 =
face=3DArial>"=20
<BR>&gt;&gt; xmlns:xsi=3D"</FONT><A=20
href=3D"http://www.w3.org/2001/XMLSchema-instance"><FONT size=3D2=20
face=3DArial>http://www.w3.org/2001/XMLSchema-instance</FONT></A><FONT =
size=3D2=20
face=3DArial>"<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
xmlns:ecore=3D"</FONT><A =
href=3D"http://www.eclipse.org/emf/2002/Ecore"><FONT size=3D2=20
face=3DArial>http://www.eclipse.org/emf/2002/Ecore</FONT></A><FONT =
size=3D2=20
face=3DArial>" name=3D"simpleMeta"<BR>&gt;&gt; =
<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;=20
nsURI=3D"</FONT><A href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>"=20
nsPrefix=3D"myPrefix"&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; =
&lt;eClassifiers=20
xsi:type=3D"ecore:EClass" name=3D"SimpleModel"&gt;<BR>&gt;&gt; =
<BR>&gt;&gt;&nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; I have used =91Create Dynamic Instance=92 =
option to create=20
a source and a <BR>&gt;&gt; target models (in xmi).&nbsp; Basically, the =
source=20
model has a root class <BR>&gt;&gt; SimpleModel and 3 other classes : =
ClsA, ClsB=20
and ClsC.&nbsp; Each linked to <BR>&gt;&gt; SimpleModel through =
containment=20
relation.&nbsp; Each class also has a name <BR>&gt;&gt; attribute and =
ClsA, in=20
addition, has a refAAttribute that references <BR>&gt;&gt; ClsB. My =
target model=20
is exactly the same with ClsC deleted<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; This is my source model:<BR>&gt;&gt; =
<BR>&gt;&gt;=20
&lt;?xml version=3D"1.0" encoding=3D"ASCII"?&gt;<BR>&gt;&gt; =
<BR>&gt;&gt;=20
&lt;myPrefix:SimpleModel xmi:version=3D"2.0"<BR>&gt;&gt; <BR>&gt;&gt;=20
xmlns:xmi=3D"</FONT><A href=3D"http://www.omg.org/XMI"><FONT size=3D2=20
face=3DArial>http://www.omg.org/XMI</FONT></A><FONT size=3D2=20
face=3DArial>"<BR>&gt;&gt; <BR>&gt;&gt; xmlns:xsi=3D"</FONT><A=20
href=3D"http://www.w3.org/2001/XMLSchema-instance"><FONT size=3D2=20
face=3DArial>http://www.w3.org/2001/XMLSchema-instance</FONT></A><FONT =
size=3D2=20
face=3DArial>"<BR>&gt;&gt; <BR>&gt;&gt; xmlns:myPrefix=3D"</FONT><A=20
href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>"<BR>&gt;&gt;=20
<BR>&gt;&gt; xsi:schemaLocation=3D"</FONT><A =
href=3D"http://simpleMeta/2.0"><FONT=20
size=3D2 face=3DArial>http://simpleMeta/2.0</FONT></A><BR><FONT size=3D2 =

face=3DArial>&gt;&gt; <BR>&gt;&gt;=20
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
<BR>&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt; =
SMName=3D"simple1"&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;aes CAName=3D"c1" refA=3D"</FONT><A><FONT =
size=3D2=20
face=3DArial>//@bes.1"/</FONT></A><FONT size=3D2 =
face=3DArial>&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;bes CBName=3D"b1"/&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;bes CBName=3D"b2"/&gt;<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp;&nbsp; &lt;ces CCName=3D"c1"/&gt;<BR>&gt;&gt; =
<BR>&gt;&gt;=20
&lt;/myPrefix:SimpleModel&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; =
<BR>&gt;&gt;=20
<BR>&gt;&gt; This is my target model:<BR>&gt;&gt; <BR>&gt;&gt; &lt;?xml=20
version=3D"1.0" encoding=3D"ASCII"?&gt;<BR>&gt;&gt; <BR>&gt;&gt;=20
&lt;myPrefix:SimpleModel xmi:version=3D"2.0" <BR>&gt;&gt; =
xmlns:xmi=3D"</FONT><A=20
href=3D"http://www.omg.org/XMI"><FONT size=3D2=20
face=3DArial>http://www.omg.org/XMI</FONT></A><FONT size=3D2 =
face=3DArial>"=20
<BR>&gt;&gt; xmlns:xsi=3D"</FONT><A=20
href=3D"http://www.w3.org/2001/XMLSchema-instance"><FONT size=3D2=20
face=3DArial>http://www.w3.org/2001/XMLSchema-instance</FONT></A><FONT =
size=3D2=20
face=3DArial>" <BR>&gt;&gt; xmlns:myPrefix=3D"</FONT><A=20
href=3D"http://simpleMeta/2.0"><FONT size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>"=20
<BR>&gt;&gt; xsi:schemaLocation=3D"</FONT><A =
href=3D"http://simpleMeta/2.0"><FONT=20
size=3D2 face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2 =
face=3DArial>=20
<BR>&gt;&gt;=20
E:/ECLIPSE_/WS_eclipse_galilio/mas.emf.test.compare1/models/ simpleMeta.ec=
ore"=20
<BR>&gt;&gt; SMName=3D"simple1"&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; =
&lt;aes=20
CAName=3D"c1" refA=3D"</FONT><A><FONT size=3D2 =
face=3DArial>//@bes.1"/</FONT></A><FONT=20
size=3D2 face=3DArial>&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; &lt;bes=20
CBName=3D"b1"/&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp;&nbsp; &lt;bes=20
CBName=3D"b2"/&gt;<BR>&gt;&gt; <BR>&gt;&gt;=20
&lt;/myPrefix:SimpleModel&gt;<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; =
<BR>&gt;&gt;=20
<BR>&gt;&gt; This is how I registered xmi resource factory in the=20
program:<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;=20
resourceSet1.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
<BR>&gt;&gt; new XMIResourceFactoryImpl());<BR>&gt;&gt; <BR>&gt;&gt;=20
resourceSet2.getResourceFactoryRegistry().getExtensionToFact oryMap().put(=
"xmi",=20
<BR>&gt;&gt; new XMIResourceFactoryImpl());<BR>&gt;&gt; =
<BR>&gt;&gt;&nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; EcoreFactory ecoreFactory =3D=20
EcoreFactory.eINSTANCE;<BR>&gt;&gt; <BR>&gt;&gt; EPackage simpleMeta =3D =

ecoreFactory.createEPackage();<BR>&gt;&gt; <BR>&gt;&gt;=20
simpleMeta.setName("simpleMeta");<BR>&gt;&gt; <BR>&gt;&gt;=20
simpleMeta.setNsURI("</FONT><A href=3D"http://simpleMeta/2.0"><FONT =
size=3D2=20
face=3DArial>http://simpleMeta/2.0</FONT></A><FONT size=3D2=20
face=3DArial>");<BR>&gt;&gt; <BR>&gt;&gt;=20
Registry.INSTANCE.put("simpleMeta",simpleMeta);<BR>&gt;&gt;=20
<BR> &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt;=20
resourceSet1.getPackageRegistry().put("simpleMeta",simpleMeta); <BR>&gt;&g=
t;=20
<BR>&gt;&gt;=20
resourceSet2.getPackageRegistry().put("simpleMeta",simpleMeta); <BR>&gt;&g=
t;=20
<BR> &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;& ;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& ;=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;=20
<BR>&gt;&gt; <BR>&gt;&gt; In debug mode, I can see that the error =
happens at=20
this step :<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; =
final=20
EObject model1 =3D ModelUtils.load(new File(args[0]), =
resourceSet1);<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; Sorry for this beginner=20
question.&nbsp; Any help or advice is highly appreciated.<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt; Thanks in =
advance,<BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt;=20
<BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt;&gt;&nbsp; <BR>&gt;&gt; <BR>&gt; =

<BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_0032_01CB0711.B05CC7A0--
Re: [EMF Compare] Problem starting EMF Compare Standalone [message #622991 is a reply to message #538697] Tue, 08 June 2010 14:02 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090407060402070009090603
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

Okay, this second one doesn't seem 'usual' ^^.

The problem you get is when loading a dynamic instance from a standalone
application ... and I don't know if this is allowed by EMF. Could you
ask the same on the EMF newsgroup (as a side note, EMF Compare questions
should be asked on the EMF newsgroup too :p) so that Ed can take a look?

Laurent Goubet
Obeo

medo samh wrote:
>
> Hi,
>
> The
Previous Topic:[Announce] EMFT MWE, MWE2 and MWE2 Language 1.0.0RC4 is available
Next Topic:SOS advise from EMF specialist
Goto Forum:
  


Current Time: Thu Apr 25 00:50:40 GMT 2024

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

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

Back to the top