jdbc-odbc 桥问题 〔resin 〕(200分)

  • 主题发起人 主题发起人 a163a
  • 开始时间 开始时间
A

a163a

Unregistered / Unconfirmed
GUEST, unregistred user!
环境:Win2000 server+sp3,Sql server 2000 +sp2, resin 2.16,jdk1.4
问题:Resin 服务频繁崩溃,一下是崩溃是的错误信息:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77F83147
Function=RtlEnterCriticalSection+0xB
Library=C:/WINNT/System32/ntdll.dll
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.freeStmt(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLFreeStmt(JdbcOdbc.java:2797)
at sun.jdbc.odbc.JdbcOdbcStatement.close(JdbcOdbcStatement.java:486)
- locked <03895888> (a sun.jdbc.odbc.JdbcOdbcStatement)
at sun.jdbc.odbc.JdbcOdbcConnection.closeAllStatements(JdbcOdbcConnection.java:1558)
- locked <038956C8> (a sun.jdbc.odbc.JdbcOdbcConnection)
at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:727)
at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:82)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
Dynamic libraries:
0x00400000 - 0x00406000 c:/j2sdk/bin/java.exe
0x77F80000 - 0x77FFB000 C:/WINNT/System32/ntdll.dll
0x77D90000 - 0x77DEB000 C:/WINNT/system32/ADVAPI32.dll
0x77E60000 - 0x77F30000 C:/WINNT/system32/KERNEL32.dll
0x786F0000 - 0x78761000 C:/WINNT/system32/RPCRT4.dll
0x78000000 - 0x78046000 C:/WINNT/system32/MSVCRT.dll
0x6D330000 - 0x6D442000 c:/j2sdk/jre/bin/client/jvm.dll
0x77DF0000 - 0x77E4F000 C:/WINNT/system32/USER32.dll
0x77F40000 - 0x77F79000 C:/WINNT/system32/GDI32.dll
0x77530000 - 0x77560000 C:/WINNT/System32/WINMM.dll
0x75E00000 - 0x75E1A000 C:/WINNT/System32/IMM32.DLL
0x6C330000 - 0x6C338000 C:/WINNT/System32/LPK.DLL
0x65D20000 - 0x65D74000 C:/WINNT/System32/USP10.dll
0x6D1D0000 - 0x6D1D7000 c:/j2sdk/jre/bin/hpi.dll
0x6D300000 - 0x6D30D000 c:/j2sdk/jre/bin/verify.dll
0x6D210000 - 0x6D228000 c:/j2sdk/jre/bin/java.dll
0x6D320000 - 0x6D32D000 c:/j2sdk/jre/bin/zip.dll
0x6D2D0000 - 0x6D2DD000 C:/j2sdk/jre/bin/net.dll
0x74FD0000 - 0x74FDA000 C:/WINNT/System32/WSOCK32.dll
0x74FB0000 - 0x74FC3000 C:/WINNT/System32/WS2_32.DLL
0x74FA0000 - 0x74FA8000 C:/WINNT/System32/WS2HELP.DLL
0x74F50000 - 0x74F6D000 C:/WINNT/system32/msafd.dll
0x74F90000 - 0x74F97000 C:/WINNT/System32/wshtcpip.dll
0x77800000 - 0x7780C000 C:/WINNT/System32/rnr20.dll
0x77960000 - 0x77984000 C:/WINNT/System32/DNSAPI.DLL
0x77300000 - 0x77313000 C:/WINNT/System32/iphlpapi.dll
0x774E0000 - 0x774E5000 C:/WINNT/System32/ICMP.DLL
0x772E0000 - 0x772F7000 C:/WINNT/System32/MPRAPI.DLL
0x750E0000 - 0x750F0000 C:/WINNT/System32/SAMLIB.DLL
0x75100000 - 0x7514F000 C:/WINNT/System32/NETAPI32.DLL
0x77BC0000 - 0x77BCF000 C:/WINNT/System32/Secur32.dll
0x75150000 - 0x75156000 C:/WINNT/System32/NETRAP.dll
0x77930000 - 0x77958000 C:/WINNT/system32/WLDAP32.dll
0x77A30000 - 0x77B25000 C:/WINNT/system32/OLE32.DLL
0x77990000 - 0x77A2B000 C:/WINNT/system32/OLEAUT32.DLL
0x77370000 - 0x7739E000 C:/WINNT/System32/ACTIVEDS.DLL
0x77340000 - 0x77362000 C:/WINNT/System32/ADSLDPC.DLL
0x777F0000 - 0x777FE000 C:/WINNT/System32/RTUTILS.DLL
0x6D990000 - 0x6DA3B000 C:/WINNT/System32/SETUPAPI.DLL
0x77BF0000 - 0x77C4D000 C:/WINNT/System32/USERENV.DLL
0x774A0000 - 0x774D2000 C:/WINNT/System32/RASAPI32.DLL
0x77480000 - 0x77491000 C:/WINNT/System32/RASMAN.DLL
0x774F0000 - 0x77512000 C:/WINNT/System32/TAPI32.DLL
0x77B30000 - 0x77BB9000 C:/WINNT/system32/COMCTL32.DLL
0x77C50000 - 0x77C9A000 C:/WINNT/system32/SHLWAPI.DLL
0x77320000 - 0x77339000 C:/WINNT/System32/DHCPCSVC.DLL
0x777A0000 - 0x777A8000 C:/WINNT/System32/winrnr.dll
0x777B0000 - 0x777B5000 C:/WINNT/System32/rasadhlp.dll
0x6D250000 - 0x6D25A000 C:/j2sdk/jre/bin/JdbcOdbc.dll
0x1F7F0000 - 0x1F825000 C:/WINNT/System32/ODBC32.dll
0x76AF0000 - 0x76B2D000 C:/WINNT/system32/comdlg32.dll
0x78F90000 - 0x791D6000 C:/WINNT/system32/SHELL32.DLL
0x1F8E0000 - 0x1F8F6000 C:/WINNT/System32/odbcint.dll
0x777E0000 - 0x777E7000 C:/WINNT/system32/VERSION.dll
0x75950000 - 0x75956000 C:/WINNT/system32/LZ32.DLL
0x1F840000 - 0x1F85A000 C:/WINNT/System32/odbccp32.dll
0x77400000 - 0x77476000 C:/WINNT/System32/crypt32.dll
0x773F0000 - 0x77400000 C:/WINNT/System32/MSASN1.dll
0x782D0000 - 0x782EE000 C:/WINNT/system32/msv1_0.dll
0x41160000 - 0x411D3000 C:/WINNT/System32/SQLSRV32.dll
0x41090000 - 0x410BD000 C:/WINNT/System32/SQLUNIRL.DLL
0x777C0000 - 0x777DE000 C:/WINNT/System32/WINSPOOL.DRV
0x75010000 - 0x75020000 C:/WINNT/system32/MPR.dll
0x76940000 - 0x76947000 C:/WINNT/System32/NDDEAPI.DLL
0x0CCD0000 - 0x0CCE6000 C:/WINNT/System32/sqlsrv32.rll
0x74CB0000 - 0x74CC7000 C:/WINNT/System32/DBNETLIB.DLL
0x75490000 - 0x75494000 C:/WINNT/System32/security.dll
0x77BD0000 - 0x77BE1000 C:/WINNT/System32/ntdsapi.dll
0x74CD0000 - 0x74CD7000 C:/WINNT/System32/DBmsLPCn.dll
0x77900000 - 0x77923000 C:/WINNT/system32/imagehlp.dll
0x72960000 - 0x7298D000 C:/WINNT/system32/DBGHELP.dll
0x687E0000 - 0x687EB000 C:/WINNT/System32/PSAPI.DLL
 
重装一次,是先看ODBC是否好的,然后看JDK的问题
Library=C:/WINNT/System32/ntdll.dll
这种的话,是你的操作系统有问题吧
 
重装之或用其他的jdbcdriver
 
访问的连接多不多?
于IE的配合正确吗?
有没有错误的JSP或Java bean程序
 
jdbc-odbc桥是个很烂的解决办法,一般每个数据库公司都会有自己的jdbc驱动的。
odbc中是用c做的,里面使用的大量的指针,而java根本没有指针,所以当中的接口会
出现各种奇妙的错误
强烈推荐换驱动
 
注意你有没有在程序中使用了字符串之间的“==”判别符,如果要判断两个字符串是否相等,应该
用equals, “==“用来判断两个字符串是否存在同一存储位置,但是java的机制决定了字符串可
能存在多个拷贝在不同位置,因此永远不要用==来判断两个字符串是否相等,否则会造成程序的间歇
性错误。
 
换一个数据库驱动吧:)
JDBC Driver Info
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sybase Driver | com.sybase.jdbc.SybDriver jdbc:sybase:Tds:<host name or IP address>:<Port no> jdbc:sybase:Tds:202.141.151.1:2001
MSSQL Driver | com.jnetdirect.jsql.JSQLDriver jdbc:JSQLConnect://hostname:port/database=databasename jdbc:JSQLConnect://202.141.151.225:1433/database=pgdst
JDBC-ODBC | Bridge sun.jdbc.odbc.JdbcOdbcDriver jdbc:odbc:<Service Name> jdbc:odbc:AdbUser
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
建议使用MSSQL Driver 多线程,速度快(但是可能会有中文显示的问题)
 
目前的情况:
1、系统环境没有变。
2、改用连接池的方式。
3、修改了Jsp及Bean 中连接没有释放的代码。
4、系统已经很稳定了。
谢谢大家的建议。
继续等待、关注 其它大富翁的见解。
 
换一个驱动吧
JDBC FOR SQLSERVER2000
 
先结束了。
 
后退
顶部