I write a Thread connection pool by  jdbc:odbc to connect to Microsoft
Access2000,most of time my code runs well,but occasionally it raise
error,and make Tomcat shutdown automatically,like follows:
ERROR MESSAGES/STACK TRACES THAT OCCUR :
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c95f350, pid=788, tid=636
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
# Problematic frame:
# C [ntdll.dll+0x2f350]
#
--------------- T H R E A D ---------------
Current thread (0x0089c750): JavaThread "Thread-2" [_thread_in_native,
id=636]
siginfo: ExceptionCode=0xc0000005, writing address 0x00000008
Registers:
EAX=0x00000000, EBX=0x00000000, ECX=0x00000008, EDX=0x00000004
ESP=0x0871f974, EBP=0x0871f980, ESI=0x00000008, EDI=0x037525a8
EIP=0x7c95f350, EFLAGS=0x00010246
  Top of Stack: (sp=0x0871f974)
0x0871f974: 037525a8 00000000 00000008 0871f99c
0x0871f984: 4b784c16 00000004 037525cc 4b7527af
0x0871f994: 037525cc 037525a8 0871f9ac 4b75320d
0x0871f9a4: 037525cc 0089c810 0871f9e8 4b755766
0x0871f9b4: 037525a8 4b780000 0089c810 270659c8
0x0871f9c4: 00000001 0089c750 00000001 0871f9b8
0x0871f9d4: 0871f5a0 0871fc68 4b785705 4b7564f8
0x0871f9e4: ffffffff 0871fa04 4b7564cd 037525a8
Instructions: (pc=0x7c95f350)
0x7c95f340: 56 8d 72 04 57 89 75 fc b8 00 00 00 00 8b 4d fc
0x7c95f350: f0 0f b3 01 0f 92 c0 84 c0 0f 84 95 0f 00 00 64
Stack: [0x086e0000,0x08720000), sp=0x0871f974, free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
C [ntdll.dll+0x2f350]
C [ODBC32.dll+0x34c16]
C [ODBC32.dll+0x320d]
C [ODBC32.dll+0x5766]
C [ODBC32.dll+0x64cd]
C [JdbcOdbc.dll+0x11da]
j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement
(II)Ljava/sql/Statement;+27
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
j ConnectionPool.run()V+549
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x845a9]
V [jvm.dll+0xd9317]
V [jvm.dll+0x8447a]
V [jvm.dll+0x841d7]
V [jvm.dll+0x9ed69]
V [jvm.dll+0x109fe3]
V [jvm.dll+0x109fb1]
C [msvcrt.dll+0x2b530]
C [kernel32.dll+0x26063]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement
(II)Ljava/sql/Statement;+27
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
j .ConnectionPool.run()V+549
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x008d3dd0 JavaThread "TP-Monitor" daemon [_thread_blocked, id=2172]
0x008d2a70 JavaThread "TP-Processor4" daemon [_thread_in_native, id=3556]
0x008d0330 JavaThread "TP-Processor3" daemon [_thread_blocked, id=2228]
0x008d0ad0 JavaThread "TP-Processor2" daemon [_thread_blocked, id=236]
0x008d1e70 JavaThread "TP-Processor1" daemon [_thread_blocked, id=3280]
0x008c7930 JavaThread "http-5168-Monitor" [_thread_blocked, id=2260]
0x008c6670 JavaThread "http-5168-Processor25" daemon [_thread_in_native,
id=3260]
0x008c53b0 JavaThread "http-5168-Processor24" daemon [_thread_in_native,
id=2664]
0x008c4180 JavaThread "http-5168-Processor23" daemon [_thread_in_native,
id=2648]
0x008c4e70 JavaThread "http-5168-Processor22" daemon [_thread_blocked,
id=620]
0x008c3bb0 JavaThread "http-5168-Processor21" daemon [_thread_blocked,
id=2108]
0x008c28d0 JavaThread "http-5168-Processor20" daemon [_thread_blocked,
id=3528]
0x008c15d0 JavaThread "http-5168-Processor19" daemon [_thread_blocked,
id=2216]
0x008c0310 JavaThread "http-5168-Processor18" daemon [_thread_blocked,
id=3640]
0x008460a0 JavaThread "http-5168-Processor17" daemon [_thread_blocked,
id=2968]
0x008bf9d0 JavaThread "http-5168-Processor16" daemon [_thread_blocked,
id=280]
0x008be670 JavaThread "http-5168-Processor15" daemon [_thread_blocked,
id=3812]
0x008bd460 JavaThread "http-5168-Processor14" daemon [_thread_blocked,
id=3656]
0x008bc180 JavaThread "http-5168-Processor13" daemon [_thread_blocked,
id=1460]
0x008bce70 JavaThread "http-5168-Processor12" daemon [_thread_blocked,
id=2088]
0x008bbbb0 JavaThread "http-5168-Processor11" daemon [_thread_blocked,
id=2424]
0x008ba8d0 JavaThread "http-5168-Processor10" daemon [_thread_blocked,
id=4076]
0x008b95d0 JavaThread "http-5168-Processor9" daemon [_thread_blocked,
id=3568]
0x008b8310 JavaThread "http-5168-Processor8" daemon [_thread_blocked,
id=672]
0x008b70c0 JavaThread "http-5168-Processor7" daemon [_thread_blocked,
id=2184]
0x008b7dd0 JavaThread "http-5168-Processor6" daemon [_thread_blocked,
id=3612]
0x008b6a70 JavaThread "http-5168-Processor5" daemon [_thread_blocked,
id=3412]
0x008b5810 JavaThread "http-5168-Processor4" daemon [_thread_blocked,
id=840]
0x008b4490 JavaThread "http-5168-Processor3" daemon [_thread_blocked,
id=2344]
0x008b3470 JavaThread "http-5168-Processor2" daemon [_thread_blocked,
id=1940]
0x008b3020 JavaThread "http-5168-Processor1" daemon [_thread_blocked,
id=1812]
0x008b1d80 JavaThread
"ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon
[_thread_blocked, id=2144]
=>0x0089c750 JavaThread "Thread-2" [_thread_in_native, id=636]
0x00849dd0 JavaThread "Thread-1" [_thread_in_native, id=3660]
0x0083f2b0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=720]
0x0083e640 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2404]
0x0083d550 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=244]
0x0083c930 JavaThread "Finalizer" daemon [_thread_blocked, id=1364]
0x0083b6b0 JavaThread "Reference Handler" daemon [_thread_blocked, id=1340]
0x008326d0 JavaThread "main" [_thread_in_native, id=2068]

Other Threads:
0x0083a8f0 VMThread [id=2412]
0x00842330 WatcherThread [id=2076]

VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 103K [0x22bd0000, 0x22c70000,
0x230b0000)
eden space 512K, 7% used [0x22bd0000, 0x22bd9ea8, 0x22c50000)
from space 64K, 99% used [0x22c60000, 0x22c6fd80, 0x22c70000)
to space 64K, 0% used [0x22c50000, 0x22c50000, 0x22c60000)
tenured generation total 6124K, used 5950K [0x230b0000, 0x236ab000,
0x26bd0000)
the space 6124K, 97% used [0x230b0000, 0x2367fa68, 0x2367fc00, 0x236ab000)
compacting perm gen total 8192K, used 6961K [0x26bd0000, 0x273d0000,
0x2abd0000)
the space 8192K, 84% used [0x26bd0000, 0x2729c770, 0x2729c800, 0x273d0000)
ro space 8192K, 63% used [0x2abd0000, 0x2b0db178, 0x2b0db200, 0x2b3d0000)
rw space 12288K, 46% used [0x2b3d0000, 0x2b969fa8, 0x2b96a000, 0x2bfd0000)

Dynamic libraries:
0x00400000 - 0x0041b000 F:\Tomcat5\bin\tomcat5.exe
0x7c930000 - 0x7ca00000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c92b000 C:\WINDOWS\system32\kernel32.dll
0x77e10000 - 0x77ea1000 C:\WINDOWS\system32\USER32.dll
0x77bd0000 - 0x77c18000 C:\WINDOWS\system32\GDI32.dll
0x77f30000 - 0x77fdc000 C:\WINDOWS\system32\ADVAPI32.dll
0x77c20000 - 0x77cbf000 C:\WINDOWS\system32\RPCRT4.dll
0x77eb0000 - 0x77f02000 C:\WINDOWS\system32\SHLWAPI.dll
0x77b70000 - 0x77bca000 C:\WINDOWS\system32\msvcrt.dll
0x7ca10000 - 0x7d1f0000 C:\WINDOWS\system32\SHELL32.dll
0x76180000 - 0x7619d000 C:\WINDOWS\system32\IMM32.DLL
0x63090000 - 0x63099000 C:\WINDOWS\system32\LPK.DLL
0x74ae0000 - 0x74b41000 C:\WINDOWS\system32\USP10.dll
0x77cd0000 - 0x77dd3000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.1830_x-ww_7AE38CCF\comctl32.dll
0x6d670000 - 0x6d804000 F:\jre1.5.0_06\bin\client\jvm.dll
0x769e0000 - 0x76a0a000 C:\WINDOWS\system32\WINMM.dll
0x6d280000 - 0x6d288000 F:\jre1.5.0_06\bin\hpi.dll
0x76ab0000 - 0x76abb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d640000 - 0x6d64c000 F:\jre1.5.0_06\bin\verify.dll
0x6d300000 - 0x6d31d000 F:\jre1.5.0_06\bin\java.dll
0x6d660000 - 0x6d66f000 F:\jre1.5.0_06\bin\zip.dll
0x6d4c0000 - 0x6d4d3000 F:\jre1.5.0_06\bin\net.dll
0x71b60000 - 0x71b77000 C:\WINDOWS\system32\WS2_32.dll
0x71b50000 - 0x71b58000 C:\WINDOWS\system32\WS2HELP.dll
0x4a000000 - 0x4a03b000 C:\KV2006\KVSock_9.dll
0x777e0000 - 0x77801000 C:\WINDOWS\system32\NTMARTA.DLL
0x774b0000 - 0x775e4000 C:\WINDOWS\system32\ole32.dll
0x5d000000 - 0x5d00f000 C:\WINDOWS\system32\SAMLIB.dll
0x76e70000 - 0x76e9e000 C:\WINDOWS\system32\WLDAP32.dll
0x71a80000 - 0x71ac0000 C:\WINDOWS\system32\mswsock.dll
0x69660000 - 0x696b6000 C:\WINDOWS\system32\hnetcfg.dll
0x71a40000 - 0x71a48000 C:\WINDOWS\System32\wshtcpip.dll
0x4b210000 - 0x4b261000 C:\WINDOWS\system32\MSCTF.dll
0x75d60000 - 0x75d87000 C:\WINDOWS\system32\apphelp.dll
0x4c510000 - 0x4c53e000 C:\WINDOWS\system32\msctfime.ime
0x6d370000 - 0x6d37d000 F:\jre1.5.0_06\bin\JdbcOdbc.dll
0x4b750000 - 0x4b78d000 C:\WINDOWS\system32\ODBC32.dll
0x77370000 - 0x77407000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.1830_x-ww_1B6F474A\COMCTL32.dll
0x761a0000 - 0x761e8000 C:\WINDOWS\system32\comdlg32.dll
0x03890000 - 0x038a2000 C:\WINDOWS\system32\odbcint.dll
0x4b890000 - 0x4b8d4000 C:\WINDOWS\system32\odbcjt32.dll
0x1b000000 - 0x1b170000 C:\WINDOWS\system32\msjet40.dll
0x1b5d0000 - 0x1b665000 C:\WINDOWS\system32\mswstr10.dll
0x775f0000 - 0x7767c000 C:\WINDOWS\system32\OLEAUT32.dll
0x76070000 - 0x7607c000 C:\WINDOWS\system32\odbcji32.dll
0x1b2c0000 - 0x1b2cd000 C:\WINDOWS\system32\msjter40.dll
0x1b2d0000 - 0x1b2e2000 C:\WINDOWS\system32\MSJINT40.DLL
0x76eb0000 - 0x76ec3000 C:\WINDOWS\system32\Secur32.dll
0x77680000 - 0x77703000 C:\WINDOWS\system32\CLBCatQ.DLL
0x76f70000 - 0x770ca000 C:\WINDOWS\system32\COMRes.dll
0x77b60000 - 0x77b68000 C:\WINDOWS\system32\VERSION.dll
0x1b810000 - 0x1b84a000 C:\WINDOWS\system32\msjtes40.dll
0x0f9a0000 - 0x0f9ab000 C:\WINDOWS\system32\VBAJET32.DLL
0x0f9c0000 - 0x0fa22000 C:\WINDOWS\system32\expsrv.dll

VM Arguments:
jvm_args: -Dcatalina.home=f:\Tomcat5 -Dcatalina.base=f:\Tomcat5 -
Djava.endorsed.dirs=f:\Tomcat5\common\endorsed -
Djava.io.tmpdir=f:\Tomcat5\temp -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.util.logging.config.file=f:\Tomcat5\conf\logging.properties vfprintf
java_command: <unknown>
Launcher Type: generic

Environment Variables:
JAVA_HOME=f:\jdk1.5.0_06
PATH="C:\Program Files\Microsoft DirectX SDK (December
2005)\Utilities\Bin\x86";.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;f:\jdk1.5.0_06\bin;F:\UltraEdit-32
USERNAME=Administrator
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows Server 2003 family Build 3790 Service Pack 1
CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
Memory: 4k page, physical 1047248k(627404k free), swap 2532108k(2189596k
free)
vm_info: Java HotSpot(TM) 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


---------- BEGIN SOURCE ----------
public void run() {
boolean forever = true;
   Statement stmt=null;
   String currCatalog=null;
   long maxCheckoutMillis = maxCheckoutSeconds * 1000;

  while(forever){
    try {
       BufferedReader in = new BufferedReader(new FileReader(logFileString +
"pid"));
      String curr_pid = in.readLine();
      if(curr_pid.equals(pid)) {
   }
   else {
      // Close all connections silently - they are definitely dead.
      for(int i=0; i < currConnections; i++) {
          try {
            connPool[i].close();
          }
         catch (SQLException e1) {
         }
      }
      // Returning from the run() method kills the thread
     return;
  }
  in.close();
    }
    catch (IOException e1) {
    }

    // Get any Warnings on connections and print to event file
    for(int i=0; i < currConnections; i++) {
      try {
           currSQLWarning = connPool[i].getWarnings();
           if(currSQLWarning != null) {
          connPool[i].clearWarnings();
      }
  }
  catch(SQLException e) {
  }
 }

    for(int i=0; i < currConnections; i++) { // Do for each connection
        long age = System.currentTimeMillis() - connCreateDate[i];
        try {  // Test the connection with createStatement call
          synchronized(connStatus) {
          if(connStatus[i] > 0) { // In use, catch it next time!
             // Check the time it's been checked out and recycle
             long timeInUse = System.currentTimeMillis() - connLockTime[i];
            if(maxCheckoutMillis != 0) {
             if(timeInUse > maxCheckoutMillis) {
                throw new SQLException();
               }
         }
        continue;
    }
    connStatus[i] = 2; // Take offline (2 indicates housekeeping lock)
   }
    if(age > maxConnMSec) {  // Force a reset at the max conn time
        throw new SQLException();
    }
    stmt = connPool[i].createStatement();
    connStatus[i] = 0;  // Connection is O.K.
    // Some DBs return an object even if DB is shut down
    if(connPool[i].isClosed()) {
         throw new SQLException();
    }
}
catch(SQLException e){
    try {
connPool[i].close();
    }
    catch(SQLException e0) {
    }
    try {
createConn(i);
    }
    catch(SQLException e1) {
}
connStatus[i] = 0;  // Can't open, try again next time
    }
}
finally {
    try{
    if(stmt != null) {
    stmt.close();
    }
    }
    catch(SQLException e1){
    };
}

try {
    Thread.sleep(20000);
}  // Wait 20 seconds for next cycle
catch(InterruptedException e) {
return;
}
}
} // End run


I want to get a solution method,because it puzzled me for a very long time,I
don't know if Tomcat support Access2000 Database by JDCB Driver,not by ODBC
driver?


On 3/30/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>
> I don't believe such a driver exists... I'd be interested myself if I'm
> wrong.  I believe you'll have to use the jdbc:odbc bridge driver.
>
> Frank
>
> red phoenix wrote:
> > Where can I get JDBC driver for Microsoft Access2000?
> >
> > Thanks
> >
> >
> > On 3/30/06, Farrow, Marc <[EMAIL PROTECTED]> wrote:
> >> same as everything else.  You will need a JDBC driver for Microsoft
> >> Access2000 and point your connection pooling in the server.xml to that
> >> driver.  How you obtain the driver is another bear.
> >>
> >> -----Original Message-----
> >> From: red phoenix [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, March 29, 2006 10:43 PM
> >> To: users@tomcat.apache.org
> >> Subject: connection pool
> >>
> >>
> >> I know Tomcat5 supply some connection pool for oracle,sql and so on.Now
>   I
> >> want to use Microsoft Access2000 Database,I don't know how to do it
> >> through
> >> tomcat connection pool. Any body can give me a example code for
> Microsoft
> >> Access2000 Database configure under Tomcat5 connection pool?
> >> Thanks in advance!
> >>
> >> Best regards,
> >> Edward
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to