OS X 10.4.8 startup error

After running Servoy for month, I updated out server to OS X Server 10.4.8 (dual G5) today, including Apple’s latest security and Java updates.

When I went to restart Servoy server after the update, I got the following error spew.

Any ideas?

=============

ci06:/Applications/Servoy stephengray$ ./servoy_server.sh &
[1] 469
ci06:/Applications/Servoy stephengray$ dyld: Library not loaded: libdbserv9_r.dylib
Referenced from: /Applications/Servoy/sybase_db/dbsrv9
Reason: image not found
./servoy_server.sh: line 2: 470 Trace/BPT trap /Applications/Servoy/sybase_db/dbsrv9
./servoy_server.sh: line 2: @/Applications/Seervoy/sybase_db/sybase.config: No such file or directory
Loading servoy.properties from /Applications/Servoy/servoy.properties
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.int(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.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:487)
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead(ErrorMessage.java:723)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3071)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:394)
at com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:218)
at com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:195)
at com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:174)
at com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:126)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:179)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
… 12 more

[1]+ Exit 1 ./servoy_server.sh
ci06:/Applications/Servoy stephengray$

It can’t find the Sybase database:

Library not loaded: libdbserv9_r.dylib
Referenced from: /Applications/Servoy/sybase_db/dbsrv9
Reason: image not found
./servoy_server.sh: line 2: 470 Trace/BPT trap /Applications/Servoy/sybase_db/dbsrv9
./servoy_server.sh: line 2: @/Applications/Seervoy/sybase_db/sybase.config: No such file or directory

bcusick:
It can’t find the Sybase database:

Library not loaded: libdbserv9_r.dylib
Referenced from: /Applications/Servoy/sybase_db/dbsrv9
Reason: image not found
./servoy_server.sh: line 2: 470 Trace/BPT trap /Applications/Servoy/sybase_db/dbsrv9
./servoy_server.sh: line 2: @/Applications/Seervoy/sybase_db/sybase.config: No such file or directory

Yeah, that’s the trick. They don’t seem to be missing.

I compared my remote directory structure to my local and can’t find any missing files.

I just rechecked my config files against Servoy’s documentation.

I did have my system setup correctly to run Sybase as a service, so why didn’t it start? Are there any new issues with OS 10.4.8?

Also – How do I start it manually from the command line?

I think this would solve the problem.

I went back and started “from scratch”.

Started Servoy Developer to get dbsrv9 going again.

This still doesn’t answer the question of why it failed to start as a service.

I am getting the same problem.

I got the following issue when starting up the server:

0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
835 [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

I got in to the terminal and ran the following:

/Applications/Servoy/sybase_db/dbsrv9|@/Applications/Servoy/sybase_db/sybase.config

I got the following issue

/Applications/Servoy/sybase_db/dbsrv9|@/Applications/Servoy/sybase_db/sybase.config
dyld: Library not loaded: libdbserv9_r.dylib
Referenced from: /Applications/Servoy/sybase_db/dbsrv9
Reason: image not found
-bash: @/Applications/Servoy/sybase_db/sybase.config: No such file or directory

Any idea please?

Hi All

I can’t start the iAnywhere daemon anymore as a Mac OS X service since upgrading to 3.5rc2. I did not change anything in the startup code. Are there any changes between 3.1.6 and 3.5rcx?

Best regards, Robert

PS: I can manually start the db daemon.

faheemhameed:
I am getting the same problem.

I got the following issue when starting up the server:

0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
835 [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

I got in to the terminal and ran the following:

/Applications/Servoy/sybase_db/dbsrv9|@/Applications/Servoy/sybase_db/sybase.config

I got the following issue

/Applications/Servoy/sybase_db/dbsrv9|@/Applications/Servoy/sybase_db/sybase.config
dyld: Library not loaded: libdbserv9_r.dylib
Referenced from: /Applications/Servoy/sybase_db/dbsrv9
Reason: image not found
-bash: @/Applications/Servoy/sybase_db/sybase.config: No such file or directory

Any idea please?

Hi Robert,

what is the command to manually start the db daemon?

Hi Faheem

I normally just start the developer which itself then starts the db daemon (on Macs at least). You can stop it form the Activity Monitor (use only Quit (UNIX signal 15) not Force Quit) You can also do it from the terminal (on Macs or UNIX, of course):

export PATH=$PATH:/Applications/Servoy/sybase_db
cd /Applications/Servoy/
sybase_db/dbsrv9 @sybase_db/sybase.config

Hope that helps, Robert

faheemhameed:
Hi Robert,

what is the command to manually start the db daemon?

Thanks Robert,

I have managed to solve my issue.

Thanks!

Hi Faheem

I still have the above error, i. e. autostarting the dbsrv9 process doesn’t work any more (since 3.5rc2).

How did you solve the problem?

Thanks for postinng the solution to your problem which seems excactly the same as I have.

Best regards, Robert

faheemhameed:
Thanks Robert,

I have managed to solve my issue.

Thanks!

my servoy servoy_server.sh file looks like this. Is this helpful?

#!/bin/sh  
cd /Applications/Servoy 

while true
do
            java -Djava.net.preferIPv4Stack=true -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/naming-factory.jar:lib/naming-resources.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 com.servoy.j2db.server.ApplicationServer "$@" 1>> server.log 2>> server.log
            EXITCODE=$?
            if [ "$EXITCODE" != 99 ]; then exit $EXITCODE; fi
done

Hi Faheem

Now Servoy Server gets started when I manually start the developer and therefor the dbsrv9 process gets started.
How do you get the dbsrv9 process automatically started?

My config:

Servoy Developer
Version 3.5 rc3-build 508
Java version 1.5.0_07-87 (Mac OS X)

Thanks and best regards, Robert

faheemhameed:
my servoy servoy_server.sh file looks like this. Is this helpful?

#!/bin/sh  

cd /Applications/Servoy

while true
do
java -Djava.net.preferIPv4Stack=true -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/naming-factory.jar:lib/naming-resources.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 com.servoy.j2db.server.ApplicationServer “$@” 1>> server.log 2>> server.log
EXITCODE=$?
if [ “$EXITCODE” != 99 ]; then exit $EXITCODE; fi
done

I believe this thread covers this.

Hi Robert

I couldn’t find a useful hint in this tread for my situation. Everything used to work until 3.1.6, but then I installed version 3.5rc2 and now it doesn’t start automatically my dbsrv9 any more.

I did the setup as described in the Server Admin manual, installing a file in the LaunchAgent folder under the user.

I assume it works in your environment?

Best regards, Robert

ROCLASI:
I believe this thread covers this.

Maybe it does get started but errors out.
Do you see any errors in the sybase log or in the system log ?

Robert Huber:
I assume it works in your environment?

Well I don’t use Sybase in my server environment. I think you can guess what I use. ;)

Hi Robert

Yeah, I know what db you use :-) I may have the chance to use that db as well in the future :-)

In the server.log file it says the following

0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /Applications/Servoy/servoy.properties
509 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
2007-07-03 11:17:20,850 WARN [main] com.servoy.j2db.persistence.Server - Table name teaching_allotment_class_course_positions from server hades is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:20,851 WARN [main] com.servoy.j2db.persistence.Server - Table name intermediate_rating_requirements from server hades is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:20,852 WARN [main] com.servoy.j2db.persistence.Server - Table name intermediate_report_requirements from server hades is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:20,852 WARN [main] com.servoy.j2db.persistence.Server - Table name persons_particular_capabilities from server hades is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:22,333 WARN [main] com.servoy.j2db.persistence.Server - Column name ‘admin_allowuser_enterservername’ from table ‘main’ is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:24,044 WARN [main] com.servoy.j2db.persistence.Server - Column name ‘profile_positions_exist_next_period’ from table ‘courses’ is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:24,046 WARN [main] com.servoy.j2db.persistence.Server - Column name ‘teaching_allotments_exist_next_period’ from table ‘courses’ is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:24,567 WARN [main] com.servoy.j2db.persistence.Server - Column name ‘class_teacher_exists_next_period’ from table ‘classes’ is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:24,573 WARN [main] com.servoy.j2db.persistence.Server - Column name ‘person_id_vicarious_class_teacher’ from table ‘classes’ is too long (>30 chars) – this is not supported by all databases
2007-07-03 11:17:24,573 WARN [main] com.servoy.j2db.persistence.Server - Column name ‘vicarious_class_teacher_exists_next_period’ from table ‘classes’ is too long (>30 chars) – this is not supported by all databases
Exception in thread “main” java.lang.NoClassDefFoundError: org/hibernate/mapping/KeyValue
at com.servoy.j2db.persistence.Server.a(Unknown Source)
at com.servoy.j2db.persistence.Server.g(Unknown Source)
at com.servoy.j2db.persistence.Column.(Unknown Source)
at com.servoy.j2db.persistence.Server.int(Unknown Source)
at com.servoy.j2db.persistence.Server.for(Unknown Source)
at com.servoy.j2db.persistence.Server.getTable(Unknown Source)
at com.servoy.j2db.persistence.Repository.a(Unknown Source)
at com.servoy.j2db.persistence.Repository.a(Unknown Source)
at com.servoy.j2db.persistence.Repository.a(Unknown Source)
at com.servoy.j2db.persistence.Repository.a(Unknown Source)
at com.servoy.j2db.persistence.s.a(Unknown Source)
at com.servoy.j2db.persistence.s.if(Unknown Source)
at com.servoy.j2db.persistence.Repository.getActiveRootObject(Unknown Source)
at com.servoy.j2db.persistence.Repository.getActiveSolution(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.a(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)

The critcal line is (the above messages are ok and because of our db, too long table and column names for some db’s):

Exception in thread “main” java.lang.NoClassDefFoundError: org/hibernate/mapping/KeyValue

as I don’t know why this is here and what it means?

Best regards, Robert

ROCLASI:
Maybe it does get started but errors out.
Do you see any errors in the sybase log or in the system log ?

Robert Huber:
I assume it works in your environment?

Well I don’t use Sybase in my server environment. I think you can guess what I use. ;)

Hi Robert,

I googled for it and it seems the interface KeyValue ‘represents an identifying key of a table: the value for primary key of an entity, or a foreign key of a collection or join table or joined subclass table’.

But I doubt this has anything to do with Sybase not starting.
Can you check for a sybase log file in the sybase folder. If Sybase has any errors it will show up in there.

Hi Robert,

I am using mysql for the repository now. So I was not trying with sybase.

Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/mapping/KeyValue 

In my understanding the above error occurs when there is no jar file which contains the particular class is not in the class path. Or even the jar file is there and it is a bit old (so the class file may be missing from the jar file)

Can you check that you have the called /lib/hibernate3.jar?

I think that file should be in the class path.

Hi All

I used to auto starting Servoy Server as described in Servoy31ServerAdminGuide.pdf in chapter 9.2.2 Auto starting Servoy Server as a service on Mac OS X.
That used to work with 3.1.6 - but no more with 3.5rcx

Now I tried the method described by Marcel in Servoy Magazine putting a Servoy folder in Startup items with the Servoy and StartupParameters.plist files in it.

Now Servoy Server and dbsrv9 process start (automatically) when I login in as a user.

My questions: Doesn’t the method described in chapter 9.2.2 not work anymore and what to do if I’d like to start Servoy Server and Repository Server (dbsrv9) without login in as a user?

Thanks to all for help, Robi

PS: As said above it works now (again and differently) but I don’t understand it :-o

ROCLASI:
Hi Robert,

I googled for it and it seems the interface KeyValue ‘represents an identifying key of a table: the value for primary key of an entity, or a foreign key of a collection or join table or joined subclass table’.

But I doubt this has anything to do with Sybase not starting.
Can you check for a sybase log file in the sybase folder. If Sybase has any errors it will show up in there.