Problem Switching between versions

I’m currently transitioning my solution from 3.5.10 to 4.1.5

I have two folders:
Applications/Servoy 3.5 and Applications/Servoy4x
Both installs are using Sybase 9.0.2, presumably their own copies.

I have been able to fire up Servoy 3.5 and export a solution, shut it down, kill dbsrv9, then fire up Servoy v4.1.5 and then import the solution etc. I have been working in the latter solution fixing up various issues that arose with the import. For some reason I had to return to v3.5 and now back in v4.1 I can’t get it to launch its own dbsrv9.

Watching it in the Activity Monitor (Mac OSX) I see dbspwn fire up briefly then die, followed quickly by dbsrv9. This is the java error thrown up

2010-03-12 03:53:45,571 ERROR [Thread-2] com.servoy.j2db.util.Debug - Throwable
com.servoy.j2db.persistence.RepositoryException: Could not find repository server: ‘repository_server’
at com.servoy.j2db.persistence.ServerManager.getRepositoryServer(ServerManager.java:413)
at com.servoy.j2db.server.ApplicationServer.initFromSerclipse(ApplicationServer.java:160)
at com.servoy.eclipse.core.ServoyModel.startAppServer(ServoyModel.java:395)
at com.servoy.eclipse.core.util.SplashHandler$1.run(SplashHandler.java:3)
at java.lang.Thread.run(Thread.java:613)
2010-03-12 03:53:46,002 ERROR [TaskExecuter[0]] com.servoy.j2db.persistence.Server - Final get connection failure for server user_data in 1 times
2010-03-12 03:53:46,006 ERROR [TaskExecuter[0]] com.servoy.j2db.persistence.Server - Final get connection failure for server example_data in 1 times
2010-03-12 03:53:46,007 ERROR [TaskExecuter[0]] com.servoy.j2db.persistence.Server - Final get connection failure for server log_server in 1 times
2010-03-12 03:53:46,010 ERROR [TaskExecuter[0]] com.servoy.j2db.persistence.Server - Final get connection failure for server udm in 1 times
2010-03-12 03:53:46,011 ERROR [TaskExecuter[0]] com.servoy.j2db.persistence.Server - Final get connection failure for server pdf_forms in 1 times

The v3.5 instance continues to load properly. It almost seems as if v4.1 is trying to launch the v3.5 instance and then finds the wrong repository and gives up. I got one dialog to that effect but not since.

I’m sort of wondering where the path is stored that is giving it that location.

I’m staring at reinstalling 4.1 yet again but hope someone has a quicker solution.

Lee

Lee,

The java exception is indeed caused by the db not running.

Are you using the bundled sybase? In that case you have to know that Servoy 4 comes with sybase ianywhere 10, not 9.

Servoy has no hardcoded link to sybase when starting, it just uses the nativeStartupLauncher setting (see Window->Prefs->Servoy->Startup) or the servoy.properties file, the servoy 4 for Mac default is:

nativeStartupLauncher=%%user.dir%%/sybase_db/dbspawn|%%user.dir%%/sybase_db/dbsrv10|@sybase_db/sybase.config#LC_CTYPE\=C|LANG\=C|DYLD_LIBRARY_PATH=sybase_db

You can try the command-line equivalent to see if sybase starts up:

cd /path/to/servoy/application_server
LC_CTYPE=C LANG=C DYLD_LIBRARY_PATH=sybase_db sybase_db/dbspawn sybase_db/dbsrv10 @sybase_db/sybase.config

Rob

rgansevles:
Are you using the bundled sybase? In that case you have to know that Servoy 4 comes with sybase ianywhere 10, not 9.

I think that is true for Intel Macs but Power PC Macs still get v9 since they can’t run v10 and Sybase Anywhere 10 won’t run on PPCs either. I wish it weren’t true but this is the startup line from servoy.properties in my 4.1.4 install, on both a G4 PowerBook and a G5 dual PPC:

nativeStartupLauncher=%%user.dir%%/sybase_db/dbspawn|%%user.dir%%/sybase_db/dbsrv9|@sybase_db/sybase.config\#LC_CTYPE\=C|LANG\=C|DYLD_LIBRARY_PATH\=sybase_db

It looks like the installer is smart enough to know which version to install.

So, back to my problem, if each directory (v3.5 or v4.1.4) has its own Sybase directory why doesn’t it launch its own instance? If I want to run two instances at once or force the right instance to run with the proper db how do I achieve that - different ports?

This is only short term, mind. As much as I like v3.5 I will pension it off as soon as I can get my sea legs with Eclipse. And a little while later v5.1 on an Intel box or that Sun Sparc gathering dust on my desk.

Lee,

The port is configured in /path/to/servoy/application_server/sybase_db/sybase.config

Then you also need to change the jdbc urls of the servers, the port numbers need to match

But i guess there is another issue causing the db not to start.

What happens if you do the following on the command line:

cd /path/to/servoy/application_server
LC_CTYPE=C LANG=C DYLD_LIBRARY_PATH=sybase_db sybase_db/dbspawn sybase_db/dbsrv9 @sybase_db/sybase.config

Rob

rgansevles:
What happens if you do the following on the command line:

cd /path/to/servoy/application_server

LC_CTYPE=C LANG=C DYLD_LIBRARY_PATH=sybase_db sybase_db/dbspawn sybase_db/dbsrv9 @sybase_db/sybase.config

I get this:

-Adaptive Server Anywhere Start Server In Background Utility Version 9.0.2.3045
DBSPAWN ERROR: -83
Specified database not found

Is the database specified by servoy.propereties? In which case what is wrong with this:

server.9.URL=jdbc\:sybase\:Tds\:localhost\:2638?ServiceName\=servoy_repository&CHARSET\=utf8
server.9.catalog=<none>
server.9.connectionValidationType=0
server.9.driver=com.sybase.jdbc3.jdbc.SybDriver
server.9.enabled=true
server.9.maxConnectionsActive=10
server.9.maxConnectionsIdle=10
server.9.maxPreparedStatementsIdle=100
server.9.password=encrypted\:something or other\=
server.9.schema=<none>
server.9.serverName=repository_server
server.9.userName=DBA

where the database resides in the database directory of application_server

bug_db.log
bug.db
bug.log
example.db
example.log
log_data.db
log_data.log
netreg.db
netreg.log
pdf_forms.db
pdf_forms.log
servoy_repository.db
servoy_repository.log
udm.db
UDM.log
user_data.db
user_data.log

and the sybase.config file has:

-ti 0 -x tcpip{dobroadcast=no;port=2638} -qs -qw -o sybase_db/sybase_log.txt
database/servoy_repository.db
database/user_data.db
database/example.db
database/log_data.db
database/udm.db
database/pdf_forms.db
database/bug_db.db

Lee,

The UDM.log in the database directory is strange.
The matching db file and the entry in the config file is in lowercase.

Try renaming UDM.log to udm.log and retry the command line

Rob

rgansevles:
Try renaming UDM.log to udm.log and retry the command line

No luck. I still get

DBSPAWN ERROR: -83

In a tribute to poor typing and the fragility of dataservers I found a typo in one database in sybase.config:
bug_db.db should be bug.db

I fixed it and now all seems well - except such a trivial error couldn’t crash an entire system could it?

Hi Lee,

lucidlee:
I fixed it and now all seems well - except such a trivial error couldn’t crash an entire system could it?

Yes and no. Sybase tries to open all listed databases in the config file. If it can’t open one of them it simply shuts down and logs the error. So yes it stops working but no it doesn’t crash.
Also Servoy doesn’t crash either. It simply stops trying to connect to a database server that isn’t there.

I thought this problem was permanently fixed but it seems that the startup string typed into the terminal, which includes an explicit path to dbsvr9, and which works, is not the same as the startup string stored in Servoy preferences. Needless to say the database doesn’t automatically kick into life when I startup Servoy. Why?

I’m thinking the startup link is wrong and in particular its probably the parameter %%user.dir%% whose precise content and whereabouts is unknown. Is it created and stored somewhere during installation? If so then I can’t move or rename the Servoy directory. And since I renamed the servoy directory to Servoy4x to distinguish it from the Servoy3x directory assume this is causing the problem. It’d be nice to understand where this parameter gets its value from. Else I’ll have to store and explicit path into the startup string.

[update] Reverted Servoy4x to Servoy without luck. I am so clueless as to what the differences in the two strings are.