applying mofscript to XML model [message #378876] |
Fri, 17 August 2007 14:17 |
Eclipse User |
|
|
|
Originally posted by: pehl1.stonehouse.oilfield.slb.com
This is a multi-part message in MIME format.
------=_NextPart_000_0023_01C7E0E1.C2C23780
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Heia,=20
I send this to 'EclipseZone' the other day but wasn't really successful =
yet in solving it. Can somebody help ?
I have written a simple xsd schema file representing a network structure =
.. Out of this I created a model editor using EMF and XSD. The model =
editor works fine. All XML files created with this editor can be saved =
to a file and read back without problems.=20
I created a mofscript using the mofscript editor. The code completion =
feature of the mofscript editor perfectly finds all model elements and =
types of the XSD schema. The mofscript compiles without errors. Now =
running the script on any of the models created with the model editor =
does not work at all. It complains about a 'null' reference which it =
does not find.=20
Any ideas ?=20
Hermann=20
The XML file I am applying my mofscript to is:=20
<?xml version=3D"1.0" encoding=3D"UTF-8"?>=20
<Network>=20
<Node>=20
<TxMessage/>=20
<TxMessage/>=20
<Name></Name>=20
</Node>=20
<Node>=20
<Name></Name>=20
<TxMessage/>=20
<RxMessage/>=20
</Node>=20
</Network>
the error message from the mofscript execution is :=20
## Open File: D:\work\runtime-EclipseApplication(1)\test\My.dnitest for =
input model:mdl=20
## Loading source model - My.dnitest... #Error in source model loading: =
org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri =
'null' not found. =
(file:/D:/work/runtime-EclipseApplication(1)/test/My.dnitest , 2, =
121)(Loading time 16 - Msec)=20
## Executing MOFScript Specification=20
Execution Error: =
org.sintef.mofscript.runtime.MofScriptExecutionException: No Source =
Models defined.
In the plugin.xml file for the model it says (whereas 'dnitest' is the =
file extension for the models):=20
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<?eclipse version=3D"3.0"?>
<!--
<copyright>
</copyright>
$Id$
-->
<plugin>
<extension point=3D"org.eclipse.emf.ecore.generated_package">
<package
uri =3D =
"file:/D:/work/OmniRev/FullArcher1/CANalyzer/DNItest.xsd"=20
class =3D "DNItest.DNItestPackage"
genModel =3D "model/DNItest.genmodel" />=20
</extension>
<extension point=3D"org.eclipse.emf.ecore.extension_parser">
<parser=20
type=3D"dnitest"=20
class=3D"DNItest.util.DNItestResourceFactoryImpl" />
</extension>
</plugin>
------=_NextPart_000_0023_01C7E0E1.C2C23780
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 http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3132" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>Heia, <BR><BR>I send this to 'EclipseZone' the other day but wasn't =
really=20
successful yet in solving it. Can somebody help ?</DIV>
<DIV> </DIV>
<DIV>I have written a simple xsd schema file representing a network =
structure .=20
Out of this I created a model editor using EMF and XSD. The model editor =
works=20
fine. All XML files created with this editor can be saved to a file and =
read=20
back without problems. <BR><BR>I created a mofscript using the mofscript =
editor.=20
The code completion feature of the mofscript editor perfectly =
finds all=20
model elements and types of the XSD schema. The mofscript compiles =
without=20
errors. Now running the script on any of the models created with the =
model=20
editor does not work at all. It complains about a 'null' reference which =
it does=20
not find. <BR><BR>Any ideas ? <BR><BR>Hermann <BR><BR><BR><BR>The XML =
file I am=20
applying my mofscript to is: <BR><BR><?xml version=3D"1.0"=20
encoding=3D"UTF-8"?> <BR> <Network>=20
<BR> <Node> =
<BR> =20
<TxMessage/> =
<BR> =20
<TxMessage/> =
<BR> =20
<Name></Name>=20
<BR> </Node> =
<BR> =20
<Node> <BR> =
=20
<Name></Name> <BR> =20
<TxMessage/> =
<BR> =20
<RxMessage/> =
<BR> =20
</Node> <BR> =20
</Network><BR><BR></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR>the error message from the =
mofscript=20
execution is : <BR><BR>## Open File:=20
D:\work\runtime-EclipseApplication(1)\test\My.dnitest for input =
model:mdl <BR>##=20
Loading source model - My.dnitest... #Error in source model loading:=20
org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri =
'null' not=20
found. (file:/D:/work/runtime-EclipseApplication(1)/test/My.dnitest , 2,=20
121)(Loading time 16 - Msec) <BR>## Executing MOFScript Specification=20
<BR><BR>Execution Error:=20
org.sintef.mofscript.runtime.MofScriptExecutionException: No Source =
Models=20
defined.</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>In the plugin.xml file for the model it says (whereas 'dnitest' is =
the file=20
extension for the models): <BR><BR><FONT size=3D2><?xml =
version=3D"1.0"=20
encoding=3D"UTF-8"?><BR><?eclipse=20
version=3D"3.0"?><BR><!--<BR><BR><copyright> <BR></copyrigh=
t><BR>$Id$<BR>--><BR><plugin> <BR> =20
<extension=20
point=3D"org.eclipse.emf.ecore.generated_package"><BR > &nbs=
p;=20
<package<BR> =
uri =3D=20
"file:/D:/work/OmniRev/FullArcher1/CANalyzer/DNItest.xsd" =
<BR> =20
class =3D=20
"DNItest.DNItestPackage"<BR> =20
genModel =3D "model/DNItest.genmodel" />=20
<BR> </extension><BR> =
<extension=20
point=3D"org.eclipse.emf.ecore.extension_parser"><BR >  =
;=20
<parser <BR> =20
type=3D"dnitest" <BR> =
=20
class=3D"DNItest.util.DNItestResourceFactoryImpl"=20
/><BR> </extension&a mp;gt; <BR></FONT><FONT=20
size=3D2></plugin></FONT><BR><FONT face=3DArial=20
size=3D2></FONT></DIV></BODY></HTML>
------=_NextPart_000_0023_01C7E0E1.C2C23780--
|
|
|
Powered by
FUDForum. Page generated in 0.03140 seconds