Author Topic: EAPX file too corrupted to open - and how we got it back  (Read 5621 times)

HLidstrom

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
EAPX file too corrupted to open - and how we got it back
« on: November 26, 2019, 11:33:49 pm »
A weird error occurred yesterday and since I couldn’t find anything about it, I want to write down what happened and how it was fixed.

In essence, if an EAPX file is so corrupted Sparx EA can’t open it, try open it with MS Access.


I had been happily modeling for a few hours in our shared EAPX file on a network drive. Let’s call the file our_model.eapx.  Then a coworker also tried to open it.
She got this error message. (Text copied from the dialog box.)

---------------------------
Enterprise Architect
---------------------------
An Error has occurred: Unrecognized database format 'K:\SparxModels\our_model.eapx'.

To enable Jet 4, go to Start | Preferences | Use JET 4.0, restart EA.
---------------------------
[ OK ]
---------------------------


Strange! Jet 4 was the default at install and she had knowingly not changed that.

I was still able to work in the model.

To be sure my coworker launched Sparx EA without opening a model and checked that Jet 4 was still enabled. It was.
She tried to open the model file again, same error.
I asked another coworker to open the model and he got the same error.

I ran a project integrity check and it reported no errors.

I saved my edits and closed Sparx EA, then tried to open again.
Now I too got the error!

Now what? Internet searches return nothing useful. Panic! What to do?

What the heck? It’s an access database. What happens if I open it with MS Access? (Nothing much to lose.)

MS Access shows a message that the file is corrupted and offers to repair it. I take the offer. MS Access churns for a minute or two and opens the file. I immediately close MS Access and tries Sparx EA.
Lo and behold. It works! And as far as I can see, all my recent edits are there.

(The MS Access dialog box did not support copy-paste the way a well written Windows application should and it was rather long so I do not show it here.)

I hope this will be helpful to someone else at some time.
 - Håkan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EAPX file too corrupted to open - and how we got it back
« Reply #1 on: November 26, 2019, 11:41:10 pm »
Have you tried the repair option?
Configure | Model | Integrity | Manage .EAP/.EAPX file | Repair .EAP/.EAPX file

Also, don't use .eap files on a shared drive, and make backups! (but you already know that by now)

Geert

HLidstrom

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: EAPX file too corrupted to open - and how we got it back
« Reply #2 on: November 27, 2019, 03:32:00 am »
We're working on it but we have to live with the shared drive for a while yet.

And yes we take daily backups, after running the integrity test. I cannot stress how important that is.
Thanks,
- Håkan