installing Servoy on ubuntu with mysql repository

Hi guys,

I’ve been trying to get Servoy installed on an Ubuntu machine with a MySQL repository.

I managed to install Servoy from the command line which seems to have worked fine.

I have copied the driver for the mysql package i installed to the driver folder.

Then I configured the properties file in the following way:

Definition 1

server.0.serverName=repository_server
server.0.URL=jdbc:mysql://10.179.5.9/servoy_repository
server.0.driver=com-mysql.jdbc.Driver
server.0.maxConnectionsActive=10
server.0.maxConnectionsIdle=10
server.0.userName=servoy_user
server.0.password=servoy_password
server.0.schema=
server.0.catalog=

and further on:

#start database engine
nativeStartupLauncher=/opt/Servoy/application_server/sybase_db/dbspawn|/opt/Servoy/application_server/sybase_db/dbsrv10|@/opt/Servoy/application_serversybase_db/sybase.config#LD_LIBRARY_PATH=/opt/Servoy/application_server/sybase_db
waitForNativeStartup=true

#this property will change once started first time
servoy.didFirstTimeInit=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

selectedlnf=

I have a mysql database which I can connect to:

root@bbfservoy02:/opt/Servoy/application_server# mysql -u servoy_user -p -h 10.179.5.9
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 254
Server version: 5.0.51a-3ubuntu5.4-log (Ubuntu)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> use servoy_repository;
Database changed

In then try to start the servoy server:

root@bbfservoy02:/opt/Servoy/application_server# ./servoy_server.sh
root@bbfservoy02:/opt/Servoy/application_server# cat servoy_log.txt
2010-01-17 16:15:14,520 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-17 16:15:14,521 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-17 18:24:11,947 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-17 18:24:11,949 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-18 11:09:18,113 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-18 11:09:18,115 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 14:53:01,383 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 14:53:01,384 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 15:07:34,354 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 15:07:34,356 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 15:11:09,564 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 15:11:09,566 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 15:18:26,539 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 15:18:26,540 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 15:28:23,793 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 15:28:23,794 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 16:24:37,114 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 16:24:37,115 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-19 16:26:06,971 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-19 16:26:06,972 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-20 19:11:42,681 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-20 19:11:42,682 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
2010-01-20 19:27:37,325 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: com.servoy.j2db.persistence.RepositoryException: Error checking repository
2010-01-20 19:27:37,326 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database!
root@bbfservoy02:/opt/Servoy/application_server#

Which seems to indicate it can’t manage to connect to the empty database i created on the mysql server.

I’m not sure what I’m doing wrong.

Thanks in advance for any advice you may offer.

Kind regards,
John

Hi John

Try commenting out the following as servoy will try to start sybase,

#start database engine
nativeStartupLauncher=/opt/Servoy/application_server/sybase_db/dbspawn|/opt/Servoy/application_server/sybase_db/dbsrv10|@/opt/Servoy

do you have ServerManager.numberOfServers defined in your properties file ?

cant you do this through the admin pages?

So first have a normal install of servoy, start the server then go to the admin pages and configure your servers there?
(you have to run it first with sybase, the app server wont start this for you)

Hi guys,

thanks for the feedback.

Couple of things:

The number of servers is defined and set to 7 (all default ones). Perhaps I can remove the unnecessary ones and only keep the repository.

Sybase can be started when I do it manually so I dont see why it wont start it automatically.

I will try to remove the line to see what happens.

It’s needed to get Sybase running anyways with Servoy as I want to move my data from the old database (on sybase) to the new one with one of the scripted forms that I found on the forum.

Hi again,

I’ve managed to migrate the data to the MySQL databases, both for the repository and the application DB.

Seemed to work OK up to some point.

When I try to start the server now however for some reason I am getting the following error:

2010-02-25 11:19:19,912 ERROR [main] com.servoy.j2db.util.Debug - Could not load solution ‘servoy_sample_solutionModel’:
com.servoy.j2db.persistence.RepositoryException: java.lang.reflect.InvocationTargetException
at com.servoy.j2db.persistence.Repository.loadRootObjectWithChildren(Repository.java:1505)
at com.servoy.j2db.persistence.Repository.loadRootObject(Repository.java:573)
at com.servoy.j2db.persistence.Zzb.Za(Zzb.java:27)
at com.servoy.j2db.persistence.Zzb.Za(Zzb.java:57)
at com.servoy.j2db.persistence.AbstractRepository.getActiveRootObject(AbstractRepository.java:143)
at com.servoy.j2db.server.ApplicationServer.Zb(ApplicationServer.java:518)
at com.servoy.j2db.server.ApplicationServer.main(ApplicationServer.java:467)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.servoy.j2db.persistence.Repository.getObjectTree(Repository.java:1282)
at com.servoy.j2db.persistence.Repository.getObjectTree(Repository.java:423)
at com.servoy.j2db.persistence.Repository.loadRootObjectWithChildren(Repository.java:996)
… 6 more
Caused by: java.lang.UnsupportedOperationException: Can’t set name 2x, use updateName
at com.servoy.j2db.persistence.ScriptVariable.setName(ScriptVariable.java:14)
… 13 more

This occurs for all the other databases that are still on the Sybase.

I’ve tried restarting everything and many other things but nothing seems to resolve this problem.

Which makes me ask two questions:

  1. Are the other sybase databases needed for Servoy to work correctly?
    I assume they are needed (pdf forms etc)

  2. Can someone tell me why this occurs?
    I’ve tried to check online but there are little reference to this eror.

Thanks in advance for any advice you can offer.

Kind regards,
Jan

It looks like there is something wrong with the data in your repository…

It seems that for a specific global or form variable. the repository has 2 entries for the name value and tries to set this.
And our code supports only a call to setName once.

The application server of servoy only needs a repository connection to a database.
And for the rest are user servers/tables that your solution needs (but servoy itself doesnt need it)

PDFForms plugin for example just needs a server connection, but which one is up to you.

But for your problem we need to analyze your repository server content.
Do you have a backup of that solution as a normal servoy file? You could try to do a clean install and import that one.
If then the same thing happens the problem is even inside that servoy file.