Book a Demo

Author Topic: PostgreSQL Repository connection  (Read 9163 times)

Rafael MM

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
PostgreSQL Repository connection
« on: September 10, 2008, 04:10:35 am »
Hi, I'm trying to use a PosgreSQL repository but EA shows an alert with the legend

'Enterprise Architect has experienced a network error and will close down'

and shuts down afterwards.

There is no log anywhere even though the checkbox Logfile is enabled.

I've already defined a ODBC Datasource to my DB and runned the base model script. The button Test Connection returns 'success' and I can connect to the DB using the ODBC-JDBC Bridge without problems. This seems odd as a previous exercise with MySql concluded without anomalies.

Has anybody encountered this kind of problem?

I'm running with this specs:

EA 7.1.832
WinXP SP3
PostgreSQL 8.3
- Previous test with MySQL 5.0.51b

Thanks in advance
Rafael Mtz M

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PostgreSQL Repository connection
« Reply #1 on: September 10, 2008, 04:23:54 am »
Hi Rafael,

Just guessing here, but...

EA in general, and with PostgreSQL in specific, can be sensitive to driver versions. Are you using a (very) recent driver to connect? Are you using the standard Windows client? [Nothing against the MS clients, but they are (meant to be) very generic, and not updated often; you're usually better off using a client supplied by the DBMS provider.] Just connecting to the data set is not always enough (although connectivity is of course necessary).

Have you tried this with a newly-built project? [An empty one.] Have you remembered to do a data transfer from a 'seed' project before trying to open the repository? Yes, I know that's really obvious, but I've forgotten this step after not using a new repository for some time. [Twice!]

When was the last time you downloaded the DBMS generation script? I've previously run into problems when my script was out of date. In my case it was the SQL Server script, but the effect would be the same. Even though a (quick) inspection did not turn up any obvious differences, I simply could not make a repository generated with the 'old' script work. The error messages were totally meaningless, but a new script solved the problem instantly.

Finally, is there any chance that network credentials are the problem? I have sometimes found it difficult to get EA to log on when I need to supply non-default credentials - to the database server - during connection. In almost all cases a bit of 'fiddling' has solved the problem. [In the remaining case we never did get it worked out, and changed servers until we could connect. That was a brute force solution in an organization that had the luxury of many data servers; we could probably have worked it out if we'd had the time.] In all cases the error messages were not helpful, though I doubt that was all the fault of EA.

Not much to go on I know, but perhaps this will give you some ideas.

David
No, you can't have it!

Rafael MM

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: PostgreSQL Repository connection
« Reply #2 on: September 10, 2008, 06:56:42 am »
Thanks, perhaps I should have explained a little more how I did the connectivity test.

The database and the instance of EA are on the same machine so there should be no networking issues.

Also the ODBC driver is the one distributed with PostgreSQL installer.

The scripts I'm using were downloaded today (2008/09/09)

ClientDatasourceDatabase
EAPostgreSQL ODBC Driver 8.03.02PostgreSQL DB
SQuirreLJDBC-ODBC Bridge -> PostgreSQL ODBC Driver 8.03.02PostgreSQL DB

The DDL script for base model was run with pgAdmin III so it was with the native client; therefore I tried to use the JDBC ODBC bridge with SQuirreL to test the ODBC Datasource. From there I could browse all the database objects without problems.

What I was trying to do was to transfer Sample.eap to the DB repo and document the steps involved for internal use, but if this kind of issues are no so rare with PostgreSQL perhaps I will stick to MySQL for RDMS repository, anyway I'll fiddle around with connection parameters.

Thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PostgreSQL Repository connection
« Reply #3 on: September 10, 2008, 08:53:41 am »
I cannot say for sure if these things are "not so rare" so please don't give up yet.

I suggest you search the forum, particularly for the JDBC component and SQuirrel.

Beyond that, all I can suggest is a message to Sparx Support. Perhaps they can provide some insight.

David
No, you can't have it!

Rafael MM

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: PostgreSQL Repository connection
« Reply #4 on: September 10, 2008, 09:14:18 am »
I'm still doing some testsm here is the last update.

Connecting EA to PostgresSQL using PostgreSQL ODBC driver became posible after enabling the following parameters on the ODBC Datasource Admin.

Tracing (spanish:  Trazas) -> Start trace (Iniciar traza ahora)
and
Checkbox: General trace for all user identities (traza general de equipos para todas las entidades)

This sends ALL events to a filelog seriously downgrading performance (SERIOUSLY), but it did connect and transfered the EAPSample.eap to PostgreSQL.

Then if I stop tracing, EA refuses to do anything more and exits, I'll do a couple more tests and perhaps send a message to Sparx support as sugested, though I'm leaning strongly to MySQL.

Thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PostgreSQL Repository connection
« Reply #5 on: September 10, 2008, 08:57:00 pm »
Rafael,

Well, at least you can connect...

I agree with you that performance with tracing on is definitely not something you could tolerate in production. For limited testing it might be OK, temporarily.

Please send a report to Sparx. If they don't know about these things they cannot (even try to) resolve them.

Have you tried this with a non-Spanish PostgreSQL client? Perhaps it is a problem with that particular language in the client. If so, you might be able to use a different release of the Spanish client and sidestep the problem. Of course, if there is such an issue, the PostgreSQL people might or might not have seen it yet. You should check out their release notes and such. If changing the language of the client works you should submit a report to the vendor (or developer if different) of the Spanish client software.

David
No, you can't have it!

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: PostgreSQL Repository connection
« Reply #6 on: October 15, 2008, 10:53:22 pm »
Hi All!

I am not sure the problem I am having is due to the connection or to other configuration. Anyhow, this is what I have done:

1. Created an empty database into PostgreSQL v8.3, with native pSQL command line;
2. Connect to this database and run the script from Sparx, named 'Postgres_BaseModel.sql'. I assume it is the latest;
3. Check that the empty database is created in PgAdminIII. It has a total of 98 tables, 19 sequences and 1 domain;
4. Create an ODBC connection to this database, with the psqlODBC driver v8.03 supplied by Postgres. I am using PostgreSQL Unicode, once the database was created with UTF8 encoding (is this OK?);
5. Configure the Project Transfer in EA (v7.1) so it will load data from an existent EAP file to the PostgreSQL empty database. The connection test is successfull :)
6. Now, the transfer starts, but when reaching t_image I got an 'abnormal program termination' and EA suffers a CTD...  :(

Looking into the database with PgAdminIII (after the crash), I see it is really partly loaded with data.

I have the EAP file on a local network drive (not shared) and the PostgreSQL server on my machine (localhost).

My PC has the Windows XP Pro with SP3 in English-US language.

Any hints / alternatives to get the Repository into PostgresSQL?


Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PostgreSQL Repository connection
« Reply #7 on: October 15, 2008, 11:02:33 pm »
Have you sent the report to Sparx yet?
No, you can't have it!

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: PostgreSQL Repository connection
« Reply #8 on: October 15, 2008, 11:43:18 pm »
Now I have send it...

For the moment I will continue to work on EAP repository, but the intention is to setup a DBMS repository with version control from Subversion SVN...  A long way to go, it seems.
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft

JPHespanha

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • et pluribus unum
    • View Profile
Re: PostgreSQL Repository connection
« Reply #9 on: October 17, 2008, 10:59:01 pm »
Well, after getting a helping hand from Sparx support, here is an alternative way that is working (after testing with a not so complex project  ;)):

(first steps should go as previously described and according EA Help.
 This includes steps up to configuring the ODBC connection.)

1. Create an empty model with an empty package, as a EAP file;
2. Transfer this empty model into the PostgreSQL repository, with Project Transfer;
3. Load the source EAP file and export every package to a XMI file;
4. Connect again to the PostgreSQL repository and import each XMI file into the (empty) Model;

et voilá, c'est fini!

I hope that I am not returning to this section of the Forum with some issues concerning my next step: the setting up of a SVN version control!  ;D

Regards,
JP Hespanha
Joao Paulo Hespanha
OTB Research Institute
Technical University Delft