Postgress and new install repository

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

Postgress and new install repository

Postby IT2Be » Wed Nov 30, 2016 1:15 am

So, I wanted to clean up my developer installations and decided to install only one instance of postgress with a database per developer instance underneath.

OS X 10.12.1
Java 1.8.0_65
Servoy version 6.0.11, 6.1.6, 7.4.8 and 8.1.0 (all the same result)
Postgres version 9.6.1

This was a completely clean install of Postgress as well as the four Servoy installations.
After the first time this failed I re-installed everything again.
The databases and schemas were created manually before running the script.

At first run with './servoy_server.sh -upgradeRepository &' this is the message in the log file:
Code: Select all
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Upgrading repository.
Error upgrading repository: com.servoy.j2db.persistence.RepositoryException: org.postgresql.util.PSQLException: ERROR: relation "servoy_repository.servoy_elements" does not exist

Then when doing the same a second time this is in the log file:
Code: Select all
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Upgrading repository.
Error upgrading repository: com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: org.postgresql.util.PSQLException: ERROR: relation "servoy_content_spec" already exists


Anybody any idea?
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Postgress and new install repository

Postby steve1376656734 » Thu Dec 01, 2016 4:21 pm

Hi Marcel,

When you install the different developer instances have you made a separate servoy_repository database for each instance? I usually use the following procedure to install each developer instance:

  1. Set up a DB with the default name (servoy_repository)
  2. install the developer version you need
  3. Run the repository upgrade
  4. Close all developer instances
  5. Use pgAdmin to rename the DB servoy_repository_vX.X.X according to the developer version that will be accessing it
  6. Edit the servoy.properties file for the developer instance and change the server URL to point to the renamed DB (e.g. server.0.URL=jdbc\:postgresql\://localhost\:5432/servoy_repository_v8.1.0)
This ensures that each instance has the correct repository version and they don't interfere with each other.

Hope this helps
Steve
Steve
SAN Developer
steve1376656734
 
Posts: 177
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: Postgress and new install repository

Postby IT2Be » Thu Dec 01, 2016 4:45 pm

So, from what you write I understand that you make just one database, name it servoy_repository and run the upgrade script without changing the database connections at first run (an unmodified, clean properties file).
Do I interpret that correct?

If so I will try that...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Postgress and new install repository

Postby steve1376656734 » Thu Dec 01, 2016 4:51 pm

Yes - but as soon as the upgrade is run I then rename the DB and change the properties file. This has to be done before trying to install the next developer instance. In your case you will then end up with 4 repository database (one for each developer instance) and all will be named according to the version the work with.
Steve
SAN Developer
steve1376656734
 
Posts: 177
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: Postgress and new install repository

Postby IT2Be » Thu Dec 01, 2016 5:15 pm

No fun either Steve :(

I remember having read something about the latest version of PG somewhere though.

Maybe it has something to do with that?
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4763
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Postgress and new install repository

Postby steve1376656734 » Thu Dec 01, 2016 5:42 pm

Not sure about the PG version. I am currently running 9.4 as I use a tool to synchronise data between DBs that won't work with 9.5 or 9.6. Waiting for the company to release an update.

Hope you get things resolved soon.
Steve
SAN Developer
steve1376656734
 
Posts: 177
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: Postgress and new install repository

Postby ROCLASI » Thu Jan 05, 2017 1:02 pm

Hi Marcel,

IT2Be wrote:
Code: Select all
Upgrading repository.
Error upgrading repository: com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: org.postgresql.util.PSQLException: ERROR: relation "servoy_content_spec" already exists


Anybody any idea?


PostgreSQL 9.6 made a change in it's catalog and Servoy queries that directly when doing the -upgradeRepository. So it fails and stops after creating 10 of the 14 tables leaving your repository crippled.
I haven't tested it but my guess is that it will also affect any upgrading of existing repositories.
I filled a bug report in Jira, you can add your vote to it.

So for now I suggest you use PostgreSQL up to version 9.5.x for your Servoy repository.


UPDATE: turns out that it's the JDBC driver. After installing the latest version from the PostgreSQL JDBC driver site it works.
Be aware that the Java version is important in what version you have to download.
If you are using the 1.6 then you should use the JDBC4 version. If you are using 1.7 then you should use the JDBC41 version. If you are using 1.8 then you should use the JDBC42 version.


Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5205
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests