Book a Demo

Author Topic: XMI Package Import: Duplicate IDs  (Read 6266 times)

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
XMI Package Import: Duplicate IDs
« on: September 05, 2007, 12:31:01 am »
Hi All!

I am a newbie concerning EA, while I have done some modelling in other tools like Poseidon. In my PhD research, there is the need to work with some ISO spatial classes, which should provide basic types to a higher level class model.

Both models (ISO and mine) are already defined in seperated EA projects, so I used the XMI package export function to produce an interchange file, with full roundtrip selected.

But when I try to import it into my model, I get a error message stating that there are duplicate IDs in the XMI, and the import fails.

After examination of the XMI, it seems the origin of duplication lies in some of the NoteLink objects. They really get the same ID as the source.

All in all, it looks like a bug in the export process...

BTW, unchecking full roundtrip and choosing versions UML2.1 and XMI2.1 can solve the question in most of the cases, but can also shutdown EA!

Any hints on how to get clean Import/Export between EA projects will be greatly appreciated.

JPHespanha
TUDelft, OTB Research
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #1 on: September 05, 2007, 10:31:51 am »
Welcome Joao,

Try checking the Strip GUIDs box on the import dialog. If you leave this unchecked EA thinks you want to overwrite existing elements.

David
No, you can't have it!

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #2 on: September 05, 2007, 11:56:53 pm »
I have tried already to check the "Strip Guid's" option, but the result is the same, because the duplication lies in the XMI itself, and not in one of my model elements.

My work around has been to actually comment duplicated elements on the XMI. Of course I loose related notes, sometimes important OCL statements! And is also somewhat laborious task.
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #3 on: September 06, 2007, 09:37:03 am »
Joao,

Is this something like the XMI identifying a notelink twice if the note is linked to two things (elements, attributes, connectors)?

If so, you need to report this directly to Sparx, so that the problem can be resolved. Please search my recent posts for a best practice on how to do this and keep us (the rest of the user community) in the loop.

In the meantime, try exporting via XMI 1.x. The older formats have been around (in EA that is) for some time, and have probably had the rough edges knocked off of them by now.

Please let us know if this workaround solves the problem. But, please also report the original bug regardless, and tell Sparx which versions (only 2.1 or also 1.x) of XMI it affects.

David
No, you can't have it!

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #4 on: September 07, 2007, 03:21:02 am »
Bug reported to Sparx Systems.

Actually, is version XMI1.x that is giving the import errors.

On some of the cases I got an export error using XMI2.1 version, I do not know if it is intirely related to the NoteLink duplicated IDs, because EA simply shutdowns.

It is another kind of error, though it could have a common cause.
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #5 on: September 07, 2007, 05:09:41 am »
Please keep us in the loop when you hear back from Sparx on this. I've got something coming up that this could disrupt.

David
No, you can't have it!

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #6 on: September 12, 2007, 07:17:06 am »
News from Sparx support on the 'XMI Import' bug:

It is no bug, or at least, not a generic bug. It has to do with the particular project file I am using as source.

Following support advice, I applied a 'Tools - Data Management - Project Integrity Check' and this revealed a lot of duplications and missing links within the project's note links. Those were corrected, but the generated XMI still gives duplicated IDs error!

Now, the better turn around to this problem, also from support, is to disable the 'Use DTD' check while exporting. This disables the parser and allows importing all the elements in the XMI (to the target project), at the cost of potential integrity problems, of course.

So, both hints should be used, uncheck 'Use DTD' and then apply a 'Project Integrity Check' on the target project.

The mistery that remains is what caused such errors to show in the original project?
No clue here, because I am not the author of such project. But those were the only errors existing in the project.
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XMI Package Import: Duplicate IDs
« Reply #7 on: September 12, 2007, 08:27:04 am »
Is it possible that the original project was created on a much older version of EA?

There have been some tweaks to XMI handling over the past couple of years. Perhaps the original project was corrupted to some extent, or had an outdated structure.

I'm just guessing, but it might be worth looking into.

David
No, you can't have it!