Servoy Server won't start on Mac OS X (10.3.9)

Used default installation and created a sample solution with Developer. Then configured Developer so that several clients could connect/interact. All is well. Now, want to run Server in lieu of developer. Followed directions in Server manual to start on OS X in Terminal by running shell script “servoy_server.sh”

Result:

Exception in thread “main” java.lang.NoClassDefFoundError: com/servoy/j2db/server/ApplicationServer

What am I doing wrong? If the Developer runs why will the Server not startup properly?

Any help is appreciated.

Steve

Hi Steve,

In the terminal window:

Type: cd /Applications/Servoy/
hit return

The run the ‘servoy_server.sh’ script

If you want to run it in background, add “&” after sh

I was caught out by this just the other day !

Cheers
Harry

Harry,

Thanks for the suggestion. I tried it exactly as suggested and now I get an error related to the file or directory not being found. The file is in the Servoy directory.

Wondering whether you or anyone else has another suggestion. This seems to be strange considering that when the Developer is run on the same machine there are no problems and clients can connect (during testing) without a problem…

Steve

Hi Steve,

What file was supposed to be missing ?

Was it the shell script ?

Once you have changed directories then drag the shell script file into the terminal window and hit enter

Cheers
Harry

Hi Steve,

setting up Servoy Server on a mac is more tricky than on Windows :-(.
Two things need to be in place:

You need to start your database (Sybase, Postgres, whatever) first.
Once it is running and accepting connections, you need to start Servoy Server, otherwise Servoy will not find the repository.

Different people will have different solutions to this problem.

The obvious way of doing this is to create startup items for your database and Servoy, however in my case, Servoy Server starts too early.

My solution is to have a startup item for my database and a separate Applescripts which looks for the Database processes by asking the terminal Application. Once it sees that the database is running, it fires up the servoy_server.sh script via the terminal.

Warning: I use PostgreSQL so this script will need to be modified to work with other databases

on idle
	copy (do shell script "ps axU postgres") to t
	delay 30
	if t contains "postmaster" and t contains "postgres" then
		do shell script "/Applications/Servoy/servoy_server.sh > /dev/null 2>&1 &" password "yourpasswordhere" with administrator privileges
		quit
	end if
end idle

substitute yourpasswordhere with an administrator password.

Hope this helps in some way,

Hi Steve,

Christian has a good point - it may be that you have tried this without the database server running !.

If you do not want to go through the AS process yet then simply launch developer which will start your database service and then open terminal and change directories and run the application server shell script.

Cheers
Harry

Hmm…

Thanks to everyone for their input. Harry’s original suggestion and some additional snooping on the forum has uncovered the problematic issue.

Harry suggested, entering in Terminal…

cd /Applications/Servoy/

hit return and then

/servoy_server.sh

It worked when preceding with a “.”, as

./servoy_server.sh

My non-Unix side is showing. Now, how to run the shell script at startup…

Thanks again,

Steve

Hi Steve,

I believe you need to take a look at this old thread:
http://forum.servoy.com/viewtopic.php?t=4111

Hope this helps.