NEED HELP – Not been able to start Servoy Server 6.1.x

NEED HELP – I have NOT been able to start Servoy Server 6.1.0 or 6.1.2 in Windows 2003.

Please help. This is URGENT.

I have tried various possible configurations/installations.

The one that I am posting here, and I’d like to get working, is the Servoy installation with the bundled PostgreSQL database option.

The installation goes well, but when I start Servoy from the Start menu…

[attachment=1]start_1.GIF[/attachment]

But then Servoy server terminal windows opens and close. The error that is stored in the servoy_log.txt file is this:

2012-09-09 01:24:58,078 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository:  [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
	at com.servoy.j2db.server.Za.Za.Zb(Za.java:34)
	at com.servoy.j2db.server.Za.Za.<init>(Za.java:1684)
	at com.servoy.j2db.server.Za.Za.<init>(Za.java:706)
	at com.servoy.j2db.server.Za.Zo.Za(Zo.java:8)
	at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:686)
Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
	at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
	at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
	at org.postgresql.Driver.makeConnection(Driver.java:393)
	at org.postgresql.Driver.connect(Driver.java:267)
	at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
	at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:5)
	at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.servoy.j2db.datasource.Za.getConnection(Za.java:14)
	at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:34)
	at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1272)
	at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:644)
	at com.servoy.j2db.server.Za.Za.Zb(Za.java:1625)
	... 4 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at org.postgresql.core.PGStream.<init>(PGStream.java:62)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
	... 21 more
2012-09-09 01:24:58,078 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]

Then, I tried to start from the command line using ‘servoy_server.bat –upgradeRepository,’ but I get this…

[attachment=2]start_2.GIF[/attachment]

See the error log with the added lines at the bottom here…

2012-09-09 01:24:58,078 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository:  [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
	at com.servoy.j2db.server.Za.Za.Zb(Za.java:34)
	at com.servoy.j2db.server.Za.Za.<init>(Za.java:1684)
	at com.servoy.j2db.server.Za.Za.<init>(Za.java:706)
	at com.servoy.j2db.server.Za.Zo.Za(Zo.java:8)
	at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:686)
Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
	at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
	at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
	at org.postgresql.Driver.makeConnection(Driver.java:393)
	at org.postgresql.Driver.connect(Driver.java:267)
	at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
	at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:5)
	at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.servoy.j2db.datasource.Za.getConnection(Za.java:14)
	at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:34)
	at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1272)
	at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:644)
	at com.servoy.j2db.server.Za.Za.Zb(Za.java:1625)
	... 4 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at org.postgresql.core.PGStream.<init>(PGStream.java:62)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
	... 21 more
2012-09-09 01:24:58,078 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]
2012-09-09 01:27:24,216 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag. [ ]

The I modified the servoy_server.bat file adding this line (as suggested in the same .bat file):

postgres_db\bin\pg_ctl start -D database -l postgres_db\postgres_log.txt

Still nothing! It says that the process cannot be accessed because the file is being used…. See here:

[attachment=0]start_3.GIF[/attachment]

The entire error log is below. Please note the added lines at the bottom don;t say much (Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag)

2012-09-09 01:24:58,078 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository:  [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
	at com.servoy.j2db.server.Za.Za.Zb(Za.java:34)
	at com.servoy.j2db.server.Za.Za.<init>(Za.java:1684)
	at com.servoy.j2db.server.Za.Za.<init>(Za.java:706)
	at com.servoy.j2db.server.Za.Zo.Za(Zo.java:8)
	at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:686)
Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
	at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
	at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
	at org.postgresql.Driver.makeConnection(Driver.java:393)
	at org.postgresql.Driver.connect(Driver.java:267)
	at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
	at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:5)
	at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
	at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
	at com.servoy.j2db.datasource.Za.getConnection(Za.java:14)
	at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:34)
	at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1272)
	at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:644)
	at com.servoy.j2db.server.Za.Za.Zb(Za.java:1625)
	... 4 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at org.postgresql.core.PGStream.<init>(PGStream.java:62)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
	... 21 more
2012-09-09 01:24:58,078 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]
2012-09-09 01:27:24,216 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag. [ ]
2012-09-09 01:28:24,246 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag. [ ]

Same thing happen if I use MySQL instead of the bundled PostgreSQL (of course, configuring the properties file/repository_server/using the correct driver, etc.)

Now, the only way I can get Servoy Server working is when after installing Developer I start Developer. Only then, Servoy server works. If I close Developer and I try to start just Servoy Server from the command line (and of course after modifying the .bat file to start PostgreSQL), Servoy does not work. Same happens!

Any help will be appreciated.

Thank you VERY MUCH in advance, Carlos

start_3.GIF

start_2.GIF

Try to stop your firewall or antivirus, stop the Servoy server and upgrade the repository with servoy_server.bat -upgradeRepository

logicimpresa:
Try to stop your firewall or antivirus, stop the Servoy server and upgrade the repository with servoy_server.bat -upgradeRepository

Gianluca, thank you very much. I did exactly as you suggested*, but this not solved the problem. See below:

[attachment=0]Capture.GIF[/attachment]

Any other idea? Again, thanks a bunch!

  • [I really needed to stop the Servoy server because I have not been able to start it up]

While reading again Servoy Documentation, I read a comment from Ron van der Burg. He wrote:

"When installing on a server make sure you create the installation directory first and apply the correct (full) rigths first.
When installing on a server and you want the database started by the same bat or sh file as Servoy you can edit the bat or sh file and uncomment the line to startup PostgreSQL."

I’ve done what he advised in the second paragraph, but not what he recommended in the first paragraph. I didn’t even think about it because I’be been using the .exe installation file and letting the installer to select the location of Servoy directory/folder.

I’ll try anyway. Hopefully it works, but seriously I have run every time the .exe installer while having off the firewall.

If any one has something to say, please do so.

Thank you very much!
Carlos

Servoyans,

I have done everything following the documentations. It’s perhaps an issue in my Windows 2003 machine, but I do not see how, specially because I installed in the same machine Servoy 5.1.x without problem -and using MySQL as the repository.

Please, I need help here. I am supposed to show case Servoy this afternoon.

My machine:

Windows Server 2003 Service Pack 2 - 64-bit
java version “1.6.0_35”
Java™ SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot™ Client VM (build 20.10-b01, mixed mode, sharing)

Installation:

  • Servoy 6.1.2 using servoy_installer.exe
  • Option: Servoy Server installation with the bundled PostgreSQL database
  • Creating installation directory first and applying the correct (full) rigths

Starting Server

  • Editing the .bat file and un-commenting the line to startup PostgreSQL. The use .bat file code is here:
@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

setlocal
if "%CMD_LINE_CHANGED%"=="" set CMD_LINE_START=java

:restart
%CMD_LINE_START% -Djava.awt.headless=true -Xmx1280m -Xms64m -XX:MaxPermSize=128m -classpath .;lib\activation.jar;lib\antlr.jar;lib\apache-mime4j.jar;lib\BrowserLauncher2.jar;lib\commons-codec.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\hibernate3.jar;lib\httpclient.jar;lib\httpclient-cache.jar;lib\httpcore.jar;lib\httpmime.jar;lib\j2db.jar;lib\j2dbdev.jar;lib\jabsorb.jar;lib\xstream.jar;lib\javassist.jar;lib\jcifs.jar;lib\joda-time.jar;lib\js.jar;lib\jta.jar;lib\jug.jar;lib\log4j.jar;lib\mail.jar;lib\MRJAdapter.jar;lib\networktnl.jar;lib\rmitnl.jar;lib\server-bootstrap.jar;lib\servlet-api.jar;lib\slf4j-api.jar;lib\slf4j-log4j.jar;lib\wicket.jar;lib\wicket-calendar.jar;lib\wicket-extentions.jar;lib\wiquery.jar;lib\fs-parser.jar;lib\fs-commons.jar;lib\minis.jar;lib\PBKDF2.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
if NOT "%ADDITIONAL_RESTART_LEVEL%"=="" if %errorlevel%==%ADDITIONAL_RESTART_LEVEL% goto restart
endlocal
  • Starting Servoy with -upgradeRepository flag:

C:\Servoy\application_server>servoy_server.bat -upgradeRepository

Still, can’t get Servoy started!

See the errors…

[attachment=0]Capture.GIF[/attachment]

servoy_log.txt file:

2012-09-10 06:16:18,617 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.
2012-09-10 06:16:29,242 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.

Also trying MySQL as the repository

servoy.properties

# Servoy properties file
# NOTE: At least one connection must be called 'repository_server' !!

# Number of servers defined in this file
ServerManager.numberOfServers=1

# Definition 1
server.0.serverName=repository_server
server.0.URL=jdbc\:mysql\://localhost/srms_repository
server.0.driver=com.mysql.jdbc.Driver
server.0.userName=srms
server.0.password=password
server.0.schema=<none>
server.0.catalog=<none>

#start database engine
waitForNativeStartup=false

#for use by pdf_forms plugin
pdf_forms_plugin_servername=pdf_forms

#network config
SocketFactory.useTwoWaySocket=true
SocketFactory.useSSL=true
java.rmi.server.hostname=127.0.0.1
servoy.rmiStartPort=1099
servoy.application_server.startRepositoryAsTeamProvider=false

Or I sued on the URL line: server.0.URL=jdbc:mysql://localhost/srms_repository

  • Starting Servoy with -upgradeRepository flag:

C:\Servoy\application_server>servoy_server.bat -upgradeRepository

Still, can’t get Servoy started!

Error:

2012-09-10 06:49:00,269 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.
2012-09-10 06:49:08,238 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.

Please help!

Carlos

Hi Carlos,

Did you install Servoy inside the applications directory or somewhere else. The latter is recommended due to permission issues. Usually C:\Servoy will do (or another drive).
Your first post suggests that PostgreSQL wasn’t running. This can be due to the fact that the database cluster wasn’t initialized properly due to said permission issues.

In your last post you try to make Servoy connect to MySQL. Is MySQL running ? And does the srms user have access from this IP/hostname to the srms_repository database? Also has the srms user the proper permissions to create database objects?

Hope this helps.

ROCLASI:
Did you install Servoy inside the applications directory or somewhere else. The latter is recommended due to permission issues. Usually C:\Servoy will do (or another drive).
Your first post suggests that PostgreSQL wasn’t running. This can be due to the fact that the database cluster wasn’t initialized properly due to said permission issues.

I installed Servoy in C:\Servoy every time. I also tried the installation by turning off Windows Firewall.

As I mentioned, I installed Servoy Server with the bundled PostgreSQL database (in various of the many tries). I also edited the servoy_server.bat file and un-commenting the line to startup PostgreSQL, and I tried servoy_server.bat -upgradeRepository.

This did not work.

ROCLASI:
In your last post you try to make Servoy connect to MySQL. Is MySQL running ? And does the srms user have access from this IP/hostname to the srms_repository database? Also has the srms user the proper permissions to create database objects?

Yes, MySQL is running. The user (srms) has grant privileges on the server - same privileges as root. To double-check, I just log-in into MySQL with srms and create and drop a database with no problems.

I think is Windows 2003 giving me a problem, but no one in the Law School see anything wrong with my Windows machine. It might have to do with PostgreSQL. It was installed in this machine before, and I removed a long ago using the Windows “Add or Remove Programs” utility and not the uninstaller from EnterpriseDB.

Any other idea?

Rob, I really appreciate your help on this. Thank you for replying to this post.

Best, Carlos

jcarlos:
I installed Servoy in C:\Servoy every time. I also tried the installation by turning off Windows Firewall.

Ah yes, I see it in your screenshots now.
But do you have anything in your database directory though. It should have a host of subdirectories and some config files. If not then your database cluster was never initialized and PostgreSQL will NOT run.

ROCLASI:

jcarlos:
I installed Servoy in C:\Servoy every time. I also tried the installation by turning off Windows Firewall.

Ah yes, I see it in your screenshots now.
But do you have anything in your database directory though. It should have a host of subdirectories and some config files. If not then your database cluster was never initialized and PostgreSQL will NOT run.

I just performed a clean installation again of Servoy Server with the bundled PostgreSQL database. See these screenshots :

[attachment=2]Capture.GIF[/attachment]
[attachment=1]Capture2.GIF[/attachment]
[attachment=0]Capture3.GIF[/attachment]

However,it just occur to me to look into the postgres_log.txt file…

LOG:  database system was shut down at 2012-09-10 11:15:08 PDT
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
FATAL:  role "scac-team" does not exist
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down

What does the line FATAL: role “scac-team” does not exist mean? Could this be the problem?

scac-team is the administrator user of this computer.

Thanks a bunch Rob!

Carlos

i think you are starting it twice. i see you also have installed the service
And you try to start it through the command line.

So is the service started?

jcompagner:
i think you are starting it twice. i see you also have installed the service
And you try to start it through the command line.

So is the service started?

Hi Johan,

The service was not started. I have installed Servoy with or without the service trying to get Servoy server working. Most of the time I have installed it without the service.

While replying to you comments, I am installing everything (clean installation again of Servoy Server with the bundled PostgreSQL database). This time without the service. See below:

application_server directories and files:

[attachment=2]Capture.GIF[/attachment]

Directory of C:\Servoy\application_server

09/11/2012  05:30 AM    <DIR>          .
09/11/2012  05:30 AM    <DIR>          ..
09/11/2012  05:30 AM    <DIR>          .extensions
09/11/2012  05:30 AM    <DIR>          beans
09/11/2012  05:30 AM    <DIR>          database
09/11/2012  05:30 AM    <DIR>          docs
09/11/2012  05:30 AM    <DIR>          drivers
09/11/2012  05:30 AM    <DIR>          lafs
09/11/2012  05:30 AM    <DIR>          lib
09/11/2012  05:30 AM    <DIR>          plugins
09/11/2012  05:30 AM    <DIR>          postgres_db
09/11/2012  05:30 AM    <DIR>          server
09/11/2012  05:30 AM               759 servoy.properties
09/11/2012  05:33 AM             1,399 servoy_server.bat
09/11/2012  05:30 AM    <DIR>          terracotta
               2 File(s)          2,158 bytes
              13 Dir(s)  136,618,471,424 bytes free

This is what is in the database directory:

Directory of C:\Servoy\application_server\database

09/11/2012  05:30 AM    <DIR>          .
09/11/2012  05:30 AM    <DIR>          ..
09/11/2012  05:30 AM    <DIR>          base
09/11/2012  05:30 AM    <DIR>          global
09/11/2012  05:30 AM    <DIR>          pg_clog
09/11/2012  05:30 AM             4,363 pg_hba.conf
09/11/2012  05:30 AM             1,678 pg_ident.conf
09/11/2012  05:30 AM    <DIR>          pg_multixact
09/11/2012  05:30 AM    <DIR>          pg_notify
09/11/2012  05:30 AM    <DIR>          pg_serial
09/11/2012  05:30 AM    <DIR>          pg_stat_tmp
09/11/2012  05:30 AM    <DIR>          pg_subtrans
09/11/2012  05:30 AM    <DIR>          pg_tblspc
09/11/2012  05:30 AM    <DIR>          pg_twophase
09/11/2012  05:30 AM                 4 PG_VERSION
09/11/2012  05:30 AM    <DIR>          pg_xlog
09/11/2012  05:30 AM            19,785 postgresql.conf
09/11/2012  05:30 AM               116 postmaster.opts
               5 File(s)         25,946 bytes
              13 Dir(s)  136,618,471,424 bytes free

In postgres_db:

Directory of C:\Servoy\application_server\postgres_db

09/11/2012  05:30 AM    <DIR>          .
09/11/2012  05:30 AM    <DIR>          ..
09/11/2012  05:30 AM    <DIR>          bin
09/11/2012  05:30 AM    <DIR>          lib
09/11/2012  05:30 AM               368 postgres_log.txt
09/11/2012  05:30 AM    <DIR>          share
               1 File(s)            368 bytes
               5 Dir(s)  136,618,471,424 bytes free

NOTE: I don’t see any see anything wrong with the installation. The only message I find that concerns me is in the postgres_log.txt file.

LOG: database system was shut down at 2012-09-11 05:30:48 PDT
FATAL: the database system is starting up
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
FATAL: role “scac-team” does not exist
LOG: received smart shutdown request
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down

What does the line FATAL: role “scac-team” does not exist mean? Could this be the problem?

*scac-team is the administrator user of this computer. I installed Servoy ‘as administrator’ with the firewall and virus software off.

This installation is complete. I am checking if there is anything running… No postgresql process running.

Now, I am getting ready to start Servoy.

Ok, I un-commented the line postgres_db\bin\pg_ctl start -D database -l postgres_db\postgres_log.txt in the .bat file.

This is the servoy.properties file:

# Servoy properties file
# NOTE: At least one connection must be called 'repository_server' !!

# Number of servers defined in this file
ServerManager.numberOfServers=1

# Definition 1
server.0.serverName=repository_server
server.0.URL=jdbc:postgresql://localhost:5432/servoy_repository
server.0.driver=org.postgresql.Driver
server.0.enabled=true
server.0.userName=DBA
server.0.password=
server.0.schema=<none>
server.0.catalog=<none>

#start database engine
waitForNativeStartup=false

#for use by pdf_forms plugin
pdf_forms_plugin_servername=pdf_forms

#network config
SocketFactory.useTwoWaySocket=true
SocketFactory.useSSL=true
java.rmi.server.hostname=127.0.0.1
servoy.rmiStartPort=1099
servoy.application_server.startRepositoryAsTeamProvider=false

I added server.0.enabled=true just to make sure…

I am ready to go, I am typing ‘servoy_server.bat -upgradeRepository’
… … …

Did not work! See here:

C:\Servoy\application_server>servoy_server.bat -upgradeRepository
server starting
Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.

In the servoy_log.txt

2012-09-11 06:00:16,304 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.

Then, I see not one but three postgresql processes:

[attachment=1]Capture3.GIF[/attachment]

And of course if I tried again, then I get this:

C:\Servoy\application_server>servoy_server.bat -upgradeRepository
pg_ctl: another server might be running; trying to start server anyway
server starting
The process cannot access the file because it is being used by another process.
Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.

And then more postgresql processes:

[attachment=0]Capture4.GIF[/attachment]

But the sevoy_log does not say much:

2012-09-11 06:00:16,304 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.
2012-09-11 06:05:05,550 ERROR [main] com.servoy.j2db.util.Debug - Cannot upgrade repository: make a backup of your repository and start server with -upgradeRepository flag.

There is something really wrong but Servoy does not provide me with clues about what might be. I think I should open a case in Servoy Support for this. What do you think? Any other advice?

Johan, thank you very much.

Carlos

it somehow doesn’t see your “-upgradeRepository” as the only parameter that you give to servoy_server.bat
because only then it shows you that message in the log
what is exactly the content of your servoy_server.bat file?

jcompagner:
it somehow doesn’t see your “-upgradeRepository” as the only parameter that you give to servoy_server.bat
because only then it shows you that message in the log
what is exactly the content of your servoy_server.bat file?

Here it is the content of the servoy_server.bat file:

@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

setlocal
if "%CMD_LINE_CHANGED%"=="" set CMD_LINE_START=java

:restart
%CMD_LINE_START% -Djava.awt.headless=true -Xmx1280m -Xms64m -XX:MaxPermSize=128m -classpath .;lib\activation.jar;lib\antlr.jar;lib\apache-mime4j.jar;lib\BrowserLauncher2.jar;lib\commons-codec.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\hibernate3.jar;lib\httpclient.jar;lib\httpclient-cache.jar;lib\httpcore.jar;lib\httpmime.jar;lib\j2db.jar;lib\j2dbdev.jar;lib\jabsorb.jar;lib\xstream.jar;lib\javassist.jar;lib\jcifs.jar;lib\joda-time.jar;lib\js.jar;lib\jta.jar;lib\jug.jar;lib\log4j.jar;lib\mail.jar;lib\MRJAdapter.jar;lib\networktnl.jar;lib\rmitnl.jar;lib\server-bootstrap.jar;lib\servlet-api.jar;lib\slf4j-api.jar;lib\slf4j-log4j.jar;lib\wicket.jar;lib\wicket-calendar.jar;lib\wicket-extentions.jar;lib\wiquery.jar;lib\fs-parser.jar;lib\fs-commons.jar;lib\minis.jar;lib\PBKDF2.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
if NOT "%ADDITIONAL_RESTART_LEVEL%"=="" if %errorlevel%==%ADDITIONAL_RESTART_LEVEL% goto restart
endlocal

that looks fine, but somehow the -upgradeRepository is not getting in.
maybe you can try it by adjusting the batch file:
change this:

xxxxxx.ApplicationServer %1 %2 %3 %4 %5 %6 %7 %8 %9

to

xxxxxx.ApplicationServer-upgradeRepository

Unfortunately, it did not work.

C:\Servoy\application_server>servoy_server.bat -upgradeRepository
server starting
Exception in thread “main” java.lang.NoClassDefFoundError: com/servoy/j2db/server/main/ApplicationServer-upgradeRepository
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository. Program will exit.

The postgres.exe process started, but not Servoy server.

[attachment=0]Capture.PNG[/attachment]

And of course, when I run the servoy_server.bat -upgradeRepository again, I get same error but with the warning about another pg_ctl server running.

C:\Servoy\application_server>servoy_server.bat -upgradeRepository
pg_ctl: another server might be running; trying to start server anyway
server starting
The process cannot access the file because it is being used by another process.
Exception in thread "main" java.lang.NoClassDefFoundError: com/servoy/j2db/server/main/ApplicationServer-upgradeRepository
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository.  Program will exit.

C:\Servoy\application_server>

Should I add a case for this in support? Could this be a bug?

What about the message in the postgres_log.txt file?

LOG: database system was shut down at 2012-09-11 05:30:48 PDT
FATAL: the database system is starting up
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
FATAL: role “scac-team” does not exist
LOG: received smart shutdown request
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down

What does the line FATAL: role “scac-team” does not exist mean?

Thanks Johan.

jcarlos:
Unfortunately, it did not work.

C:\Servoy\application_server>servoy_server.bat -upgradeRepository
server starting
Exception in thread “main” java.lang.NoClassDefFoundError: com/servoy/j2db/server/main/ApplicationServer-upgradeRepository
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository. Program will exit.

The postgres.exe process started, but not Servoy server.

[attachment=0]Capture.PNG[/attachment]

And of course, when I run the servoy_server.bat -upgradeRepository again, I get same error but with the warning about another pg_ctl server running.

C:\Servoy\application_server>servoy_server.bat -upgradeRepository

pg_ctl: another server might be running; trying to start server anyway
server starting
The process cannot access the file because it is being used by another process.
Exception in thread “main” java.lang.NoClassDefFoundError: com/servoy/j2db/server/main/ApplicationServer-upgradeRepository
Caused by: java.lang.ClassNotFoundException: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.servoy.j2db.server.main.ApplicationServer-upgradeRepository. Program will exit.

C:\Servoy\application_server>




Should I add a case for this in support? Could this be a bug?

What about the message in the postgres_log.txt file?


> LOG: database system was shut down at 2012-09-11 05:30:48 PDT
> FATAL: the database system is starting up
> LOG: database system is ready to accept connections
> LOG: autovacuum launcher started
> FATAL: role "scac-team" does not exist
> LOG: received smart shutdown request
> LOG: autovacuum launcher shutting down
> LOG: shutting down
> LOG: database system is shut down



What does the line FATAL: role "scac-team" does not exist mean?

Thanks Johan.

Simply: The “scac-team” role not exist into the postgres database. I suppose scac-team is user of your server.

To solve you can add this role in postgres via pgadmin.

there must be a space between that, somehow that got lost in the post.

its just that that %1 is already filled in…

xxxxxx.ApplicationServer -upgradeRepository

jcompagner:
there must be a space between that, somehow that got lost in the post.

its just that that %1 is already filled in…

xxxxxx.ApplicationServer -upgradeRepository

You won’t believe what I just found out… You are going to laugh!

Well, I just realized that the problem was on the ‘–’ … on the dash!

This is the story. I use this recipe to install Servoy so that I don’t forget the steps. It is written in MS Word with images and everything…

So, to make sure that I wasn’t typing anything wrong, I copied and pasted most of the text content into a text file (Notepad) in the server, so that I could use command from there into the command line windows. I was using:

[attachment=1]Capture1.PNG[/attachment]
Which is different to:

[attachment=0]Capture2.PNG[/attachment]

The encoding of the dash wasn’t plain text. That was the problem!

I didn’t suspect this could be the issue since I was using a text file. I realized the problem when I copied and pasted side by side the code you asked me to change in the .bat file. Then when I performed a search for -upgradeRepository, the ‘-upgradeRepository’ that I had there wasn’t being selected. I saw then a slightly different dash…

There is nothing wrong with the .bat file, or Servoy. I didn’t have to change:

xxxxxx.ApplicationServer %1 %2 %3 %4 %5 %6 %7 %8 %9
to
xxxxxx.ApplicationServer -upgradeRepository[/b]

This whole thing is embarrassing. :roll:

But I am making this post for those users of Windows and Notepad…. Don’t trust Notepad!

To conclude: The installation of Servoy with the bundled PostgreSQL database is working fine. I also tried it with MySQL. I changed the servoy.properties file to MySQL, I uncommented the line that starts Postgres in the .bat file, and I added the driver. I started Servoy with MySQL without problem.

Once again, thank you for your help. I am really sorry if I caused you some distress. :|

Best,
Carlos

BTW, I installed yesterday Servoy Server in a very old XP computer to deploy all solutions in production, since I could not get Servoy working in my Windows 2003 server. The data is actually in the Windows Server, but Servoy is running from the old XP machine. But even so, Servoy is rocking and it is actually performing faster than before. (Before I run Servoy 5.x’s in the Windows 2003 server).

Capture2.PNG

Capture1.PNG

logicimpresa:
Simply: The “scac-team” role not exist into the postgres database. I suppose scac-team is user of your server.

To solve you can add this role in postgres via pgadmin.

Thank you very much! I guess I don’t have to worry about it if I don’t get rid if it.

Eventually I’ll use MySQL instead of PostgreSQL for the repository.

This -of course wasn’t the issue at all.

Best, Carlos