Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361253

Summary: Running QVTo Script fails after changing the source input model
Product: [Modeling] QVTo Reporter: christian.f.vogel
Component: EngineAssignee: Project Inbox <mmt-qvt.operational-inbox>
Status: REOPENED --- QA Contact:
Severity: major    
Priority: P3 CC: christian.f.vogel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description christian.f.vogel CLA 2011-10-18 08:49:49 EDT
Build Identifier: 7601

A have a QVTo transformation script and a corresponding launch configuration.
I can run the script successfully. But when I change my input model in eclipse, for example, when I move an element of the input model to other x&y coordinates in the graphical editor of Eclipse and then try to run my QVTo script again then the transformation does not work any more and I get an empty result model.
Even the command "log('All_Objects', input.objects());" in the main function that should list all elements of the input model results with an empty set.
After a restart of Eclipse the OVTo transformation can be launched again successfully

I also tried to create a new launch configuration for my script. This new launch configuration also returns an empty result, as long as Eclipse is not restarted.

Normally I use Eclipse 3.5 with Modelling tools. For testing I could also reproduce the same behaviour in Eclipse 3.7 with Modelling tools. In Eclipse 3.7 it is also possible to start a transformation as a debug configuration. The debug configuration works fine, also after a change in the source model.

My impression is that the QVTo interpreter caches something and therefore does not work correctly after the source model is changed. Is there a way to reset it after a script was launched without restarting Eclipse? 

Reproducible: Always

Steps to Reproduce:
1. Create a OVTo script and launch configuration that runs successfully
2. Make any change in the source input model of the QVTo transformation
3. Try to run the QVTo script again. It will deliver an empty result until Eclipse is restarted again.
4. After a restart the transformation can be launched successfully again
Comment 1 christian.f.vogel CLA 2011-10-19 04:14:02 EDT
It seems that errors in the metamodels caused the Bug. It metamodels exist as plugins and as EclipseProjects in the workspace this causes the Bug
Comment 2 christian.f.vogel CLA 2011-10-19 10:08:04 EDT
Now I have some more information about the bug.
After the failed 2. launch of the transformation I have several warings like the following in my Eclipse Error Log:

null Warning grl.kpimodel.impl.KpimodelFactoryImpl cannot be cast to grl.kpimodel.KpimodelFactory

I don't understand this. I did not change anything in the involved metamodels. I only made a minor change in the source model used in the transformation.
As mentioned before, when I start the transformation as a debug launch, everything works and I don't get any warnings or errors in the Error Log.