Servoy 6 service doesn't start local postgres

I installed servoy 6 on a win server 2008, checked the “install service”, changed the the service to automatic start, reboot the server, but
the service doesn’t start local postgres db.

This is how the service looks like:

C:\servoy6\application_server\service\wrapper.exe -s C:\servoy6\application_server\service\wrapper.conf

I tried to start up manualy with an edited servoy_server.bat :

rem @echo off
rem To start postgres add this to the next line:postgres_db\bin\pg_ctl start -D database -l postgres_db\postgres_log.txt
postgres_db\bin\pg_ctl start -D database -l postgres_db\postgres_log.txt
:restart
java -Djava.awt.headless=true -Xmx256m -Xms64m -XX:MaxPermSize=128m -classpath .;lib\compat141.jar;lib\commons-codec.jar;lib\commons-httpclient.jar;lib\activation.jar;lib\antlr.jar;lib\commons-collections.jar;lib\commons-dbcp.jar;lib\commons-fileupload.jar;lib\commons-io.jar;lib\commons-logging.jar;lib\commons-pool.jar;lib\dom4j.jar;lib\help.jar;lib\jabsorb.jar;lib\hibernate3.jar;lib\j2db.jar;lib\j2dbdev.jar;lib\BrowserLauncher2.jar;lib\js.jar;lib\jta.jar;lib\jug.jar;lib\log4j.jar;lib\mail.jar;lib\ohj-jewt.jar;lib\oracle_ice.jar;lib\server-bootstrap.jar;lib\servlet-api.jar;lib\wicket-calendar.jar;lib\wicket-extentions.jar;lib\wicket.jar;lib\slf4j-api.jar;lib\slf4j-log4j.jar;lib\joda-time.jar;lib\rmitnl.jar;lib\networktnl.jar com.servoy.j2db.server.main.ApplicationServer %1 %2 %3 %4 %5 %6 %7 %8 %9

rem restart if the server exited with the restart exit code 99
if %errorlevel%==99 goto restart

nothing happends !

When I start the servoy developer, the postgres starts up and works fine !

What can I do to make the servoy service running the postgres repository DB, because after restarting the 2008 server, I need servoy to be
ready, without manually starting up anything.
Thanke you for any help.

What I use to do is install postgreSQL with its installer and not from the Servoy one.

You can download it from http://www.enterprisedb.com/downloads/p … -downloads

Choose the right one (the right most)

That installer creates a service of postgreSQL.

Make sure you create the login roles that you used to with previuos versions of Servoy. For that pgAdmingIII can be helpful.

Then in the wrapper.conf of the Servoy service you can include the dependencies for it, have a look at the lines:

Service dependencies. Add dependencies as needed starting from 1

wrapper.ntservice.dependency.1=

Of course not installing the database with Servoy means that the repository is not going to be created so after having postgreSQL and Servoy installed you should create a database in postgre for it and a server instance in the servoy.properties file.

What I do is create a database in postgreSQL named servoy6_repository.
Edit the servoy.properties file to include at least one server instance with this:
ServerManager.numberOfServers=1
server.0.URL=jdbc:postgresql://localhost:5432/servoy6_repository
server.0.catalog=
server.0.connectionValidationType=0
server.0.driver=org.postgresql.Driver
server.0.enabled=true
server.0.maxConnectionsActive=10
server.0.maxConnectionsIdle=10
server.0.maxPreparedStatementsIdle=100
server.0.password=encrypted:XAFg2JKIdj0=
server.0.schema=
server.0.serverName=repository_server
server.0.skipSysTables=false
server.0.userName=DBA

Note the difference of the name in:
server.0.URL → Is the name of the DB you created in postgreSQL
and
server.0.serverName → Must be repository_server

This difference is really useful because you could have many repository servers for different Servoy installations I have one for Servoy5 and another for Servoy6

After having all this execute servoy_server.bat -upgradeRepository that will generate your repository.

Hope this helps.

Thank you, this is a great instruction, a very helpful possibility for workaround the problem. Before I try this way,
I just want to know why the straight an easy way ( just doubleclick the install an check the service ) simply doesn’t
work.

If I really migrate to servoy from an other developer, in a view times, I have to install many clients one by one…
best wishes

Solved. I updated to the newest version of Servoy 6, become aware of java.exe couldn’t be found by path-reasons. So the right start looks now like:

postgres_db\bin\pg_ctl start -D database -l postgres_db\postgres_log.txt
:restart
"C:\Program Files (x86)\Java\jre6\bin\java" -Djava.awt.headless=true -Xmx256m -Xms64m -XX:MaxPermSize=128m -classpath .;lib\compat141.jar;lib\commons-codec.jar;lib\commons-httpclient.jar;lib\activation.jar;lib\antlr.jar;lib\commons-collections.jar;lib\commons-dbcp.jar;lib\commons-fileupload.jar;lib\commons-io.jar;lib\commons-logging.jar;lib\commons-pool.jar;lib\dom4j.jar;lib\help.jar;lib\jabsorb.jar;lib\hibernate3.jar;lib\j2db.jar;lib\j2dbdev.jar;lib\BrowserLauncher2.jar;lib\js.jar;lib\jta.jar;lib\jug.jar;lib\log4j.jar;lib\mail.jar;lib\ohj-jewt.jar;lib\oracle_ice.jar;lib\server-bootstrap.jar;lib\servlet-api.jar;lib\wicket-calendar.jar;lib\wicket-extentions.jar;lib\wicket.jar;lib\slf4j-api.jar;lib\slf4j-log4j.jar;lib\joda-time.jar;lib\rmitnl.jar;lib\networktnl.jar com.servoy.j2db.server.main.ApplicationServer %1 %2 %3 %4 %5 %6 %7 %8 %9

rem restart if the server exited with the restart exit code 99
if %errorlevel%==99 goto restart

regards

Thank you, this is a great instruction, a very helpful possibility for workaround the problem. Before I try this way,
I just want to know why the straight an easy way ( just doubleclick the install an check the service ) simply doesn’t
work.

This is not a workaround: the current Installer operated under the assumption that in production environments, the database engine is installed and configured separately. Thus the “Service” component in the Installer is only for the Servoy Application Server. The bundled database is currently better suited as a database used for development only. Servoy has specific preferences to launch the database on startup of Servoy Developer and close it down again when Servoy Developer is exited.

We are however looking into improving the installation process and then mainly in the area of how the databases and database engine is bundled for the Servoy 6 release.

Paul

jasantana:
What I use to do is install postgreSQL with its installer and not from the Servoy one.

You can download it from http://www.enterprisedb.com/downloads/p … -downloads

Choose the right one (the right most)

That installer creates a service of postgreSQL.

Make sure you create the login roles that you used to with previuos versions of Servoy. For that pgAdmingIII can be helpful.

Then in the wrapper.conf of the Servoy service you can include the dependencies for it, have a look at the lines:

Service dependencies. Add dependencies as needed starting from 1

wrapper.ntservice.dependency.1=

Of course not installing the database with Servoy means that the repository is not going to be created so after having postgreSQL and Servoy installed you should create a database in postgre for it and a server instance in the servoy.properties file.

What I do is create a database in postgreSQL named servoy6_repository.
Edit the servoy.properties file to include at least one server instance with this:
ServerManager.numberOfServers=1
server.0.URL=jdbc:postgresql://localhost:5432/servoy6_repository
server.0.catalog=
server.0.connectionValidationType=0
server.0.driver=org.postgresql.Driver
server.0.enabled=true
server.0.maxConnectionsActive=10
server.0.maxConnectionsIdle=10
server.0.maxPreparedStatementsIdle=100
server.0.password=encrypted:XAFg2JKIdj0=
server.0.schema=
server.0.serverName=repository_server
server.0.skipSysTables=false
server.0.userName=DBA

Note the difference of the name in:
server.0.URL → Is the name of the DB you created in postgreSQL
and
server.0.serverName → Must be repository_server

This difference is really useful because you could have many repository servers for different Servoy installations I have one for Servoy5 and another for Servoy6

After having all this execute servoy_server.bat -upgradeRepository that will generate your repository.

Hope this helps.

A very nice explanation. Thank you!

Cheers,
Maria

maria:
A very nice explanation. Thank you!

Cheers,
Maria

You are welcome !! :wink:

Please note that in 6.0 the all-in-one installer supports installing PostgreSQL through the EnterpriseDB installer and that we have extended documentation on this:
http://wiki.servoy.com/display/DOCS/Dat … onnections
http://wiki.servoy.com/display/DOCS/Run … +a+service
http://wiki.servoy.com/display/tutorial … SQL+Primer

Paul

Thanks Paul