Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pivot] Unexpected exception when opening the editor of the genModel which works with a pivot-based ecore #1201

Closed
eclipse-ocl-bot opened this issue Sep 24, 2024 · 11 comments

Comments

@eclipse-ocl-bot
Copy link
Collaborator

| --- | --- |
| Bugzilla Link | 417450 |
| Status | CLOSED INVALID |
| Importance | P3 normal |
| Reported | Sep 17, 2013 14:36 EDT |
| Modified | May 25, 2015 17:19 EDT |
| Reporter | Adolfo Sanchez-Barbudo Herrera |

Description

IDE: Luna M1 (Build id: 20130823-0554)

Workspace:

  • examples plugins from OCL and QVTo (current QVTo GIT master -> commit 1f63d3b78013aa560ce866456e3c57e05c84f8e2)

Steps to reproduce:

  1. Open /org.eclipse.qvto.examples.xtext.qvtoperational/model/QVTOperationalCS.genmodel -> The editor is correctly opened
  2. Close the editor
  3. Right Click on QVTOperationalCS.genmodel -> Reload...
  4. Follow wizard and finish it. An expected change in the QVTOperationalCS.genmodel occurs
  5. Repeat step 1 -> An error[1] occurs when opening the editor
  6. Repeat step 3 -> An error[1] occurs when we press next in the first page of the wizard.

[1] The package 'http://www.eclipse.org/ocl/3.1.0/Pivot#/' has the same namespace URI 'http://www.eclipse.org/ocl/3.1.0/Pivot' as package 'platform:/resource/org.eclipse.ocl.examples.pivot/model/Pivot.ecore#/'

@eclipse-ocl-bot
Copy link
Collaborator Author

By Adolfo Sanchez-Barbudo Herrera on Sep 17, 2013 14:39

Apologise ... I Overlooked the steps numbering... although the repro is easy to follow.

Regards,
Adolfo.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Sep 17, 2013 17:06

If you remove the http://www.eclipse.org/ocl/3.1.0/Pivot# references in QVTOperationalCS.ecore by ../../org.eclipse.ocl.examples.pivot/model/Pivot.ecore# the problem goes away.

Use only platform:/resource

Corrected files pushed to edw/417450

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Sep 18, 2013 04:57

The interesting question is where did the bad references come from.

My suspicion is that the OCLinEcore editor is getting confused between the installed Pivot that it uses for tooling and the project Pivot that is used by the user models. Keep a careful eye out.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Adolfo Sanchez-Barbudo Herrera on Sep 18, 2013 05:06

Hi Ed,

Thanks for pointing this out. I thought that the problem was related with platform:resource URIs which I double checked there was any.

On the other hand, I'm wondering why this trivial genmodel change, makes the problem arise. It's quite deterministic/reproducible...

I'll also have a look if the OCLInEcore makes these "http://" URIs appear and make the ecore model "inconsistent".

Regards,
Adolfo.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Adolfo Sanchez-Barbudo Herrera on Sep 18, 2013 05:10

(In reply to comment #3)

The interesting question is where did the bad references come from.

Yes I got the same thought. Since I've had problems when importing the pivot metamodel (Bug 414855) who knows if they come from the editor or they were manual excercising trying to get findings about the import problem. I'll do some experimenting and I'll also do the pending verification of that bug.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Adolfo Sanchez-Barbudo Herrera on Sep 18, 2013 05:33

Indeed. As soon as you save the OCLInEcore again, the pivot based nsURIs based references start to appear again. Since this is related to the problem of importing the pivot metamodel I'll add comments to Bug 414855

Regards,
Adolfo.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Sep 18, 2013 05:47

(In reply to Adolfo Sanchez-Barbudo Herrera from comment #4)

On the other hand, I'm wondering why this trivial genmodel change, makes the
problem arise. It's quite deterministic/reproducible...

There's no genmoel change.

In the old days genmodel had very little validation so this probvlem would end up in amysaterious NPE/IOOBE/ISE.

Now genmodel has some checks, and the problem shows up as soon as you hit a check.

The two different styles of Pivot reference mean metamodel schizophrenia, so genmodel is correct. Perhaps it could usefully identify where each of the two models came from.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Sep 18, 2013 05:53

(In reply to Adolfo Sanchez-Barbudo Herrera from comment #6)

I'll add comments to Bug 414855

No it's bug 410518.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Adolfo Sanchez-Barbudo Herrera on Sep 18, 2013 07:15

(In reply to comment #7)

(In reply to Adolfo Sanchez-Barbudo Herrera from comment #4)

On the other hand, I'm wondering why this trivial genmodel change, makes the
problem arise. It's quite deterministic/reproducible...

There's no genmoel change.

I think you must have overlooked something. My repro and your own commit[1] shows that, indeed, there is a genmodel change. That commit included two changes:

a) Change in the ecore file, replacing references using nsURI (http://...) format by relative uri (../../). Your fix.
b) Change in the genmodel file, produced by reloading the genmodel. It's simply accommodating an old names change in the ecore file.

I can accurately identify, at least, three situations:

  1. Without change a) and b) the genmodel reloads/editor opens without exceptions
  2. With change a) and b) the genmodel reloads/editor opens without exceptions
  3. Without change a) and with change b) genmodel reloads/editor opens WITH exceptions (the actual repro).

Given the nature of the genmodel change, having 3 throwing exceptions sounds quite surprising providing that 1 doesn't throw exceptions.

Since 1 (without your fix), which have the "inconsistent" URIs in the ecore doesn't produce an invalid genmodel, it's indicative that there is another some obscure problem. In any case, at least change a) solves my particular issue with the reloaded genmodel (with change b) ).

Regards,
Adolfo.

[1] commit 9baaad8961fb9cbc1258123594244df9913e5818

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on Sep 18, 2013 07:40

(In reply to Adolfo Sanchez-Barbudo Herrera from comment #9)

There's no genmoel change.

I think you must have overlooked something.

Ok. There is no relevant genmodel change; just the natural update resulting from reconcile.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on May 25, 2015 17:19

CLOSED after more than a year in the RESOLVED state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant