Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Some issues with M6
[QVTO] Some issues with M6 [message #102058] Thu, 19 March 2009 15:56 Go to next message
Eclipse UserFriend
Hi all,

I wonder if it is just me or whether there are indeed some problems with milestone 6 (worked fine in milestone 5):

- When I start a transformation using the Run-dialog, the uri of a model in the workspace is not recognized any more:
org.eclipse.core.runtime.CoreException: Invalid transformation URI 'platform:/resource/myproject/transforms/transformation.qvto '

- If an assertion fails, the exception does not contain the assert message any more:
org.eclipse.core.runtime.CoreException: Fatal assertion failed
at org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:188)
...
This makes it hard to find out the reason for the failed assertion, e.g. if the transformation is provided in a plugin and is not available in the workspace.


Best regards
Patrick
Re: [QVTO] Some issues with M6 [message #102103 is a reply to message #102058] Fri, 20 March 2009 05:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi Patrick,

> - When I start a transformation using the Run-dialog, the uri of a model
> in the workspace is not recognized any more:
> org.eclipse.core.runtime.CoreException: Invalid transformation URI
> 'platform:/resource/myproject/transforms/transformation.qvto '

Hm, I can see that 'Run Transformation' dialog always replaces the IN model
uri with the uri of the transformation to execute.
It certainly can be manually corrected but should not work like this for
sure ;).

Would you mind to raise a bugzilla?
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2M& component=QVT_OML-Engine
It should get fixed by I-build early next week.

>
> - If an assertion fails, the exception does not contain the assert
> message any more:
> org.eclipse.core.runtime.CoreException: Fatal assertion failed
> at
> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:188)
> ...

You can see the details in the console output, like my snapshot bellow:

ASSERT [fatal] failed at (Ecore2UML.qvto:7) : my message
Terminating execution...
org.eclipse.m2m.internal.qvt.oml.evaluator.QvtAssertionFaile d: Fatal
assertion failed
at Ecore2UML::main(Ecore2UML.qvto:7)

Anyway, I agree that the fatal assertion exception could carry more info.
Thanks for pointing this out.
Re: [QVTO] Some issues with M6 [message #102138 is a reply to message #102103] Fri, 20 March 2009 08:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Radek,

comments below.

On 20-03-2009 10:14, Radek Dvorak wrote:
> Hi Patrick,
>
>> - When I start a transformation using the Run-dialog, the uri of a
>> model in the workspace is not recognized any more:
>> org.eclipse.core.runtime.CoreException: Invalid transformation URI
>> 'platform:/resource/myproject/transforms/transformation.qvto '

Strange.. I cannot reproduce this bug today anymore.. So I guess it was a problem with my Eclipse.
Now it works again :-)


> Hm, I can see that 'Run Transformation' dialog always replaces the IN model
> uri with the uri of the transformation to execute.
> It certainly can be manually corrected but should not work like this for
> sure ;).
>
> Would you mind to raise a bugzilla?
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2M& component=QVT_OML-Engine

I can't, because my in-model uri is not replaced with the transformation uri.
Sorry, I cannot reproduce what you describe.


>
> It should get fixed by I-build early next week.
>
>>
>> - If an assertion fails, the exception does not contain the assert
>> message any more:
>> org.eclipse.core.runtime.CoreException: Fatal assertion failed
>> at
>> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:188)
>>
>> ...
>
> You can see the details in the console output, like my snapshot bellow:
>
> ASSERT [fatal] failed at (Ecore2UML.qvto:7) : my message
> Terminating execution...
> org.eclipse.m2m.internal.qvt.oml.evaluator.QvtAssertionFaile d: Fatal
> assertion failed
> at Ecore2UML::main(Ecore2UML.qvto:7)
>
> Anyway, I agree that the fatal assertion exception could carry more info.
> Thanks for pointing this out.

Let me clarify the problem:
I use the QvtoTransformationHelper to programmatically start the transformation.
Thus if an exception occurs, the console output is not available!
Consequently I cannot access the console output and all I got is the exception message as shown in my previous post.


Cheers
Patrick
Re: [QVTO] Some issues with M6 [message #102165 is a reply to message #102138] Fri, 20 March 2009 12:02 Go to previous messageGo to next message
Eclipse UserFriend
> I use the QvtoTransformationHelper to programmatically start the
> transformation.
> Thus if an exception occurs, the console output is not available!
> Consequently I cannot access the console output and all I got is the
> exception message as shown in my previous post.

OK, I thought you refer to the "Run" dialog case as well.

As for now, the message is not part of the exception, but goes to the log
only.
However, you might want to try the 'transformation executor' added in M6.
You can get more info about the error condition.
Check the code snippet bellow.

....
import org.eclipse.m2m.qvt.oml.TransformationExecutor

URI transfURI = ...
TransformationExecutor executor = new TransformationExecutor(transfURI);

ModelExtent input = new BasicModelExtent(inResource.getContents());
ModelExtent output = new BasicModelExtent();

ExecutionContextImpl context = new ExecutionContextImpl();

ExecutionDiagnostic diagnostic = executor.execute(context, input, output);

if(diagnostic.getSeverity() == Diagnostic.ERROR &&
diagnostic.getCode() == ExecutionDiagnostic.FATAL_ASSERTION) {

StringWriter details = new StringWriter();
PrintWriter pw = new PrintWriter(details, true);

pw.println(diagnostic.getMessage());
diagnostic.printStackTrace(pw);
}
....


Note, execution of a transf. defined for workspace located metamodels will
come later.
Re: [QVTO] Some issues with M6 [message #102191 is a reply to message #102165] Mon, 23 March 2009 04:32 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Radek, evaluating diagnostic.getStackTrace gives me some hints at least.
Although the assertion message is still not available, if I see it correctly.

Regards
Patrick


On 20-03-2009 17:02, Radek Dvorak wrote:
>> I use the QvtoTransformationHelper to programmatically start the
>> transformation.
>> Thus if an exception occurs, the console output is not available!
>> Consequently I cannot access the console output and all I got is the
>> exception message as shown in my previous post.
>
> OK, I thought you refer to the "Run" dialog case as well.
>
> As for now, the message is not part of the exception, but goes to the
> log only.
> However, you might want to try the 'transformation executor' added in M6.
> You can get more info about the error condition.
> Check the code snippet bellow.
>
> ...
> import org.eclipse.m2m.qvt.oml.TransformationExecutor
>
> URI transfURI = ...
> TransformationExecutor executor = new TransformationExecutor(transfURI);
>
> ModelExtent input = new BasicModelExtent(inResource.getContents());
> ModelExtent output = new BasicModelExtent();
>
> ExecutionContextImpl context = new ExecutionContextImpl();
>
> ExecutionDiagnostic diagnostic = executor.execute(context, input, output);
>
> if(diagnostic.getSeverity() == Diagnostic.ERROR &&
> diagnostic.getCode() == ExecutionDiagnostic.FATAL_ASSERTION) {
>
> StringWriter details = new StringWriter();
> PrintWriter pw = new PrintWriter(details, true);
>
> pw.println(diagnostic.getMessage());
> diagnostic.printStackTrace(pw);
> }
> ...
>
>
> Note, execution of a transf. defined for workspace located metamodels
> will come later.
Re: [QVTO] Some issues with M6 [message #102245 is a reply to message #102191] Mon, 23 March 2009 17:11 Go to previous messageGo to next message
Eclipse UserFriend
> Thanks Radek, evaluating diagnostic.getStackTrace gives me some hints at
> least.
> Although the assertion message is still not available, if I see it
> correctly.

Right, you see it absolutely correctly ;)
Should be fixed by: https://bugs.eclipse.org/bugs/show_bug.cgi?id=269744
Re: [QVTO] Some issues with M6 [message #102274 is a reply to message #102245] Tue, 24 March 2009 03:37 Go to previous message
Eclipse UserFriend
Great! :-)
Thank you

On 23-03-2009 22:11, Radek Dvorak wrote:
>
>> Thanks Radek, evaluating diagnostic.getStackTrace gives me some hints
>> at least.
>> Although the assertion message is still not available, if I see it
>> correctly.
>
> Right, you see it absolutely correctly ;)
> Should be fixed by: https://bugs.eclipse.org/bugs/show_bug.cgi?id=269744
Previous Topic:From generated model to text
Next Topic:[ATL] UML2COPY problem
Goto Forum:
  


Current Time: Sat Jul 19 13:49:45 EDT 2025

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

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

Back to the top