Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Failed to resolve metamodel when debugging
Failed to resolve metamodel when debugging [message #870449] Tue, 08 May 2012 09:47 Go to next message
Eclipse UserFriend
Hello,

I'm facing a very wild issue: I'm developing transformation on still
changing input and output EMF models. Therefore I'm generating the EMF
model and then start it in another debug/run Eclipse instance. In this
inner instance I then work on the .qvto file. If I need to change the
EMF model, I just save my qvto work, quit the inner Eclipse, change the
model, regenerate and restart the inner Eclipse.

The qvto editor works fine and correctly resolves the models. However,
when I want to debug the qvto script, I'm getting a "Failed to resolve
metamodel" error. How is that possible? The QVT debug configuration
looks sane and does resolve the models.

BTW, in my previous workflow looked I preloaded the corresponding .ecore
files into the primary Eclipse's EMF registry, but then I needed to
restart the primary Eclipse which is more disruptive for my work and
also slower because of its many plugins. I'd really like to avoid having
to get back there again.

TIA for any tipps, I'm getting desperate!
Marius
Re: Failed to resolve metamodel when debugging [message #870466 is a reply to message #870449] Tue, 08 May 2012 11:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Your description is not entirely clear, but I suspect that you are
encountering the problem whereby not all tools reload their memory
copies of models that change in the file system. In particular it is
illegal for a meta-model to change while an model conforming to it is
loaded; the EObject.eClass() references are not full proxies; EMF spots
the meta-model change, trashes the eClass references, but they do not
get repaired. You have to exit the editor and reload. If any of your
models are registered in the gloabl registry then this too may cause
them to persist preventing a reload.

I'm afraid that only gives you clues as to where things can go wrong.
Try to avoid any edits of meta-models, particularly across sessions.
Also avoid having a Java builder active on the same project in two Eclipses.

Regards

Ed Willink


On 08/05/2012 10:47, Marius Gröger wrote:
> Hello,
>
> I'm facing a very wild issue: I'm developing transformation on still
> changing input and output EMF models. Therefore I'm generating the EMF
> model and then start it in another debug/run Eclipse instance. In this
> inner instance I then work on the .qvto file. If I need to change the
> EMF model, I just save my qvto work, quit the inner Eclipse, change the
> model, regenerate and restart the inner Eclipse.
>
> The qvto editor works fine and correctly resolves the models. However,
> when I want to debug the qvto script, I'm getting a "Failed to resolve
> metamodel" error. How is that possible? The QVT debug configuration
> looks sane and does resolve the models.
>
> BTW, in my previous workflow looked I preloaded the corresponding .ecore
> files into the primary Eclipse's EMF registry, but then I needed to
> restart the primary Eclipse which is more disruptive for my work and
> also slower because of its many plugins. I'd really like to avoid having
> to get back there again.
>
> TIA for any tipps, I'm getting desperate!
> Marius
Re: Failed to resolve metamodel when debugging [message #870477 is a reply to message #870466] Tue, 08 May 2012 11:35 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

On 08.05.2012 13:02, Ed Willink wrote:
> Your description is not entirely clear, but I suspect that you are
> encountering the problem whereby not all tools reload their memory
> copies of models that change in the file system. In particular it is
> illegal for a meta-model to change while an model conforming to it is
> loaded; the EObject.eClass() references are not full proxies; EMF spots
> the meta-model change, trashes the eClass references, but they do not
> get repaired. You have to exit the editor and reload. If any of your
> models are registered in the gloabl registry then this too may cause
> them to persist preventing a reload.
>
> I'm afraid that only gives you clues as to where things can go wrong.
> Try to avoid any edits of meta-models, particularly across sessions.
> Also avoid having a Java builder active on the same project in two
> Eclipses.

Hm. I have set up this workflow to achieve just that. By running
everything in the inner eclipse I can easily reset all QVT classes and
the global EMF registry by simply relaunching the inner eclipse. And as
I said, the QVT editor shows no error and is fully functional. It is
only when I start a debug session in the inner eclipse when I'm facing
those issues.

Another observation is that I can put a breakpoint into the qvt ast
parser where the resolving is done, and it is hit when I operate the
(inner) QVT editor. But it is NOT hit when I launch the QVT debugger
within the inner eclipse.

Marius
Re: Failed to resolve metamodel when debugging [message #870483 is a reply to message #870477] Tue, 08 May 2012 11:52 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

When I am similarly confused, I find that instrumenting
org.eclipse.emf.ecore with println's including hashCodes is a great help
in identifying what is going on.

ResourceImpl construction is probably where I'd start to see whether the
problem URI is loaded or not, and if so why it is inaccessible.

EcoreUtil.resolveProxy is also good; it makes two attempts with and
without demand load, so that you can set a breakpoint on the first
failure and trace through the repeated failure.

Regards

Ed Willink

On 08/05/2012 12:35, Marius Gröger wrote:
> Hi Ed,
>
> On 08.05.2012 13:02, Ed Willink wrote:
>> Your description is not entirely clear, but I suspect that you are
>> encountering the problem whereby not all tools reload their memory
>> copies of models that change in the file system. In particular it is
>> illegal for a meta-model to change while an model conforming to it is
>> loaded; the EObject.eClass() references are not full proxies; EMF spots
>> the meta-model change, trashes the eClass references, but they do not
>> get repaired. You have to exit the editor and reload. If any of your
>> models are registered in the gloabl registry then this too may cause
>> them to persist preventing a reload.
>>
>> I'm afraid that only gives you clues as to where things can go wrong.
>> Try to avoid any edits of meta-models, particularly across sessions.
>> Also avoid having a Java builder active on the same project in two
>> Eclipses.
> Hm. I have set up this workflow to achieve just that. By running
> everything in the inner eclipse I can easily reset all QVT classes and
> the global EMF registry by simply relaunching the inner eclipse. And as
> I said, the QVT editor shows no error and is fully functional. It is
> only when I start a debug session in the inner eclipse when I'm facing
> those issues.
>
> Another observation is that I can put a breakpoint into the qvt ast
> parser where the resolving is done, and it is hit when I operate the
> (inner) QVT editor. But it is NOT hit when I launch the QVT debugger
> within the inner eclipse.
>
> Marius
Re: [solved] Failed to resolve metamodel when debugging [message #870488 is a reply to message #870483] Tue, 08 May 2012 12:14 Go to previous messageGo to next message
Eclipse UserFriend
On 08.05.2012 13:52, Ed Willink wrote:
> When I am similarly confused, I find that instrumenting
> org.eclipse.emf.ecore with println's including hashCodes is a great help
> in identifying what is going on.
>
> ResourceImpl construction is probably where I'd start to see whether the
> problem URI is loaded or not, and if so why it is inaccessible.
>
> EcoreUtil.resolveProxy is also good; it makes two attempts with and
> without demand load, so that you can set a breakpoint on the first
> failure and trace through the repeated failure.

Thanks for those hints, I'm sure I'll be needing them sometime in the
future.

Meanwhile I have found the issue, and it's totally embarrassing: I
actually managed to confused the launch categories "QVT Interpreter" and
"QVT Application Launch Delegate" and wrongly had created a delegate
when I meant the interpreter. I'm thoroughly feeling ashamed to have
wasted both of our times...

Thanks again
Marius
Re: [solved] Failed to resolve metamodel when debugging [message #870531 is a reply to message #870488] Tue, 08 May 2012 14:47 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Thanks for letting us know the solution; it avoids an apparent hint of
an unsolved bug.

Regards

Ed Willink

On 08/05/2012 13:14, Marius Gröger wrote:
> On 08.05.2012 13:52, Ed Willink wrote:
>> When I am similarly confused, I find that instrumenting
>> org.eclipse.emf.ecore with println's including hashCodes is a great help
>> in identifying what is going on.
>>
>> ResourceImpl construction is probably where I'd start to see whether the
>> problem URI is loaded or not, and if so why it is inaccessible.
>>
>> EcoreUtil.resolveProxy is also good; it makes two attempts with and
>> without demand load, so that you can set a breakpoint on the first
>> failure and trace through the repeated failure.
> Thanks for those hints, I'm sure I'll be needing them sometime in the
> future.
>
> Meanwhile I have found the issue, and it's totally embarrassing: I
> actually managed to confused the launch categories "QVT Interpreter" and
> "QVT Application Launch Delegate" and wrongly had created a delegate
> when I meant the interpreter. I'm thoroughly feeling ashamed to have
> wasted both of our times...
>
> Thanks again
> Marius
>
>
Previous Topic:[QVTo] UML 2 UML transform
Next Topic:Error "ObjectDeclsCS" expected after "object"
Goto Forum:
  


Current Time: Fri Apr 19 21:26:51 GMT 2024

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

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

Back to the top