Hi All,
I’m having trouble with starting Servoy Server as a service on a Mac OS X 10.4.10 PPC G5. When I try to manually start the Server application in the terminal by using /servoy_server.sh it doesn’t do anything and when I try to open the servoy_server.sh file direct by using the terminal it says
Last login:Tue Sep 18 13:40:23 on ttyp1
/Applications/Servoy/servoy_server.sh; exit
Welcome to Darwin!
client04:~Name$ /Applications/Servoy/servoy_server.sh; exit
logout
[Process completed]
Does anyone know what can cause the exit and logout?
We need at least some more details. What database do you use? Is the database running when you try to start the server?
Try to open a terminal, “cd” to your Servoy install folder, do the following and paste back the results:
./servoy_server.sh &
Also paste the content of the 2 log files (servoy_log.txt and server.log).
Lovedatsound:
client04:~Name$ /Applications/Servoy/servoy_server.sh; exit
Sorry, I noted this only now.
Why do you execute exit? If you do that you start the server in foreground and then you close the shell killing also the servoy server.
You should just:
cd /Applications/Servoy
./servoy_server.sh &
Then you can close the terminal window and the Servoy Server will be running in background.
I didn’t execute exit; the terminal does it automaticly after starting servoy_server.sh
Strange.
Follow the advice of my first post and paste the content of the 2 logs file here so I can get a better idea of what is happening.
After trying almost everything I read in the messages on this forum I still can’t launch servoy server as a service. I use sybase and it is running (dbsrv9) when I start the computer.
My servoy_log.txt reads:
2007-09-18 16:38:46,780 ERROR [main] com.servoy.j2db.util.Debug - Throwable
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
at com.servoy.j2db.persistence.datasource.n.createConnection(Unknown Source)
at com.servoy.j2db.persistence.datasource.r.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.testConnection(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.be(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.do(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
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:585)
at com.servoy.j2db.startup.Bootstrap.main(Unknown Source)
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:585)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Caused by: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseErrorCheckDead(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.login(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
… 23 more
My server.log in the servoy folder reads:
0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
462 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
Exception in thread “main” org.apache.commons.dbcp.DbcpException: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
at com.servoy.j2db.persistence.datasource.n.createConnection(Unknown Source)
at com.servoy.j2db.persistence.datasource.r.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.checkIfTableExistsInDatabase(Unknown Source)
at com.servoy.j2db.persistence.Repository.for(Unknown Source)
at com.servoy.j2db.persistence.Repository.(Unknown Source)
at com.servoy.j2db.persistence.Repository.(Unknown Source)
at com.servoy.j2db.persistence.Server.getRepository(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)
Caused by: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseErrorCheckDead(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.login(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
… 12 more
and when I enter the: “sudo /library/startupitems/servoy/servoy start” command in the terminal, it says:
Password:
Starting Servoy Application Server…
SqlServer:/applications/servoy VLS$ 0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
627 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
Exception in thread “main” java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ScheduledThreadPoolExecutor
at com.servoy.j2db.dataprocessing.k.(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)
Let’s focus on the main problem then we will look into the startup script issue.
Looks like Servoy is not able to connect to the database. Is the DB running? Does it work if you start Developer instead of server? If so, are you using the same servoy.properties file for both server and developer?
Yes, the db is running and I can enter the db by using the developer. There is only one servoy.properties file on my computer so I imagine that it is used by Developer as well as Server.
Are you still launching the script with absolute path or are you CDing to the Servoy folder? Try to CD to the Servoy Folder and start the server using “./servoy_server.sh &”.
When I cd to the servoy folder like you suggested, the result is still:
SqlServer:/applications/servoy VLS$ ./servoy_server.sh &
[1] 416
SqlServer:/applications/servoy VLS$ 0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
629 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
Exception in thread “main” java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ScheduledThreadPoolExecutor
at com.servoy.j2db.dataprocessing.k.(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)
that seems like a bad install to me
do you have the concurrent.jar in your lib dir? (and is it a valid zip file)
and is that file also targeted in the startup file: (server.sh)
:lib/commons-pool.jar:lib/concurrent.jar:lib/dom4j.jar:
It is finally working and it had to do with the servoy_server.sh file. I used the file with the content that was recomended on this forum:
#!/bin/sh
cd /Applications/Servoy
export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db
/Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config &
while true
do
java -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-pool.jar:lib/activation.jar:lib/antlr.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/compat141.jar:lib/jh.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/mail.jar:lib/jug.jar:lib/jdbc2_0-stdext.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/xerces.jar:lib/server-bootstrap.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/hibernate2.jar com.servoy.j2db.server.ApplicationServer “$@”
EXITCODE=$?
if [ “$EXITCODE” != 99 ]; then exit $EXITCODE; fi
done
Since I got numerous errors I tried a combination of this file and the original servoy_server.sh file Servoy installed on my computer. Right now my servoy_server.sh file reads:
#!/bin/sh
cd /Applications/Servoy
export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db
/Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config &
while true
do
java -Djava.awt.headless=true -Xmx256m -Xms64m -XX:MaxPermSize=128m -classpath .:lib/ohj-jewt.jar:lib/MRJAdapter.jar: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-1.0.jar:lib/commons-logging.jar:lib/commons-pool.jar:lib/concurrent.jar:lib/dom4j.jar:lib/help.jar:lib/hibernate3.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/jdbc2_0-stdext.jar:lib/jmx.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/BrowserLauncher2.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-extentions.jar:lib/wicket.jar:lib/wicket-calendar.jar:lib/xerces.jar:lib/concurrent.jar:lib/slf4j-api.jar:lib/slf4j-log4j.jar:lib/joda-time.jar:lib/rmitnl.jar:lib/networktnl.jar com.servoy.j2db.server.ApplicationServer “$@” 1>> server.log 2>> server.log
EXITCODE=$?
if [ “$EXITCODE” != 99 ]; then exit $EXITCODE; fi
done
and it is working! Thank you all for the time you took to reply and help me.