Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] More information on errors; Maybe corrupt meta models
[QVTO] More information on errors; Maybe corrupt meta models [message #96134] Fri, 28 November 2008 08:37 Go to next message
Eclipse UserFriend
Hello everyone,

I've got a problem launching a transformation.
Is there a way to display the transformation parsing errors? I only get
the number of errors...
Is there a way to check if there are errors in the metamodel I use? I'm
guessing there is the root of the errors, since adding the missing Ns URI
cutted my error count down from 16 to 4.

PS: I'm launching the transformation from Java code by using the
QvtoTransformationHelper.

Here's the error message:

org.eclipse.core.runtime.CoreException: Error: Failed to parse
transformation 'deployed://MSC/transformation1.qvto', 4 error(s) found.
at
org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:171)
at transform.qvt_Action.run(qvt_Action.java:63)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:251)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96240 is a reply to message #96134] Mon, 01 December 2008 03:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael ,

The org.eclipse.core.runtime.CoreException threw by method
executeTransformation(..) contains MultiStatus with all errors being
found. Check for CoreException.getStatus().isMultiStatus() and use
getStatus().getChildren().

I assume that deployed transformation 'MSC/transformation1.qvto' was
checked (compiled and launched) so the problem is very likely relates to
MM configuration issues.

Regards,
Sergey.


Michael Schorer wrote:
> Hello everyone,
>
> I've got a problem launching a transformation. Is there a way to display
> the transformation parsing errors? I only get the number of errors...
> Is there a way to check if there are errors in the metamodel I use? I'm
> guessing there is the root of the errors, since adding the missing Ns
> URI cutted my error count down from 16 to 4.
>
> PS: I'm launching the transformation from Java code by using the
> QvtoTransformationHelper.
>
> Here's the error message:
>
> org.eclipse.core.runtime.CoreException: Error: Failed to parse
> transformation 'deployed://MSC/transformation1.qvto', 4 error(s) found.
> at
> org.eclipse.m2m.qvt.oml.runtime.util.QvtoTransformationHelpe r.executeTransformation(QvtoTransformationHelper.java:171)
>
> at transform.qvt_Action.run(qvt_Action.java:63)
> at
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:251)
> at
> org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
>
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:382)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96255 is a reply to message #96240] Mon, 01 December 2008 04:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Sergey,

thanks for your Answer. Unfortunately the CoreException, thrown by
executeTransformation(), does not contain a MultiStatus in my case.
Here's my error handling:

catch (CoreException e) {
if (e.getStatus().isMultiStatus()){
for (IStatus item: e.getStatus().getChildren()) {
System.out.println(item.toString());
}
}
}

Is there a way to validate my MM configuration? Are there important
configuration parameters I may have forgot?

Regards,
Michael
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96270 is a reply to message #96255] Mon, 01 December 2008 05:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael ,

Some replies are inlined below.

Regards,
Sergey.

Michael Schorer wrote:
> Hi Sergey,
>
> thanks for your Answer. Unfortunately the CoreException, thrown by
> executeTransformation(), does not contain a MultiStatus in my case.
> Here's my error handling:
>
> catch (CoreException e) {
> if (e.getStatus().isMultiStatus()){
> for (IStatus item: e.getStatus().getChildren()) {
> System.out.println(item.toString());
> }
> }
> }

Interesting.. What version of QVTO do you use?

I've just checked with 2.0.0M3 build the following:

try {
new QvtoTransformationHelper(scriptUri).executeTransformation(.. )
}
catch (CoreException e) {
if (e.getStatus().isMultiStatus()){
for (IStatus item: e.getStatus().getChildren()) {
System.out.println(item.toString());
}
}

and got several strings dumped.

Latest 1.0.1 should also support that.

>
> Is there a way to validate my MM configuration? Are there important
> configuration parameters I may have forgot?

In case you use metamodel from workspace it should be reachable in
target platform by the same URI. You can check deployed MM with
Window/Show View/Operational QVT/Metamodel Explorer browser.

Of course diagnostics messages from executeTransformation(..) would help
a lot ;)

>
> Regards,
> Michael
>
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96312 is a reply to message #96270] Mon, 01 December 2008 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Sergey,

I found the cause for the 4 error messages now. In my transformation, I
referenced the modeltypes with:

modeltype msc uses "platform:/resource/MSC/msc.ecore";
modeltype PN uses "platform:/resource/MSC/PN.ecore";

I changed that to the Ns URIs which I specified in the metamodel
properties:

modeltype msc uses "http://msc/1.0";
modeltype PN uses "http://PN/1.0";

Now the transformation is reading the input model correctly. Unfortunately
it seems that the output model is not registered:

Status ERROR: org.eclipse.m2m.qvt.oml.runtime code=1 Line 5: Failed to
resolve metamodel 'http://PN/1.0' null

How can I register the metamodel, so it is usable in the plugin?

P.S.: I can now use MultiStatus Error Messages. I updated everything :-).

Thanks for the help, Sergey!
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96357 is a reply to message #96312] Tue, 02 December 2008 16:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael ,

Reported error implies that model for URI "http://PN/1.0" can't be
found. Try to use 'org.eclipse.emf.ecore.dynamic_package' extension
point to register your .ecore model for target platform.

Also check registered MM in target platform with "Window/Show
View/Operational QVT/Metamodel Explorer" browser.

Regards,
Sergey.


Michael Schorer wrote:
> Hi Sergey,
>
> I found the cause for the 4 error messages now. In my transformation, I
> referenced the modeltypes with:
>
> modeltype msc uses "platform:/resource/MSC/msc.ecore";
> modeltype PN uses "platform:/resource/MSC/PN.ecore";
>
> I changed that to the Ns URIs which I specified in the metamodel
> properties:
>
> modeltype msc uses "http://msc/1.0";
> modeltype PN uses "http://PN/1.0";
>
> Now the transformation is reading the input model correctly.
> Unfortunately it seems that the output model is not registered:
>
> Status ERROR: org.eclipse.m2m.qvt.oml.runtime code=1 Line 5: Failed to
> resolve metamodel 'http://PN/1.0' null
>
> How can I register the metamodel, so it is usable in the plugin?
>
> P.S.: I can now use MultiStatus Error Messages. I updated everything :-).
>
> Thanks for the help, Sergey!
>
>
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96603 is a reply to message #96357] Mon, 08 December 2008 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Thank you very much, Sergey!
I fixed all my issues!

But now I have another problem...
Is there a way to create the following construct in a qvto transformation
with ecore metamodels?

<tag>
plain text
</tag>

I would need this because my output model is needed as input for another
tool, which accepts xml input. In xml this type of input is allowed. The
question is,
can it be created in Ecore or by using QVTO respectively?

Regards,
Michael
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #96645 is a reply to message #96603] Mon, 08 December 2008 08:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

This is out of the QVTo scope, however you might want to take a look at
custom serialization in EMF.

QVTo can save the output model into a resource of a given uri, which
should allow for selecting a specific resource factory and customize the
model
serialization.

Regards,
/Radek


On Mon, 08 Dec 2008 13:46:54 +0100, Michael Schorer
<michael.schorer@continental-corporation.com> wrote:

> Thank you very much, Sergey!
> I fixed all my issues!
>
> But now I have another problem...
> Is there a way to create the following construct in a qvto
> transformation with ecore metamodels?
>
> <tag>
> plain text
> </tag>
>
> I would need this because my output model is needed as input for another
> tool, which accepts xml input. In xml this type of input is allowed. The
> question is,
> can it be created in Ecore or by using QVTO respectively?
>
> Regards, Michael
>
Re: [QVTO] More information on errors; Maybe corrupt meta models [message #97040 is a reply to message #96645] Thu, 11 December 2008 08:21 Go to previous message
Eclipse UserFriend
Hello,

thanks for the tip with the custom serialization. I'd have rather liked to
solve this issue with QVT but this solution is also satifying. Does anyone
know if it is possible to do this with ATL?

Regards,
Michael
Previous Topic:Aggregation of abstract class
Next Topic:UML to Ecore ATL transformation example
Goto Forum:
  


Current Time: Sun May 11 23:20:27 EDT 2025

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

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

Back to the top