cannot setup new named server connection

everything was working fine..
I tried to test the solution in the client on the same computer. Something happened (don’t know what) I had to force the exit from the client by stopping the process.
Stopped servoy. Restart gives the “can’t connect to server error”. In the process monitor I see that dbsrv9 starts but stops right away.
I try several times: same result.
I do a clean servoy install trashing the original folder (I backup my .db first).
I start Servoy again: no problem connecting to server.
I go in prefs to add my named server and always get this message:

java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).

What is going on? I don’t know what to do about it (nor know how to get to the SQLWarnings either).

I had had the same message before after trying to connect to a db created with the command line but solved it recreating it in sybase central (which doesn’t make much sense to me, but…).
I’ll try to restart the computer once again (already did once) and do another clean install…

Configuration:
System OSX 10.3.5 on PowerBook G5
Servoy R2 2.1 buil 310
Java 1.4.2-38 (mac osx)

I’m interested in responses to this, too.

I’m VERY new to Servoy, and I’m finding the server config to be awfully finicky. In the week or so I’ve been working with it, I’ve broken the connection to the repository or database several times.

Incidentally, I’ve noticed that when you get errors, and click cancel, your bad settings are still saved. Is this intended? I would expect to go back to the original good settings.

Mainly, though, how DOES one “Examine the SQLWarnings chained to this exception for the reason(s)”?

I’m still stuck with the problem… which means I can have a working Servoy application but CANNOT add any new named server! (ie: the solution I am working on is unusable).

I have checked the Developer user guide at paragraph 13.8 and followed everything at least ten times.
If I stop the dbsrv9 process to put the db in the database folder, add the name to sybase.config and launch Servoy, the dbsrv9 starts and then stops, and this gives rise to the java error…

What I have recently discovered is that fixing the sybase.config to the original generated by the servoy installer, will make the dbsrv9 stay open and thus permit Servoy functionality, but obviously I can’t add the new named server…

In the meanwhile, I am trying to start using MySQL to create my databases and so use its driver to connect to them in Servoy(it looks like it might be a sybase problem).

Can you see what the sybase_log (in the sybase_db directory) tells you?
It should report any errors while opening the databases.

how do you put a db in a folder?
What files are you copying?
What happens if you just create a new db through sybase central? (and add that one to the sybase.config)
Can you then start it? And connect to it? (through sybase central! and servoy?)

Cain:
Mainly, though, how DOES one “Examine the SQLWarnings chained to this exception for the reason(s)”?

Look in the sybase log (sybase_log.txt file inside the sybase_db folder/directory).

jcompagner:
how do you put a db in a folder?
What files are you copying?
What happens if you just create a new db through sybase central? (and add that one to the sybase.config)
Can you then start it? And connect to it? (through sybase central! and servoy?)

The file I had “put” in the servoy database folder was a copy of the db file (“codes.db”) I had saved before the crash.
Maybe it was corrupted?

Here’s the last test I’ve done:

  1. created a db (“new.db”) from sybase central, saving it directly into “Servoy/database/” folder

  2. added the line “database/new.db” in “sybase.config”

  3. stopped dbsrv9 and launched servoy → OK (dbsrv9 stays open)

  4. no problem adding the newly created “new.db” to the named servers’ list (using “autosetup SybaseASA”)

  5. exit servoy, stop dbsrv9

  6. put my backup copy of “codes.db” file into “Servoy/database/” and added “database/codes.db” in “sybase.config”

  7. launch servoy → error (dbsrv9 starts and stops). Exit servoy

  8. fix sybase.config back to original (erased the line “database/codes.db” from the bottom of the list)

  9. launched servoy → OK (dbsrv9 stays open). exit servoy

  10. from sybase central, tried to open “codes.db”. This is the result:

[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access violation: Request to start/stop database denied
Error code=-75
SQL state=42000

Connection parameters:
User=dba
Password=***
DBF=/Users/mike/Desktop/Servoy/database/codes.db

  1. launch servoy once again: no problem
  2. I do steps 5 and 6 once again as final check, expecting problems with dbsrv9
  3. this time servoy gives no error, and I can open the crm solution BUT there is no dbsrv9 process showing in the monitor window!
  4. I try to “autosetup sybaseASA” to connect to “codes.db” (which is still inside “Servoy/database/” and in the “sybase.config” list), and get the following message:

cannot setup server:
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).

  1. Exit servoy. Tried another launch → OK: I can open crm, but still no dbsrv9 process showing in the monitor window.

  2. exit servoy. restart computer.

  3. launch servoy. dbsrv9 starts and stops:

cannot connect to repository:
java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused

  1. fix “sybase.config” (I had, on purpose, left the “database/codes.db” line in it)
  2. launch servoy, expecting no problems and.. yes, dbsrv9 starts and and stays open but when I get to the “open solution” dialog and press “OK” to open crm, I get the “Application suddenly terminated” message with a “JavaAppletStub error” and the option to send the report to Apple.
    Meanwhile, dbsrv9 is still running

I have saved the report which is attached.

This has already happened 2 other times while running Servoy and I had sent the report to Apple..
In those cases, there had been no problem when immediately restarting servoy and opening the solution I was working on..

Just one more consideration:

If it had been a problem with file corruption (but I had saved a copy of my db “before” the crash), wouldn’t it be correct, and safer, for the application (servoy) to check this and give warnings?
And then (excuse my lack of expertise) how do I recover at least the structure of my original db - not speaking of the data in it…- if even my backup copy doesn’t work?

thank you for your time everybody :!:

did you look in sybase_log.txt? What does it say?

jaleman:
did you look in sybase_log.txt? What does it say?

Sorry, I forgot to enclose it:

E. 09/20 10:38:04. Cannot open transaction log file – No such file or directory

OK, it’s fixed! (thanks jaleman…)
Did some unix study and some sybase administrator manual browsing.
It has been useful…

One of my two offending files was named “contatti.db”.

This is how I fixed it (in terminal):

cd /Users/mike/Desktop/Servoy/sybase_db
export DYLD_LIBRARY_PATH=/Users/mike/Desktop/Servoy/sybase_db
export PATH=$PATH:/Users/mike/Desktop/Servoy/sybase_db
export DYLD_BIND_AT_LAUNCH=1
/Users/mike/Desktop/Servoy/sybase_db/dbsrv9 /Users/mike/Desktop/contatti.db -f

this is the output:


Adaptive Server Anywhere Network Server Version 9.0.1.1753

Copyright (c) 1989-2004 Sybase, Inc.
Portions Copyright (c) 2002-2004, iAnywhere Solutions, Inc.
All rights reserved. All unpublished rights reserved.

This software contains confidential and trade secret information of
iAnywhere Solutions, Inc.
Use, duplication or disclosure of the software and documentation
by the U.S. Government is subject to restrictions set forth in a license
agreement between the Government and iAnywhere Solutions, Inc. or
other written agreement specifying the Government’s rights to use the
software and any applicable FAR provisions, for example, FAR 52.227-19.

iAnywhere Solutions, Inc., One Sybase Drive, Dublin, CA 94568, USA

Per-processor licensing model. The server is limited to use 2 processor(s).
This server is licensed to:
“Jan Aleman”
“Servoy”
8192K of memory used for caching
Minimum cache size: 8192K, maximum cache size: 26172K
Using a maximum page size of 2048 bytes
Starting database “contatti” (/Users/mike/Desktop/contatti.db) at Mon Sep 20 2004 18:55
Database recovery in progress
Last checkpoint at Fri Sep 17 2004 14:22
Checkpoint log…
Transaction log: contatti.log…
Forcing recovery without transaction log
Rollback log…
Checkpointing…
Starting checkpoint of “contatti” (contatti.db) at Mon Sep 20 2004 18:55
Finished checkpoint of “contatti” (contatti.db) at Mon Sep 20 2004 18:55
Recovery complete
Database server stopped at Mon Sep 20 2004 18:55

I modified “sybase.config”, put the file back in “Servoy/database/”, launched servoy (OK), go in prefs and add server with autosetup → OK !!!
:lol:

i had the same problem…server crashed and couldn’t open transction log. I used the -f on each of my databses and was able to start sybase again. thanks!

Bo