another 1.2->2.0b6 upgrade failure

Questions and answers for all installation-related topics for Servoy products

another 1.2->2.0b6 upgrade failure

Postby Neale » Thu Mar 11, 2004 2:09 pm

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.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Neale » Mon Mar 15, 2004 6:58 am

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:
Code: Select all
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:

Code: Select all
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.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Jan Aleman » Mon Mar 15, 2004 11:12 am

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.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Neale » Tue Mar 16, 2004 1:38 pm

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.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Jan Aleman » Tue Mar 16, 2004 6:38 pm

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.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Neale » Wed Mar 17, 2004 12:43 am

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.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Neale » Wed Mar 17, 2004 8:06 am

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

Code: Select all
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.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby Neale » Thu Mar 18, 2004 6:32 am

A bit more info....

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

Code: Select all
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:

Code: Select all
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.
Neale
 
Posts: 230
Joined: Thu May 15, 2003 6:29 am
Location: Australia

Postby sebster » Sat Mar 20, 2004 3:12 pm

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.
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands


Return to Installation

Who is online

Users browsing this forum: No registered users and 19 guests