Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ...
[Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #378847] Sun, 12 August 2007 17:02 Go to next message
beaperez Mising name is currently offline beaperez Mising name
Messages: 81
Registered: July 2009
Member
Hello everybody,
I would like to run Mofscript files from Java. I have no problem if I
execute the main Mofscript transformation (it imports other m2t files) with
the Mofscript interface but if I try to execute it from my java code I get
the errors:

Parsing result: 33 errors

: Error: MTTParseError: Illegal/unknown context: uml, line: 0, column: 0

.....

: Error: MTTParseError: Cannot find import: guardas.m2t, line: 7, column: 7

......

I think that it does not find neither the context
http://www.eclipse.org/uml2/2.0.0/UML nor the imported m2t files. I am also
using the sentence parserUtil.setCompilePath(templatesDir); in my java file.
I am using Mofscript 1.2.4

Any idea?

Thank you very much in advance.

Bea
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #378868 is a reply to message #378847] Fri, 17 August 2007 06:32 Go to previous messageGo to next message
beaperez Mising name is currently offline beaperez Mising name
Messages: 81
Registered: July 2009
Member
Hi again,
My configuration is Eclipse 3.3 and MOFScript 1.2.4 and perhaps the problem
is that configuration. Although I think that it is strange since if I run
the trnansformations directly, using MOFScript without using any Java file,
it works perfectly.
I also load explicity the UML metamodel in my java code adding;
ParserUtil parserUtil = new ParserUtil();
ExecutionManager execMgr = ExecutionManager.getExecutionManager();
execMgr.lookupAndAddSourceMetaModel("uml","http://www.eclipse.org/uml2/2.0.0/UML");


but It seems that that code does not anything. If I change the metamodel to
the Ecore metamodel it works, I mean, the metamodel is found.
Could anybody help me? Does anybody have try to execute MOFScript
transformations by using java files? What configuration are you using?


Thank you very much in advance.
Bea



"bea" <beaperez@unizar.es> wrote in message
news:f9naul$tat$1@build.eclipse.org...
> Hello everybody,
> I would like to run Mofscript files from Java. I have no problem if I
> execute the main Mofscript transformation (it imports other m2t files)
> with the Mofscript interface but if I try to execute it from my java code
> I get the errors:
>
> Parsing result: 33 errors
>
> : Error: MTTParseError: Illegal/unknown context: uml, line: 0, column: 0
>
> ....
>
> : Error: MTTParseError: Cannot find import: guardas.m2t, line: 7, column:
> 7
>
> .....
>
> I think that it does not find neither the context
> http://www.eclipse.org/uml2/2.0.0/UML nor the imported m2t files. I am
> also using the sentence parserUtil.setCompilePath(templatesDir); in my
> java file. I am using Mofscript 1.2.4
>
> Any idea?
>
> Thank you very much in advance.
>
> Bea
>
>
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #378870 is a reply to message #378868] Fri, 17 August 2007 10:03 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOT
Messages: 247
Registered: July 2009
Senior Member
And what about the following context :
http://www.eclipse.org/uml2/2.1.0/UML ? Does it solve your problem ?

Bea a écrit :
> Hi again,
> My configuration is Eclipse 3.3 and MOFScript 1.2.4 and perhaps the problem
> is that configuration. Although I think that it is strange since if I run
> the trnansformations directly, using MOFScript without using any Java file,
> it works perfectly.
> I also load explicity the UML metamodel in my java code adding;
> ParserUtil parserUtil = new ParserUtil();
> ExecutionManager execMgr = ExecutionManager.getExecutionManager();
> execMgr.lookupAndAddSourceMetaModel("uml","http://www.eclipse.org/uml2/2.0.0/UML");
>
>
> but It seems that that code does not anything. If I change the metamodel to
> the Ecore metamodel it works, I mean, the metamodel is found.
> Could anybody help me? Does anybody have try to execute MOFScript
> transformations by using java files? What configuration are you using?
>
>
> Thank you very much in advance.
> Bea
>
>
>
> "bea" <beaperez@unizar.es> wrote in message
> news:f9naul$tat$1@build.eclipse.org...
>> Hello everybody,
>> I would like to run Mofscript files from Java. I have no problem if I
>> execute the main Mofscript transformation (it imports other m2t files)
>> with the Mofscript interface but if I try to execute it from my java code
>> I get the errors:
>>
>> Parsing result: 33 errors
>>
>> : Error: MTTParseError: Illegal/unknown context: uml, line: 0, column: 0
>>
>> ....
>>
>> : Error: MTTParseError: Cannot find import: guardas.m2t, line: 7, column:
>> 7
>>
>> .....
>>
>> I think that it does not find neither the context
>> http://www.eclipse.org/uml2/2.0.0/UML nor the imported m2t files. I am
>> also using the sentence parserUtil.setCompilePath(templatesDir); in my
>> java file. I am using Mofscript 1.2.4
>>
>> Any idea?
>>
>> Thank you very much in advance.
>>
>> Bea
>>
>>
>
>
>
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #378872 is a reply to message #378870] Fri, 17 August 2007 12:31 Go to previous messageGo to next message
Gøran K. Olsen is currently offline Gøran K. Olsen
Messages: 184
Registered: July 2009
Senior Member
Hello Bea,

Previously it was enough to add

"UMLPackage umlPackage = UMLPackage.eINSTANCE;"

or just

"UMLPackage.eINSTANCE;"

But it does not seem to work with my Europa configuration.
I will try to pinpoint the problem.

/G
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #378874 is a reply to message #378872] Fri, 17 August 2007 13:03 Go to previous message
Gøran K. Olsen is currently offline Gøran K. Olsen
Messages: 184
Registered: July 2009
Senior Member
Hello Bea,

You should try to include UMLPackage.... as explained in the previous
posting, and in addition change your transformation spec input metamodel to
2.1.0 as shown below.
It is probably 2.0.0 if you have used the new transfromation template.
The "lookupAndAddSourceMetaModel" method should not be required.
(in uml:http://www.eclipse.org/uml2/2.1.0/UML)

It seems to work with my configuration:

Europa
org.eclipse.emf.common (2.3.0.v200706262000)
org.eclipse.uml2 (2.1.0.v200706251652) "UML2"

Regards,
G
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #606590 is a reply to message #378847] Fri, 17 August 2007 06:32 Go to previous message
beaperez Mising name is currently offline beaperez Mising name
Messages: 81
Registered: July 2009
Member
Hi again,
My configuration is Eclipse 3.3 and MOFScript 1.2.4 and perhaps the problem
is that configuration. Although I think that it is strange since if I run
the trnansformations directly, using MOFScript without using any Java file,
it works perfectly.
I also load explicity the UML metamodel in my java code adding;
ParserUtil parserUtil = new ParserUtil();
ExecutionManager execMgr = ExecutionManager.getExecutionManager();
execMgr.lookupAndAddSourceMetaModel("uml","http://www.eclipse.org/uml2/2.0.0/UML");


but It seems that that code does not anything. If I change the metamodel to
the Ecore metamodel it works, I mean, the metamodel is found.
Could anybody help me? Does anybody have try to execute MOFScript
transformations by using java files? What configuration are you using?


Thank you very much in advance.
Bea



"bea" <beaperez@unizar.es> wrote in message
news:f9naul$tat$1@build.eclipse.org...
> Hello everybody,
> I would like to run Mofscript files from Java. I have no problem if I
> execute the main Mofscript transformation (it imports other m2t files)
> with the Mofscript interface but if I try to execute it from my java code
> I get the errors:
>
> Parsing result: 33 errors
>
> : Error: MTTParseError: Illegal/unknown context: uml, line: 0, column: 0
>
> ....
>
> : Error: MTTParseError: Cannot find import: guardas.m2t, line: 7, column:
> 7
>
> .....
>
> I think that it does not find neither the context
> http://www.eclipse.org/uml2/2.0.0/UML nor the imported m2t files. I am
> also using the sentence parserUtil.setCompilePath(templatesDir); in my
> java file. I am using Mofscript 1.2.4
>
> Any idea?
>
> Thank you very much in advance.
>
> Bea
>
>
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #606591 is a reply to message #378868] Fri, 17 August 2007 10:03 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOT
Messages: 247
Registered: July 2009
Senior Member
And what about the following context :
http://www.eclipse.org/uml2/2.1.0/UML ? Does it solve your problem ?

Bea a écrit :
> Hi again,
> My configuration is Eclipse 3.3 and MOFScript 1.2.4 and perhaps the problem
> is that configuration. Although I think that it is strange since if I run
> the trnansformations directly, using MOFScript without using any Java file,
> it works perfectly.
> I also load explicity the UML metamodel in my java code adding;
> ParserUtil parserUtil = new ParserUtil();
> ExecutionManager execMgr = ExecutionManager.getExecutionManager();
> execMgr.lookupAndAddSourceMetaModel("uml","http://www.eclipse.org/uml2/2.0.0/UML");
>
>
> but It seems that that code does not anything. If I change the metamodel to
> the Ecore metamodel it works, I mean, the metamodel is found.
> Could anybody help me? Does anybody have try to execute MOFScript
> transformations by using java files? What configuration are you using?
>
>
> Thank you very much in advance.
> Bea
>
>
>
> "bea" <beaperez@unizar.es> wrote in message
> news:f9naul$tat$1@build.eclipse.org...
>> Hello everybody,
>> I would like to run Mofscript files from Java. I have no problem if I
>> execute the main Mofscript transformation (it imports other m2t files)
>> with the Mofscript interface but if I try to execute it from my java code
>> I get the errors:
>>
>> Parsing result: 33 errors
>>
>> : Error: MTTParseError: Illegal/unknown context: uml, line: 0, column: 0
>>
>> ....
>>
>> : Error: MTTParseError: Cannot find import: guardas.m2t, line: 7, column:
>> 7
>>
>> .....
>>
>> I think that it does not find neither the context
>> http://www.eclipse.org/uml2/2.0.0/UML nor the imported m2t files. I am
>> also using the sentence parserUtil.setCompilePath(templatesDir); in my
>> java file. I am using Mofscript 1.2.4
>>
>> Any idea?
>>
>> Thank you very much in advance.
>>
>> Bea
>>
>>
>
>
>
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #606592 is a reply to message #378870] Fri, 17 August 2007 12:31 Go to previous message
Gøran K. Olsen is currently offline Gøran K. Olsen
Messages: 184
Registered: July 2009
Senior Member
Hello Bea,

Previously it was enough to add

"UMLPackage umlPackage = UMLPackage.eINSTANCE;"

or just

"UMLPackage.eINSTANCE;"

But it does not seem to work with my Europa configuration.
I will try to pinpoint the problem.

/G
Re: [Mofscript] The context http://www.eclipse.org/uml2/2.0.0/UML is not found ... [message #606593 is a reply to message #378872] Fri, 17 August 2007 13:03 Go to previous message
Gøran K. Olsen is currently offline Gøran K. Olsen
Messages: 184
Registered: July 2009
Senior Member
Hello Bea,

You should try to include UMLPackage.... as explained in the previous
posting, and in addition change your transformation spec input metamodel to
2.1.0 as shown below.
It is probably 2.0.0 if you have used the new transfromation template.
The "lookupAndAddSourceMetaModel" method should not be required.
(in uml:http://www.eclipse.org/uml2/2.1.0/UML)

It seems to work with my configuration:

Europa
org.eclipse.emf.common (2.3.0.v200706262000)
org.eclipse.uml2 (2.1.0.v200706251652) "UML2"

Regards,
G
Previous Topic:[MOFScript] Inconsistent handling of subpackages
Next Topic:applying mofscript to XML model
Goto Forum:
  


Current Time: Fri Oct 31 15:07:01 GMT 2014

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

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