after Win XP crash, can't reconnect to Sybase ASA

Ever since doing a hard-restart of my Win XP machine I’ve been unable to connect to any Sybase ASA repository or db from Servoy. I did a fresh re-install of the Java JDK and of Servoy but still can’t connect. I’ve reviewed every thread on the forum I could find that seemed relevant but nothing has worked. I’ve obviously hosed something, and I’m hoping someone can help be figure out what.

After the crash, my previously working installation of Servoy (2.2.5) started up, ASA started up, but the repository db was damaged and Servoy couldn’t connect to it. So I replaced my entire databases folder with the one from a fresh inststall and now I get “cannot connect to the repository server specified in the application preferences…”.

.log.txt contains:

Thread:TaskExecuter[3] : 2006-05-23 16:15 : Final get connection failure for server repository_server in 1 times
Thread:TaskExecuter[3] : 2006-05-23 16:15 : org.apache.commons.dbcp.DbcpException: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused: connect
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.q$2.run(Unknown Source)
at com.servoy.j2db.util.ao.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused: connect
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)
… 10 more

sybase_log.txt contains:

I. 05/23 16:12:52. Database server started at Tue May 23 2006 16:12
I. 05/23 16:12:52. Trying to start SharedMemory link …
I. 05/23 16:12:52. SharedMemory link started successfully
I. 05/23 16:12:52. Trying to start TCPIP link …
I. 05/23 16:12:53. Starting on port 2638
I. 05/23 16:12:53. TCPIP link started successfully
I. 05/23 16:12:53. Now accepting requests

sybase.config is configured properly. repository_server connection is configured correctly.

Another strange thing: I did a fresh intsallation of Servoy (in a separate folder), and when I try to start THAT copy of Servoy it doesn’t even start up - I double-click on servoy_developer.jar and nothing happens.

Any ideas?

Some new info:

I ran CHKDSK on my hard drive to repair any damaged sectors, and then I attempted another installation of Servoy. It completed successfully, the installer created an error log file containing the following (see below). The installed Servoy still does absolutely nothing when double-clicked.

An unexpected error has been detected by HotSpot Virtual Machine:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d6dcc17, pid=2832, tid=2676

Java VM: Java HotSpot™ Client VM (1.5.0_06-b05 mixed mode, sharing)

Problematic frame:

V [jvm.dll+0x6cc17]

--------------- T H R E A D ---------------

Current thread (0x00357b40): VMThread [id=2676]

siginfo: ExceptionCode=0xc0000005, reading address 0x03c2fcb0

Registers:
EAX=0x03c2fcb4, EBX=0x00000000, ECX=0x02abfe20, EDX=0x00942480
ESP=0x02abfdcc, EBP=0x02abfde0, ESI=0x02abfdd4, EDI=0x02abfe30
EIP=0x6d6dcc17, EFLAGS=0x00010216

Top of Stack: (sp=0x02abfdcc)
0x02abfdcc: 02abfe30 02abfe20 02abfdf0 03c2fc8c
0x02abfddc: 00948253 02abfe04 6d6dcb72 02abfdf8
0x02abfdec: 02abfe30 00821660 02dcccf0 03c2fcb4
0x02abfdfc: 03c2fc8c 00948253 02abfebc 6d77afbc
0x02abfe0c: 02abfeb0 02abfe30 00000000 00821660
0x02abfe1c: 02dcccf0 03c2fc8c 00948253 03c2fcb4
0x02abfe2c: 00821600 00357b40 00000014 00000001
0x02abfe3c: 00000000 00000000 00000010 00000001

Instructions: (pc=0x6d6dcc17)
0x6d6dcc07: 08 00 55 8b ec 83 ec 0c 8b 41 08 56 57 8d 75 f4
0x6d6dcc17: 8b 48 fc 89 4d f4 8b 08 8b 40 04 89 4d fc 89 45

Stack: [0x02a80000,0x02ac0000), sp=0x02abfdcc, free space=255k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x6cc17]
V [jvm.dll+0x6cb72]
V [jvm.dll+0x10afbc]

VM_Operation (0x039af5c4): exit, mode: safepoint, requested by thread 0x02cb9e48

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x02dcccf0 JavaThread “Thread-4” [_thread_in_native, id=3492]
0x00917d58 JavaThread “TimerQueue” daemon [_thread_blocked, id=3928]
0x00821f58 JavaThread “DestroyJavaVM” [_thread_blocked, id=3672]
0x02cb9e48 JavaThread “AWT-EventQueue-0” [_thread_blocked, id=1448]
0x02df1cf8 JavaThread “AWT-Shutdown” [_thread_blocked, id=3796]
0x02ea82e0 JavaThread “Java2D Disposer” daemon [_thread_blocked, id=3840]
0x008b8a20 JavaThread “Low Memory Detector” daemon [_thread_blocked, id=3592]
0x008b75e8 JavaThread “CompilerThread0” daemon [_thread_blocked, id=3816]
0x008b19e8 JavaThread “Finalizer” daemon [_thread_blocked, id=3720]
0x00358ca8 JavaThread “Reference Handler” daemon [_thread_blocked, id=2672]

Other Threads:
=>0x00357b40 VMThread [id=2676]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00821600/0x000000e0] Safepoint_lock - owner thread: 0x00357b40
[0x00821630/0x000000e8] Threads_lock - owner thread: 0x00357b40

Heap
def new generation total 576K, used 430K [0x22a70000, 0x22b10000, 0x22f50000)
eden space 512K, 74% used [0x22a70000, 0x22acf850, 0x22af0000)
from space 64K, 75% used [0x22b00000, 0x22b0c108, 0x22b10000)
to space 64K, 0% used [0x22af0000, 0x22af0000, 0x22b00000)
tenured generation total 3972K, used 3623K [0x22f50000, 0x23331000, 0x26a70000)
the space 3972K, 91% used [0x22f50000, 0x232d9de0, 0x232d9e00, 0x23331000)
compacting perm gen total 8192K, used 1202K [0x26a70000, 0x27270000, 0x2aa70000)
the space 8192K, 14% used [0x26a70000, 0x26b9ca40, 0x26b9cc00, 0x27270000)
ro space 8192K, 63% used [0x2aa70000, 0x2af7b178, 0x2af7b200, 0x2b270000)
rw space 12288K, 46% used [0x2b270000, 0x2b809fa8, 0x2b80a000, 0x2be70000)

Dynamic libraries:
0x00400000 - 0x0040c000 C:\Program Files\Java\jre1.5.0_06\bin\javaw.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f57000 C:\WINDOWS\system32\GDI32.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d670000 - 0x6d804000 C:\Program Files\Java\jre1.5.0_06\bin\client\jvm.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x5cd70000 - 0x5cd77000 C:\WINDOWS\system32\serwvdrv.dll
0x5b0a0000 - 0x5b0a7000 C:\WINDOWS\system32\umdmxfrm.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jre1.5.0_06\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d640000 - 0x6d64c000 C:\Program Files\Java\jre1.5.0_06\bin\verify.dll
0x6d300000 - 0x6d31d000 C:\Program Files\Java\jre1.5.0_06\bin\java.dll
0x6d660000 - 0x6d66f000 C:\Program Files\Java\jre1.5.0_06\bin\zip.dll
0x6d000000 - 0x6d167000 C:\Program Files\Java\jre1.5.0_06\bin\awt.dll
0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.dll
0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
0x5ad70000 - 0x5ada8000 C:\WINDOWS\system32\uxtheme.dll
0x73760000 - 0x737a9000 C:\WINDOWS\system32\ddraw.dll
0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
0x73940000 - 0x73a10000 C:\WINDOWS\system32\D3DIM700.DLL
0x74720000 - 0x7476b000 C:\WINDOWS\system32\MSCTF.dll
0x60230000 - 0x60240000 C:\Program Files\Qurb\QSP-3.0.311.7\QOEHook.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x63000000 - 0x63014000 C:\WINDOWS\system32\SynTPFcs.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x7c9c0000 - 0x7d1d5000 C:\WINDOWS\system32\shell32.dll
0x773d0000 - 0x774d2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
0x5d090000 - 0x5d127000 C:\WINDOWS\system32\comctl32.dll
0x6d240000 - 0x6d27d000 C:\Program Files\Java\jre1.5.0_06\bin\fontmanager.dll
0x6d4c0000 - 0x6d4d3000 C:\Program Files\Java\jre1.5.0_06\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x6d4e0000 - 0x6d4e9000 C:\Program Files\Java\jre1.5.0_06\bin\nio.dll
0x76fd0000 - 0x7704f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x77920000 - 0x77a13000 C:\WINDOWS\system32\SETUPAPI.dll
0x77b40000 - 0x77b62000 C:\WINDOWS\system32\Apphelp.dll
0x6d1c0000 - 0x6d1e3000 C:\Program Files\Java\jre1.5.0_06\bin\dcpr.dll
0x769c0000 - 0x76a73000 C:\WINDOWS\system32\USERENV.dll
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\netapi32.dll
0x76980000 - 0x76988000 C:\WINDOWS\system32\LINKINFO.dll
0x76990000 - 0x769b5000 C:\WINDOWS\system32\ntshrui.dll
0x76b20000 - 0x76b31000 C:\WINDOWS\system32\ATL.DLL

VM Arguments:
java_command: D:\MIS\Partners\Servoy\Installer\servoy_installer2.jar
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=C:\Program Files\Java\jre1.5.0_05\lib\ext\QTJava.zip
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;d:\myps\orant\BIN;C:\Program Files\Sybase\SQL Anywhere 9\drivers;C:\Program Files\Sybase\SQL Anywhere 9\win32;C:\Program Files\Sybase\Shared\win32;C:\Program Files\Sybase\Shared\Sybase Central 4.3\win32;C:\Program Files\QuickTime\QTSystem
USERNAME=user
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 11 Stepping 1, GenuineIntel

--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 2

CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

Memory: 4k page, physical 515052k(135900k free), swap 1255284k(907544k free)

vm_info: Java HotSpot™ Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by “java_re” with MS VC++ 6.0

Strange, can you try this:

  1. reboot pc
  2. delete sybase log file
  3. launch servoy: does ASA get launched? what is in the logfile?

on a side note: most probably your old database is not damaged, all you need to do is truncate the last transaction by starting it once using dbsrv -f

I did what you said with my only installation of 2.2.5 which still launches servoy. The entire database folder was copied over from a fresh install, as were the sybase_db folder and the drivers folder.

Servoy DID launch
ASA DID launch
sybase_log.txt contains:

I. 05/24 00:56:10. Running on Windows XP Build 2600 Service Pack 2
I. 05/24 00:56:13. Database server started at Wed May 24 2006 00:56
I. 05/24 00:56:13. Trying to start SharedMemory link …
I. 05/24 00:56:13. SharedMemory link started successfully
I. 05/24 00:56:13. Trying to start TCPIP link …
I. 05/24 00:56:13. Starting on port 2638
I. 05/24 00:56:13. TCPIP link started successfully
I. 05/24 00:56:13. Now accepting requests

I tried dbsrv.exe -f on my old repository and it failed:

Internal database error / Assertion Failed / Attempt to write an invalid definition page – transaction rolled back.

It also mentiones that servoy_repository.db contains 45 disk fragments which sounds like a lot for a 15MB db. I plan on defragmenting my hard drive overnight tonight.

Any other thoughts? Thanks a lot for your attention to this.

Jan Aleman worked with me off-line to solve these problems and I will summarize our findings here.

The problem I was having connecting to the ASA db was because my firewall (Norton Personal Firewall) was blocking all access to dbsrv9.exe, which is the ASA database server. Resetting the firewall permissions on dbserv9.exe to permit all access solved the problem. We noticed that the firewall permissions were stored separately for each copy of dbserv9.exe on my system (I had one for each installation of Servoy on my hard drive) so we had to reset permissions for each copy of dbsrv9.exe individually.

The problem with Servoy simply not launching when I double-clicked on servoy_developer.jar was because it was contained in a folder called “Servoy R2 #2”. It turns out that java doesn’t like the “#” character in the pathname. Removing it fixed the problem.

I learned from Jan that in situations like these you can find out more about what’s going on by using the command prompt and typing:

java -jar <path_and_name_of_jar_file>

as opposed to double-clicking on the file in windows.

Example:

java -jar “C:\Program Files\Servoy\servoy_developer.jar”

I hope this info helps someone down the road. Thanks to Jan for your help.

Thanks for reporting. I think the, in fact, 2 issues here and the way they are solved can be important for others indeed.

Suggestion: it might be a good idea to break the message up and place them in the ‘howto’ or a new ‘troubleshooting’ forum…

It is getting harder and harder to find previous posts and as a result questions are posted over and over again and as a result is it getting harder and blablabla…