# problem starting repository servoy 5.2

**URL:** <https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608>\
**Category:** Classic Servoy\
**Created:** [August 8, 2010, 4:14am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608 "2010-08-08T04:14:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![madimane](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@madimane](https://forum.servoy.com/u/madimane)\
**Post date:** [August 8, 2010, 4:14am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/1 "2010-08-08T04:14:23Z")

</div>

Hi all,

When launching the server(servoy\_server.bat) nothing happen and i have the error below  
in the log file.

```auto
2010-08-07 19:33:48,415 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-08-07 19:33:48,419 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!

```

Should i install postgresql server and if it is the case, is there any documentation about that?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [August 8, 2010, 5:22am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/2 "2010-08-08T05:22:34Z")

</div>

If you open the “servoy\_server.bat” with a text editor, you will see that all you need to do to start PostgreSQL with the Servoy server from the command line is to uncomment this line:  
postgres\_db\bin\pg\_ctl start -D database -l postgres\_db\postgres\_log.txt

Alternatively you can install PostgreSQL (you can download an installer from EnterpriseDB for example - [http://www.enterprisedb.com/](http://www.enterprisedb.com/) - you will need to register) and you will be able to install it as a service.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [August 8, 2010, 8:16am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/3 "2010-08-08T08:16:22Z")

</div>

> ptalbot:  
> Alternatively you can install PostgreSQL (you can download an installer from EnterpriseDB for example - [http://www.enterprisedb.com/](http://www.enterprisedb.com/) - you will need to register) and you will be able to install it as a service.

Do note that they offer 3 flavors of PostgreSQL installers. PostgreSQL, Postgres Plus and Postgres Plus Advanced.  
It’s the PostgreSQL (8.4) installer you want to download.

---

<div class="post-metadata">

**Author:** ![madimane](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@madimane](https://forum.servoy.com/u/madimane)\
**Post date:** [August 8, 2010, 9:13pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/4 "2010-08-08T21:13:40Z")

</div>

Thank you Patrick and Robert for the reply.  
the server is started now ![:wink:]( "Wink")

---

<div class="post-metadata">

**Author:** ![Thomas\_Parry](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@Thomas\_Parry](https://forum.servoy.com/u/Thomas_Parry)\
**Post date:** [September 16, 2010, 7:17pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/5 "2010-09-16T19:17:14Z")

</div>

I am trying out postgres 8.4 on a new win7 os machine with a new install of Servoy 5.2.1

I can start the developer ok with the built in postgres supplied.

I amended the server.bat to start postgres in the application\_server folder and that works ok.

I want to start postgres supplied with Servoy as a service as well as starting Servoy as a service. That is where it is failing. I did check and change the window firewall to allow port 5432 (default postgres) but it is not starting the postgres as a service.

I examined the wiki and this forum and the postgres community forum but not exactly getting the specific answer to my problem.

Do I use pgctrl register ? What parameters should I use?

---

<div class="post-metadata">

**Author:** ![gldni](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gldni](https://forum.servoy.com/u/gldni)\
**Post date:** [September 16, 2010, 7:40pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/6 "2010-09-16T19:40:49Z")

</div>

We’re in the same boat here. Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [September 16, 2010, 8:00pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/7 "2010-09-16T20:00:03Z")

</div>

Do you see anything in the postgres log ?

---

<div class="post-metadata">

**Author:** ![Thomas\_Parry](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@Thomas\_Parry](https://forum.servoy.com/u/Thomas_Parry)\
**Post date:** [September 16, 2010, 8:54pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/8 "2010-09-16T20:54:23Z")

</div>

Nothing in the log.  
I should backtrack a little to clarify the issue.  
I have installed Servoy5 as a brand new install (as an admin user on Win 7).

I am able to use pg\_ctl to start and stop the database that Servoy has under the application\_server folder.

Now I want to make this machine a server and want to have postgresql start as a windows service as well as Servoy.

Servoy will not start as a service since there is no Postgres database service running.

If I is use the pg\_ctl -register command as follows:

```auto
pg_ctl -register -N PostgresServoy -U <my login name> -P <my login password> -D <the database folder under the application_server folder of Servoy>) 

```

Then I get an error message “could not open service manager”  
I do not know if I should be using another username/password.

So the question is this: what should the syntax be for starting the postgres server as a service using the pg\_ctl register command (assuming this is the correct approach)?

---

<div class="post-metadata">

**Author:** ![Thomas\_Parry](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@Thomas\_Parry](https://forum.servoy.com/u/Thomas_Parry)\
**Post date:** [September 16, 2010, 10:13pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/9 "2010-09-16T22:13:11Z")

</div>

So I hacked around and around and around and finally did the correct things in the correct sequence.  
For others this is what worked for me: (perhaps this could be put into the wiki for WIN7 users?)

The correct command to use is:

```auto
pg_ctl register -N <name of the service> -U <user> -P <password> -D <database location>

```

For me the key was the win7 issue of “could not open service manager” which is a M$ way of saying “access denied” or similar.  
What I had done was to open a cmd window and typed in the above command.  
What I SHOULD have done is to open the cmd window RUN AS ADMINISTRATOR even though I was logged in as myself as an administrator.  
Once I had the cmd open properly then the pg\_ctl register will work … almost.  
What I had to do was to specify a little better the database and the log file as follows:

1. in the cmd window navigate to the directory where the bin directory is for postgres\_db (note that I installed Servoy in to D:\Servoy5):

```auto
cd \Servoy5\application_server\postgres_db\bin

```

1. register:

```auto
pg_ctl register -N PostgresForServoy -U postgres -P postgrespass -D \Servoy5\application_server\database -l \Servoy5\application_server\postgres_db\postgres_log.txt

```

1. go to the control panel then service and check that the service has been installed with the name (here PostgresForServoy)
2. start the service either from the services window or by using:

```auto
pg_ctl start -D \Servoy5\application_server\database -l \Servoy5\application_server\postgres_db\postgres_log.txt

```

1. check again that the service is running
2. stop the service:

```auto
pg_ctl stop-D \Servoy5\application_server\database -l \Servoy5\application_server\postgres_db\postgres_log.txt

```

7.in the control panel services change the start up to automatic. Test by rebooting and examining the service to see that it actually started. Check the log file too.  
8. I also changed the Servoy Application Server service to start up automatically - delayed. I assume the Postgres might take some time - not sure if this is needed though.

Other notes: relative paths might work - I did not try.  
Please amend this with better instructions for win7 users wanting to set up using the Servoy provided postgres as a server.  
(Again I think this should go into the wiki once improvements are made!)

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [September 16, 2010, 10:35pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/10 "2010-09-16T22:35:13Z")

</div>

Hi Tom,

thanks for the walkthrough, I’m sure it will be useful and you are right that something should be put in the wiki!  
I have one small suggestion: for you step 8, instead of adding a delay to start the Servoy service, why not add postgres as a dependency?

In the wrapper.conf file of /Servoy/application\_server/service/ you could add:

```auto
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=PostgresForServoy 

# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

```

Where PostgresForServoy is the name you used to register the postgres service, I believe?

Then uninstall the “Servoy Application Server” service

> “C:\Program Files\Servoy\application\_server\service\Wrapper.exe” -r “C:\Program Files\Servoy\application\_server\service\wrapper.conf”

And install again:

> “C:\Program Files\Servoy\application\_server\service\Wrapper.exe” -i “C:\Program Files\Servoy\application\_server\service\wrapper.conf”

Then the “Servoy Application Server” service would wait for the PostgresForServoy service to be started before starting itself.

---

<div class="post-metadata">

**Author:** ![Thomas\_Parry](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@Thomas\_Parry](https://forum.servoy.com/u/Thomas_Parry)\
**Post date:** [September 17, 2010, 1:26am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/11 "2010-09-17T01:26:56Z")

</div>

Patrick,  
I will try the dependency tomorrow.  
Hmm - that is the kind of tip one expects to be in the Servoy docs and/or already in the wrapper.conf…

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [September 17, 2010, 3:32am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/12 "2010-09-17T03:32:57Z")

</div>

Actually I found information about the wrapper in the Servoy 4 admin guide pdf (a long time ago then).

I tried to find that information in the wiki but the page is not public (probably not approved):  
[http://wiki.servoy.com/display/DOCS/Running+the+server+as+a+service](http://wiki.servoy.com/display/DOCS/Running+the+server+as+a+service)

Paul, could you have a look at that?  
It’s true that running the server as a service/daemon is the kind of information that should be readily available: running from the command line on a server is not really an option on Windows.

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [September 22, 2010, 9:16am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/13 "2010-09-22T09:16:22Z")

</div>

> ptalbot:  
> If you open the “servoy\_server.bat” with a text editor, you will see that all you need to do to start PostgreSQL with the Servoy server from the command line is to uncomment this line:  
> postgres\_db\bin\pg\_ctl start -D database -l postgres\_db\postgres\_log.txt

I did exactly as Patrick indicated but it did not work! While the Windows Command shows up (trying to start the server) it says:  
The system cannot execute the specified program.  
Debug class loaded with class org.apache.commons.logging.LogFactory  
Debug log initialized

I also tried starting PostgreSQL from the command line as explained here: [http://wiki.servoy.com/display/public/DOCS/Starting+the+database](http://wiki.servoy.com/display/public/DOCS/Starting+the+database).

The problem it’s that now I have the situation where I HAVE to install PostgreSQL with Servoy. I can’t do a separate installation of PostgreSQL in this machine.

I followed the wiki instructions of installing the Servoy Application Server ([http://wiki.servoy.com/display/public/DOCS/Running+the+All-In-One+Installer](http://wiki.servoy.com/display/public/DOCS/Running+the+All-In-One+Installer)). I am trying this installation of Servoy Server with its bundled PostgreSQL db in a Windows XP machine. I will install in the same way in a Windows 2003 Server (once I figured this out.)

These are the error lines in servoy\_log.txt:

```auto
2010-09-22 01:51:36,675 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-09-22 01:51:36,675 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!

```

One thing that I am curious about: the database directory inside application\_server is empty after installation. I don’t know if this has something to do with the problem. Any ideas?

JC

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [September 22, 2010, 9:23am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/14 "2010-09-22T09:23:27Z")

</div>

HI Carlos,

> jcarlos:  
> One thing that I am curious about: the database directory inside application\_server is empty after installation. I don’t know if this has something to do with the problem. Any ideas?

Sounds like initdb was never run (or couldn’t run). Initdb will create a new database cluster.  
See [http://www.postgresql.org/docs/8.4/stat … nitdb.html](http://www.postgresql.org/docs/8.4/static/app-initdb.html) for more information

Hope this helps.

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [September 22, 2010, 9:32am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/15 "2010-09-22T09:32:25Z")

</div>

> ROCLASI:  
> HI Carlos,
> 
> > jcarlos:  
> > One thing that I am curious about: the database directory inside application\_server is empty after installation. I don’t know if this has something to do with the problem. Any ideas?
> 
> Sounds like initdb was never run (or couldn’t run). Initdb will create a new database cluster.  
> See [http://www.postgresql.org/docs/8.4/stat … nitdb.html](http://www.postgresql.org/docs/8.4/static/app-initdb.html) for more information

Agree, but all I did was a regular Servoy Server installation using servoy\_installer.exe. I am trying the installation again. (This time I’ll try servoy\_installer.jar)

Thanks a lot for the link. Very informative, I hope that’s not the problem. The initdb should have run with the installation.

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [September 22, 2010, 10:08am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/16 "2010-09-22T10:08:34Z")

</div>

I tried the installation again. The database directory is still empty.

I also tried to create a new database cluster. I used: initdb [option…] --pgdata | -D directory (with no options)

```auto
C:\Program Files\Servoy\application_server\postgres_db\bin>initdb --pgdata | -D "C:\Program Files\Servoy\application_server\database"
The system cannot execute the specified program.

```

This probably needs some options. No sure about that.

The database cluster should have been created. Can be there something wrong with Servoy 5.2.1 installation in Windows XP?

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [September 22, 2010, 10:16am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/17 "2010-09-22T10:16:47Z")

</div>

The proper syntax is:

```auto
initdb -D "C:\Program Files\Servoy\application_server\database"

```

–pgdata is for using the environment variable PGDATA instead of the -D argument (so use one or the other).  
But normally the program would simply yell at you with a proper error msg. Your error msg sounds more like the program can’t be run at all.  
What version of XP is this ?

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [September 22, 2010, 10:41am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/18 "2010-09-22T10:41:08Z")

</div>

Just installed Servoy 5.2.1 using the .jar installer on XP Prof. and the database cluster gets nicely created.  
Do you use the .exe or the .jar installer ?

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [September 22, 2010, 11:02am UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/19 "2010-09-22T11:02:43Z")

</div>

Ok, this is good news. I used the .exe installer first. Then after removing everything I used the .jar installer.

As for the version of XP, I believe it is Pro. I am responding to this post from my iPhone (trying to go to sleep). I will check version and installation in another machine tomorrow. Thank you very much!

---

<div class="post-metadata">

**Author:** ![jcarlos](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcarlos](https://forum.servoy.com/u/jcarlos)\
**Post date:** [September 22, 2010, 4:27pm UTC](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608/20 "2010-09-22T16:27:57Z")

</div>

> ROCLASI:  
> Just installed Servoy 5.2.1 using the .jar installer on XP Prof. and the database cluster gets nicely created.  
> Do you use the .exe or the .jar installer ?

I have a question, did you try this by installing Servoy Application Server only? That’s what I did (twice now). I followed the instructions at [http://wiki.servoy.com/display/public/DOCS/Running+the+All-In-One+Installer](http://wiki.servoy.com/display/public/DOCS/Running+the+All-In-One+Installer).

The version of Windows is XP Professional, Service Pack 3. I run the Windows Update and it says “No high-priority updates for your computer are available.” This computer checks for update everyday at 3 AM.

We now know that my installation is failing because the database cluster is not being created as expected -after installation the database directory is empty.

[Next page](https://forum.servoy.com/t/problem-starting-repository-servoy-5-2/12608.md?page=2)
