Bug #60357 Cannot open EER model - Error unserializing GRT data
Submitted: 6 Mar 2011 3:36 Modified: 9 Mar 2011 0:13
Reporter: Lukasz Kurlit Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.2.32 CE OS:Windows (Vista)
Assigned to: CPU Architecture:Any
Tags: but got db.mysql.Column, Error unserializing GRT data

[6 Mar 2011 3:36] Lukasz Kurlit
Description:
Hello,

I cannot open saved EER model. I'm getting the following error message:

[Window Title]
MySQL Workbench

[Main Instruction]
Cannot open document 'path\model.mwb'.

[Content]
Error unserializing GRT data
Type mismatch: expected object of type db.mysql.IndexColumn, but got db.mysql.Column

Please help.

Bst regards:
Lukasz

How to repeat:
The only option to repeat is to take my file but I cannot see any possibility to upload it. If there is such an option please advice how to do that and I will upload it.
[6 Mar 2011 3:39] Lukasz Kurlit
I found the way to upload the file after save of my initial message. File uploaded.

BR:
Lukasz
[8 Mar 2011 13:58] ŁUKASZ RUTKOWSKI
Hi, I have the same problem with my new model.
OS: Windows XP, MySQL Workbench 5.2.32 CE
[8 Mar 2011 14:06] ŁUKASZ RUTKOWSKI
It is a new issue or it's an old Bug #44227?
[8 Mar 2011 15:00] Alfredo Kojima
How did you create teh model? Can you provide some steps to create a model that has the problem?
[8 Mar 2011 15:32] ŁUKASZ RUTKOWSKI
I don't have any screen or drop from that model. I could reproduce it later so i could upload it and check steps for error if accours.
[9 Mar 2011 0:13] Alfredo Kojima
duplicate of bug #60369
[10 Mar 2011 14:51] Jeffrey Mather
Same issue here.  Seems as though joins/FK's/table changes developed in the diagram don't save, and if an error is made you loose everything next time you try to access the EER.
[15 Mar 2011 9:35] Mathias Greipl
I have the same problem. The last thing I done, was renaming the database. 
Is there a way to recover the data?
[20 Mar 2011 12:31] Mary Ann Costanzo
I have the same issue -- after adding many-to-many relationship between two tables (which of course required automatic generation of the foreign keys) and after renaming the table that implemented the many-to-many relationship, I saved the database and closed MySQL Workbench.  When I brought up MySQL WorkBench again and tried to open the database, I got the error:

"Error unserializing GRT data. Type mismatch: expected object of type db.mysql.Column, but got workbench.physical.TableFigure".

I am using MySQL Workbench 5.2.33 CE, Revision 7506 on Windows XP.
Is there some corrective action which will allow me to recover the database and data model???
[21 Mar 2011 6:45] sean song
I still have the issue after I installed the lastest version 5.2.33 CE on Windows XP . Is anyone can help? thanks.
[21 Mar 2011 6:45] sean song
I still have the issue after I installed the lastest version 5.2.33 CE on Windows XP . Is anyone can help? thanks.
[21 Mar 2011 7:54] Chris Cooper
Hi I have the same issue.  
Using latest version 5.2.33 CE. 
I have a model I was working on last week and today it won't open.

I had this problem a last week and upgrade from 32 to 33 fixed it.  
But now the problem is there using the v33.

I just tried a reinstall of v33.  Still same problem - it will not open my model file.

Full message:
Cannot open document
'C:\.... .mwb'

Error unserializing GRT data
Type mismatch: expected object of type
db.mysql.ForeignKey, but go db.msql.Column

Perhaps related to this is that I have been working on foreign keys and had found one foreign key in my database model which needed to be reversed (ie the reference was backwards).  But I cannot remember if that was a change in the last time I opened the file.

Regards
Chris
[21 Mar 2011 8:08] Chris Cooper
File which cannot be opened - possible foreign keys mixed up.

Attachment: TestModel1.mwb (application/x-zip-compressed, text), 5.83 KiB.

[21 Mar 2011 8:14] Chris Cooper
Hi there - 
I have a file which demonstrates the problem in very basic form.

Table1 and Table2 - (How creative eh?)
Added two references from Table2 back to Table1

Set up 
to display captions.
to display connections to columns.

Saved file.
Closed file.
Reopened.
Noticed that one of the fk links wasn't displaying however the CAPTION was displaying.  (could be 2 bugs here)
Re-Added the link - and it now displayed.
Saved file
Closed file.
Re-opened ... and it didn't!  
The error showed that the fk link seemed to find a connection instead.

My guess is that foreign keys aren't being tracked properly.

have fun!
Chris

Noticed
[21 Mar 2011 8:23] Chris Cooper
This is a backup file that still works!

Attachment: TestModel1bak.mwb (application/x-zip-compressed, text), 5.65 KiB.

[22 Mar 2011 7:39] Bernd Wittler
I have the same problem. And can correct it by hand.
If you open the *mwb file with a zip program like 7zip you can see that in the file "document.mwb.xml" ids are not unique.
You can:
1) analyse the error message and search for the not working id (the struct-name must be the same for all id's, than it's correct, else it's wrong)
2) change the not working id to another one. Than it works. But be carefull. You must also correct all 'correct', links, if they exist, to that corrected id. 

For the bug fixers I think the question is, why the ID in that file is not unique.
[22 Mar 2011 10:36] Chris Cooper
Bernd,

Thanks for that - it seemed to work for me too.  There was the same id on the struct-name for one db.mySQL.ForeignKey and one workbench.physical.connection entries in the first test file.  

I just changed the last character or so in the workbench.physical.connection. I suspect that I had deleted this connection but the software didn't clean-up the entry before writing to the .xml.

(I just changed the filename to xxx.zip, did the edit, then back).

So - you've shown how to identify the problem in a TINY file (2 tables, 4 columns, and 2 or 3 connections) = (only 60kB).

Now I have to solve the problem in a file with 1MB and dozens of tables and connections!  I'm hoping someone else comes up with a more automatic solution!

Regards
Chris
[23 Mar 2011 1:23] sean song
hi Bernd and Chris,

I downloaded and installed the lastest version 5.2.33b and it works now. FYI.
[23 Mar 2011 16:03] Chris Cooper
Hi Sean,

Thanks for the tip.  back up and running ... for now! I hope this solves the problem.

Regards
Chris
[19 Apr 2011 0:58] Peter Sayers
5.2.33b solved it for me too. Whew! Thanks for the info, folks.
[21 Apr 2011 19:35] afam mifar
Hi ,

i'm using workbench 5.2.33ce in windows 7,64 bit computer,
i got the same problem.i couldn't open my eer diagram.
Anyone help me please,

thanks