Hi,
I'm currently developing an executable jar application. I've got a problem in connecting to the DB2 server after packaging the application into a jar file. Below is the error that I encountered:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d6c9a1f, pid=2296, tid=2260
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode, sharing)
# Problematic frame:
# V [jvm.dll+0x89a1f]
#
# An error report file with more information is saved as hs_err_pid2296.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
And here's the detailed log:
--------------- T H R E A D ---------------
Current thread (0x02cc7e00): JavaThread "AWT-EventQueue-0" [_thread_in_vm, id=2260]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
Registers:
EAX=0x00000000, EBX=0x00000000, ECX=0x02d12fe8, EDX=0x00ac2d60
ESP=0x0742f090, EBP=0x0742f0c0, ESI=0x02cc7e00, EDI=0x00ac2d58
EIP=0x6d6c9a1f, EFLAGS=0x00010206
Top of Stack: (sp=0x0742f090)
0x0742f090: 02cc7ebc 02cc7ebc 26b15cf0 02cc7ebc
0x0742f0a0: 02cc7ebc 6d68086a 6d64aa71 02cc7e00
0x0742f0b0: 0742f0e0 6d6c62ad 02cc7e00 00ac2d58
0x0742f0c0: 0742f0e0 1000a647 02cc7ebc 00000000
0x0742f0d0: 100130c8 00ac2d5c 02cc7e00 26b15cf0
0x0742f0e0: 0742f100 100039b0 02cc7ebc 00000000
0x0742f0f0: 00000000 00000000 02cc7e00 26b15cf0
0x0742f100: 0742f130 00ad826f 02cc7ebc 0742f144
Instructions: (pc=0x6d6c9a1f)
0x6d6c9a0f: a9 00 00 00 39 5d 14 0f 84 a0 00 00 00 8b 45 0c
0x6d6c9a1f: ff 30 e8 2a 97 ff ff 59 50 56 8d 4d 08 e8 da c3
Stack: [0x073f0000,0x07430000), sp=0x0742f090, free space=252k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x89a1f]
C [db2jdbc.dll+0xa647]
C [db2jdbc.dll+0x39b0]
j COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv([I)I+0
j COM.ibm.db2.jdbc.app.DB2Driver.<init>()V+628
j COM.ibm.db2.jdbc.app.DB2Driver.<clinit>()V+27
v ~StubRoutines::call_stub
V [jvm.dll+0x8295c]
V [jvm.dll+0xd752e]
V [jvm.dll+0x8282d]
V [jvm.dll+0x75a9c]
V [jvm.dll+0x7499d]
V [jvm.dll+0x9ff40]
V [jvm.dll+0x99269]
C [java.dll+0x13d8]
j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5
j ort.cip.client.DB2Connection.connect_query(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Z)Lcom/jrefinery/data/XYDataset;+19
j ort.cip.client.ORT_Charting_Main.jButton1_ActionEvents()V+369
j ort.cip.client.ORT_Charting_Main.connEtoC2()V+1
j ort.cip.client.ORT_Charting_Main.access$5(Lort/cip/client/ORT_Charting_Main;)V+1
j ort.cip.client.ORT_Charting_Main$IvjEventHandler.actionPerformed(Ljava/awt/event/ActionEvent;)V+62
j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
j javax.swing.DefaultButtonModel.setPressed(Z)V+117
j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+477
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V+304
j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
j java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+233
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
V [jvm.dll+0x8295c]
V [jvm.dll+0xd752e]
V [jvm.dll+0x8282d]
V [jvm.dll+0x8258a]
V [jvm.dll+0x9d476]
V [jvm.dll+0x1042ae]
V [jvm.dll+0x10427c]
C [MSVCRT.dll+0x2a3b0]
C [kernel32.dll+0xb50b]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv([I)I+0
j COM.ibm.db2.jdbc.app.DB2Driver.<init>()V+628
j COM.ibm.db2.jdbc.app.DB2Driver.<clinit>()V+27
v ~StubRoutines::call_stub
j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5
j ort.cip.client.DB2Connection.connect_query(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Z)Lcom/jrefinery/data/XYDataset;+19
j ort.cip.client.ORT_Charting_Main.jButton1_ActionEvents()V+369
j ort.cip.client.ORT_Charting_Main.connEtoC2()V+1
j ort.cip.client.ORT_Charting_Main.access$5(Lort/cip/client/ORT_Charting_Main;)V+1
j ort.cip.client.ORT_Charting_Main$IvjEventHandler.actionPerformed(Ljava/awt/event/ActionEvent;)V+62
j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
j javax.swing.DefaultButtonModel.setPressed(Z)V+117
j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+477
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V+304
j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
j java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+233
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000352e8 JavaThread "DestroyJavaVM" [_thread_blocked, id=832]
=>0x02cc7e00 JavaThread "AWT-EventQueue-0" [_thread_in_vm, id=2260]
0x02cc4618 JavaThread "AWT-Shutdown" [_thread_blocked, id=848]
0x00aa1a38 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3720]
0x02cac008 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3756]
0x00a699f0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4020]
0x00a685c8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3556]
0x00a67860 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=880]
0x00a62ad0 JavaThread "Finalizer" daemon [_thread_blocked, id=2364]
0x00a615f0 JavaThread "Reference Handler" daemon [_thread_blocked, id=2796]
Other Threads:
0x00a5ed50 VMThread [id=2656]
0x00a677a0 WatcherThread [id=3492]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 292K [0x22a80000, 0x22b20000, 0x22f60000)
eden space 512K, 44% used [0x22a80000, 0x22ab9540, 0x22b00000)
from space 64K, 99% used [0x22b00000, 0x22b0fd78, 0x22b10000)
to space 64K, 0% used [0x22b10000, 0x22b10000, 0x22b20000)
tenured generation total 1408K, used 1304K [0x22f60000, 0x230c0000, 0x26a80000)
the space 1408K, 92% used [0x22f60000, 0x230a6278, 0x230a6400, 0x230c0000)
compacting perm gen total 8192K, used 640K [0x26a80000, 0x27280000, 0x2aa80000)
the space 8192K, 7% used [0x26a80000, 0x26b20080, 0x26b20200, 0x27280000)
ro space 8192K, 62% used [0x2aa80000, 0x2af8a3a0, 0x2af8a400, 0x2b280000)
rw space 12288K, 46% used [0x2b280000, 0x2b8103d8, 0x2b810400, 0x2be80000)
Dynamic libraries:
0x00400000 - 0x0040c000 C:\WINDOWS\system32\java.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
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d640000 - 0x6d7cc000 C:\Program Files\Java\jre1.5.0_05\bin\client\jvm.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jre1.5.0_05\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d610000 - 0x6d61c000 C:\Program Files\Java\jre1.5.0_05\bin\verify.dll
0x6d300000 - 0x6d31d000 C:\Program Files\Java\jre1.5.0_05\bin\java.dll
0x6d630000 - 0x6d63f000 C:\Program Files\Java\jre1.5.0_05\bin\zip.dll
0x6d000000 - 0x6d167000 C:\Program Files\Java\jre1.5.0_05\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
0x63000000 - 0x63014000 C:\WINDOWS\system32\SynTPFcs.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x7c9c0000 - 0x7d1d5000 C:\WINDOWS\system32\shell32.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.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_05\bin\fontmanager.dll
0x6d4c0000 - 0x6d4d3000 C:\Program Files\Java\jre1.5.0_05\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_05\bin\nio.dll
0x10000000 - 0x10016000 C:\Program Files\SQLLIB\bin\db2jdbc.dll
0x6c000000 - 0x6c236000 C:\PROGRA~1\SQLLIB\BIN\DB2CLI.dll
0x6c770000 - 0x6ca25000 C:\PROGRA~1\SQLLIB\BIN\DB2SYS.dll
0x6e260000 - 0x6e26b000 C:\PROGRA~1\SQLLIB\BIN\DB2WINT.dll
0x07430000 - 0x07445000 C:\PROGRA~1\SQLLIB\BIN\DB2SYSP.dll
0x6c240000 - 0x6c4e1000 C:\PROGRA~1\SQLLIB\BIN\DB2APP.dll
0x6c620000 - 0x6c738000 C:\PROGRA~1\SQLLIB\BIN\DB2UTIL.dll
0x6c4f0000 - 0x6c529000 C:\PROGRA~1\SQLLIB\BIN\DB2ABIND.dll
0x07450000 - 0x07580000 C:\PROGRA~1\SQLLIB\BIN\db2osse.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\NETAPI32.dll
0x07580000 - 0x0758c000 C:\PROGRA~1\SQLLIB\BIN\db2locale.dll
0x07590000 - 0x075c8000 C:\PROGRA~1\SQLLIB\BIN\db2trcapi.dll
VM Arguments:
java_command: Charting.jar
Environment Variables:
CLASSPATH=.;C:\PROGRA~1\SQLLIB\java\db2java.zip;C:\PROGRA~1\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\SQLLIB\java\sqlj.zip;C:\PROGRA~1\SQLLIB\bin;C:\PROGRA~1\SQLLIB\java\common.jar
PATH=C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\WINDOWS\Downloaded Program Files;C:\IBMTOOLS\Python22;C:\Program Files\PC-Doctor for Windows\services;C:\Program Files\IBM\Trace Facility;C:\Program Files\Personal Communications;C:\IMNnq_NT;C:\PROGRA~1\Tcl\bin;C:\PROGRA~1\SQLLIB\BIN;C:\PROGRA~1\SQLLIB\FUNCTION;C:\j2sdk1.4.2_10\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\CMVC\exe;C:\CMVC\exe\bin;C:\CMVC\bin
USERNAME=nugraha
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 6, 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, sse2
Memory: 4k page, physical 261040k(31956k free), swap 639216k(137944k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_05-b05) for windows-x86, built on Aug 26 2005 15:36:02 by "java_re" with MS VC++ 6.0
I found out that this error came out when the following part of the code was executed (see the one in
bold):
public static com.jrefinery.data.XYDataset connect_query(
java.lang.String drive_SN,
java.lang.String start_Date,
java.lang.String end_Date,
boolean[] checkBox_group) {
TimeSeriesCollection collection = new TimeSeriesCollection();
BasicTimeSeries[] param_value;
try {
// load the DB2 Driver
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
// establish a connection to DB2
Connection db2Conn = DriverManager.getConnection("jdbc:db2:FOXDBS_S","myID","mypass");
// use a statement to gather data from the database
Statement st = db2Conn.createStatement();
String myQuery = info_query;
// execute the query
ResultSet resultSet = st.executeQuery(myQuery);
.
.
.
.
// clean up resources
resultSet.close();
st.close();
db2Conn.close();
} catch (ClassNotFoundException cnfe) {
cnfe.printStackTrace();
} catch (SQLException sqle) {
sqle.printStackTrace();
}
XYDataset data = collection;
return data;
}
This code actually worked fine when I ran it from VisualAge for Java environment.
I'm currently using J2SDK version 1.4.2_10 and J2RE version 1.4.2_10.
Appreciate any help that you all can suggest. I've been looking for this error on the web. Seems like this has been a known and common problem but I couldn't find the working answer so far. Thank you in advance for any help.
Chris