Runtime installation questions

Hello,

  1. I exported a solution with the Runtime Builder. After have copied the database in the database folder of the runtime, I tried to start the runtime but I’ve got an error “can’t connect to database server”. Of course I stopped the server in order to copy the database, and as soo I restarted it my runtime works.
    The question is what happens when I will run the server on a machine that never has seen Servoy? Shouldn’t the runtime start a server?

  2. The solution is protected, that means I must authenticate to start it. But the runtime doesn’t ask for, it just starts. Is that right?

Sorry for the maybe stupid questions, but I a runtime-newbe. :P

The runtime application should start the server that is in runtime_db folder with the database that is in database folder ( must have the same name as in the input text field, for example test.db). This does not work well ? You can check the sybase log in runtime_db, maybe there is an error there. Also , the runtime solution doesn’t have a repository (must use a single database), so no security is available.

Hello Laurian,

It seems that I forgot to copy the database log. Now it works!

Thank you for helping

Hi again,

The problem shows up again, now on the Mac. When I try to start the runtime It can’t find the database. In the activity monitor I can see that dbeng10 is started. The sybase log doesn’t exist and the servoy log seems to refuse the connection.

2009-02-13 14:17:58,785 ERROR [TaskExecuter[0]] com.servoy.j2db.util.Debug - Throwable
java.io.IOException: runtime_db/dbeng10: cannot execute
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:52)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:507)
at com.servoy.j2db.runtime.Zb.run(Zb.java:5)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:9)
at java.lang.Thread.run(Thread.java:613)
2009-02-13 14:18:15,551 ERROR [main] com.servoy.j2db.persistence.Server - Final get connection failure for server coperta in 6 times
2009-02-13 14:18:15,552 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.Zc.createConnection(Zc.java:3)
at com.servoy.j2db.persistence.datasource.Zr.makeObject(Zr.java:19)
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.BasicPoolingDataSource.getConnection(BasicPoolingDataSource.java:79)
at com.servoy.j2db.persistence.Server.getConnection(Server.java:375)
at com.servoy.j2db.persistence.Server.testConnection(Server.java:1054)
at com.servoy.j2db.runtime.J2DBRuntimeClient.Zt(J2DBRuntimeClient.java:86)
at com.servoy.j2db.runtime.J2DBRuntimeClient.dataServerInit(J2DBRuntimeClient.java:14)
at com.servoy.j2db.runtime.J2DBRuntimeClient.startupApplication(J2DBRuntimeClient.java:26)
at com.servoy.j2db.runtime.J2DBRuntimeClient.main(J2DBRuntimeClient.java:25)
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 Za.main(Za.java:25)
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)
… 16 more
2009-02-13 14:18:18,395 ERROR [main] com.servoy.j2db.util.Debug - Throwable
java.lang.NullPointerException
at com.servoy.j2db.FlattenedSolution.Za(FlattenedSolution.java:380)
at com.servoy.j2db.FlattenedSolution.setSolution(FlattenedSolution.java:15)
at com.servoy.j2db.ClientState.handleLoadedSolution(ClientState.java:117)
at com.servoy.j2db.J2DBClient.handleLoadedSolution(J2DBClient.java:74)
at com.servoy.j2db.runtime.J2DBRuntimeClient.startupApplication(J2DBRuntimeClient.java:122)
at com.servoy.j2db.runtime.J2DBRuntimeClient.main(J2DBRuntimeClient.java:25)
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 Za.main(Za.java:25)

Any idea what it could be?

The first error is about not being able to start the database; maybe you have another sybase started or some permission problem ? Do you have the runtime_db folder having the same content as application_server/sybase_runtime_db/macosx ?

Hi Laurian,

The content of both folders is the same with exception of the charset folder in the runtime_db.

I also tried to run the application on a computer that has no Servoy or Sybase installed,… no go.
The runtime runs fabulously as long as the dbserv10 is started.

The script to start the sybase is:
runtime_db/dbeng10 -ti 0 -ga -qs -qw -o runtime_db/sybase_log.txt database/technica#DYLD_LIBRARY_PATH=runtime_db

Run this from command line (from your export folder) and see if it starts. Maybe you are not running from export folder ( and then the paths are not found)? If the command line works well it should also work if you start your application from the same folder.

Permission denied!!!

Just to be sure I attach the permissions of dbeng10

I remember I had a similar issue a couple of years ago and it was due to a missing execute permission on a DB file (don’t remember which one exactly), try to compare the permissions of the db files (also the executables) of your standard install and of the runtime, you can do it in the terminal using “ls -la”.

commandline in the directory where dbeng10 resides try:

chmod +x dbeng10

Yes, that was the issue I had.

Hello Jan,

I did it. but it doesn’t help. I can see dbeng10 in the activity monitor and this time I have a sybase log.

I. 02/14 12:39:15. Running Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 on X86 (X86_64)
I. 02/14 12:39:15. Server built for X86 processor architecture
I. 02/14 12:39:16. Database server started at Sat Feb 14 2009 12:39
I. 02/14 12:39:16. Trying to start SharedMemory link …
I. 02/14 12:39:16. SharedMemory link started successfully
I. 02/14 12:39:16. Trying to start TDS (TCPIP) link …
I. 02/14 12:39:16. Unable to start on default port; starting on port 49152 instead
I. 02/14 12:39:16. TDS (TCPIP) link started successfully
I. 02/14 12:39:16. Now accepting requests
I. 02/14 12:39:21. Cache size adjusted to 79116K
I. 02/14 12:39:26. Cache size adjusted to 77744K
I. 02/14 12:39:31. Cache size adjusted to 77404K
I. 02/14 12:39:36. Cache size adjusted to 77320K

To be clear what I did is:
Create a runtime with the builder on a Mac for the Mac
Close the dbserv10 in the Activity Monitor
Copy the database and the databaselog from the Servoy-> application_server to te database folder of the runtime
“chmod +x dbeng10” in the Terminal
Start the runtime… no go

Ok, I restarted the computer, just to make sure that there was nothing using the 2638 port. Now its working. But… I compressed the runtime and decompressed it on another Mac with no Servoy or Sybase installed and the problem shows up again. This time a little bit different. It starts dbeng10 corectly as shown in the sybase.log.

I. 02/14 16:20:47. Running Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 on X86 (X86_64)
I. 02/14 16:20:47. Server built for X86 processor architecture
I. 02/14 16:20:47. Database server started at Sat Feb 14 2009 16:20
I. 02/14 16:20:47. Trying to start SharedMemory link …
I. 02/14 16:20:47. SharedMemory link started successfully
I. 02/14 16:20:47. Trying to start TDS (TCPIP) link …
I. 02/14 16:20:47. Starting on port 2638
I. 02/14 16:20:47. TDS (TCPIP) link started successfully
I. 02/14 16:20:47. Now accepting requests
I. 02/14 16:20:52. Cache size adjusted to 79116K
I. 02/14 16:20:57. Cache size adjusted to 77744K
I. 02/14 16:21:02. Cache size adjusted to 77404K
I. 02/14 16:21:07. Cache size adjusted to 77320K

But it seems to miss a driver when I start the application.

2009-02-14 16:21:03,097 ERROR [main] com.servoy.j2db.persistence.Server - Final get connection failure for server coperta in 6 times
2009-02-14 16:21:03,102 ERROR [main] com.servoy.j2db.util.Debug - Throwable
java.sql.SQLException: JDBC Driver ‘com.sybase.jdbc3.jdbc.SybDriver’ not found in classpath or drivers directory : java.lang.ClassNotFoundException: com.sybase.jdbc3.jdbc.SybDriver com.sybase.jdbc3.jdbc.SybDriver
at com.servoy.j2db.persistence.Server.createDataSource(Server.java:755)
at com.servoy.j2db.persistence.Server.getConnection(Server.java:375)
at com.servoy.j2db.persistence.Server.testConnection(Server.java:1054)
at com.servoy.j2db.runtime.J2DBRuntimeClient.Zt(J2DBRuntimeClient.java:86)
at com.servoy.j2db.runtime.J2DBRuntimeClient.dataServerInit(J2DBRuntimeClient.java:14)
at com.servoy.j2db.runtime.J2DBRuntimeClient.startupApplication(J2DBRuntimeClient.java:26)
at com.servoy.j2db.runtime.J2DBRuntimeClient.main(J2DBRuntimeClient.java:25)
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 Za.main(Za.java:25)
2009-02-14 16:21:05,726 ERROR [main] com.servoy.j2db.util.Debug - Throwable
java.lang.NullPointerException
at com.servoy.j2db.FlattenedSolution.Za(FlattenedSolution.java:380)
at com.servoy.j2db.FlattenedSolution.setSolution(FlattenedSolution.java:15)
at com.servoy.j2db.ClientState.handleLoadedSolution(ClientState.java:117)
at com.servoy.j2db.J2DBClient.handleLoadedSolution(J2DBClient.java:74)
at com.servoy.j2db.runtime.J2DBRuntimeClient.startupApplication(J2DBRuntimeClient.java:122)
at com.servoy.j2db.runtime.J2DBRuntimeClient.main(J2DBRuntimeClient.java:25)
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 Za.main(Za.java:25)

Just to be sure I have restarted the computer and I checked that it is updated to the last Java.

The idea is to distribute the runtime as a demo, I have to be sure that it is working without having the customer typing in the Terminal or doing complicated things.

you should have jconn3.jar in drivers folder

It’s there. Thats the problem, everything seems to be Ok but it isn’t

Now I tried the same with de Sample CRM… same result. On my computer starts regularly but not on a computer with no servoy installed.

Could it be a bug?

Yes, this looks like a bug, please file a case in our support system.