another 1.2->2.0b6 upgrade failure

This time my laptop, with repository in Postgresql.

Am i supposed to be doing anything other than an automated install of 2.0b6 over the existing install of 1.2?

Any smarter suggestions than re-installing 1.2, exporting all solutions, upgrading to 2.0b6, zapping the repository, re-creating teh repository and re-importing the solutions?

Thanks,
Neale.

Ah, found the problem. I’m running postgresql 7.2.1 (standard on Debian Woody (current stable)). The problem reported by Servoy when trying to upgrade the repository is:

com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: 
ERROR:  parser: parse error at or near ""

Not finding that very informative, we looked elsewhere, starting with postgresql query logging:

Mar 15 14:35:26 osprey postgres[15373]: [70] DEBUG:  query: alter table servoy_releases drop column release
Mar 15 14:35:26 osprey postgres[15373]: [71] ERROR:  parser: parse error at or near ""

Bingo! That’ll be because Postgresql 7.2 doesn’t support “ALTER TABLE DROP COLUMN”
See: http://www.postgresql.org/docs/7.2/stat … table.html

So, the precise question becomes: Is upgrading a repository in Postgresql 7.2.1 supported?

Thanks,
Neale.

In that case an auto upgrade won’t be possible. You will have to export your solutions, then drop all servoy_ tables and recreate the repository. As always make a full database backup before you start.

Ah, I see :-(

Perhaps I’ll get brave and check out a backport of a later postgresql.

To cover issues like this, would it be better if the autoupgrade checked out the versions of the DB driver and the DB server before attempting the upgrade? At least then meaningful error messages could be given.

Thanks,
Neale.

We would love to be able to catch and report each possible exception but with the huge amount of databases and drivers out there that’s simply undoable.

I wasn’t meaning to suggest “catch and report each possible exception” (as in every possible one) so much as to pick up “known gotchas” (and provide a brief but helpful message).

E.g. mysql driver too old, postgress DB server too old.

Thanks,
Neale.

Sigh, I upgraded postgresql and all was looking good till I tried the repository upgrade:

org.postgresql.util.PSQLException: ERROR: schema "servoy_releases" does not exist

I haven’t been able to get the offending/relevant SQL yet :-(

Any ideas? Is this supposed to work?

Neale.

A bit more info…

According to http://www.postgresql.org/docs/7.3/inte … chema.html this error can be due to:

ERROR: Schema "name" does not exist

This message occurs if the specified schema does not exist.

Perhaps the offending code is a ‘DROP SCHEMA “servoy_releases”’?

Indeed, my Servoy-1.2 repository doesn’t appear to have one of these:

neale_srs=# SELECT * FROM pg_namespace;
      nspname       | nspowner |                nspacl                 
--------------------+----------+---------------------------------------
 pg_toast           |        1 | 
 pg_temp_1          |        1 | 
 pg_catalog         |        1 | {postgres=U*C*/postgres,=U/postgres}
 public             |        1 | {postgres=U*C*/postgres,=UC/postgres}
 information_schema |        1 | {postgres=U*C*/postgres,=U/postgres}
(5 rows)

That help any?

Thanks,
Neale.

Hi,

This was a bug in the hibernate database engine that we use which will be fixed in the next release. Jan Blok can send you three replacement jars so you can continue (ask him via email), or you can wait until RC10, after which the issue is fixed as well.