This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes Need help in OCI DB connection with Oracle 10g Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need help in OCI DB connection with Oracle 10g" Watch "Need help in OCI DB connection with Oracle 10g" New topic
Author

Need help in OCI DB connection with Oracle 10g

Deepak Sureshkumar
Greenhorn

Joined: Aug 17, 2008
Posts: 1
Hi all,
I was tring to create OCI DB connection for Oracle 10g, below is my code to get the connetion using the OCI, no problem while retrive the connection, but when the executeQuery called i got the following exception.

Recetly i've download some sample application from net for this testing, so remaining all coding for DB is stands on Oracle 9i or lesser. Also i've installed 10g clinet in my machine.

Am not sure, why this error is coming.

Can anyone help on this

Thanks in Advance


//Connection code

String driver = "oracle.jdbc.driver.OracleDriver";
String url = "jdbc racle ci:@10.0.0.73:1521:hello";
String username = "abc";
String password = "abc";

Class.forName(driver);
Connection conn = DriverManager.getConnection(url, username, password);
setConnection(conn);


//Error i've got in the tomcat console
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x61D32910
Function=xaolog+0x6294
Library=C:\oracle\product\10.2.0\client_1\bin\OraClient10.Dll

Current Java thread:
at oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe(Native Method)
at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:518)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1049)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3415)
- locked <0x101250c8> (a oracle.jdbc.driver.T2CPreparedStatement)
- locked <0x11117210> (a oracle.jdbc.driver.T2CConnection)
at com.lyricnote.support.model.Model.customerSearch(Model.java:196)
at com.lyricnote.support.controller.CustomersSearchAction.run(CustomersSearchAction.java:37)
at com.lyricnote.support.controller.ControllerServlet.doPost(ControllerServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:259)
at javax.servlet.http.HttpServlet.serviceMonitor(HttpServlet.java:328)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:295)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)

Dynamic libraries:
0x00400000 - 0x0040B000 C:\j2sdk1.4.2_05\bin\java.exe
0x7C900000 - 0x7C9B0000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 - 0x7C8F5000 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
0x08000000 - 0x08139000 C:\j2sdk1.4.2_05\jre\bin\client\jvm.dll
0x7E410000 - 0x7E4A1000 C:\WINDOWS\system32\USER32.dll
0x77F10000 - 0x77F57000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6D000 C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763AD000 C:\WINDOWS\system32\IMM32.DLL
0x10000000 - 0x10007000 C:\j2sdk1.4.2_05\jre\bin\hpi.dll
0x003A0000 - 0x003AE000 C:\j2sdk1.4.2_05\jre\bin\verify.dll
0x003C0000 - 0x003D9000 C:\j2sdk1.4.2_05\jre\bin\java.dll
0x003E0000 - 0x003ED000 C:\j2sdk1.4.2_05\jre\bin\zip.dll
0x003F0000 - 0x003FF000 C:\j2sdk1.4.2_05\jre\bin\net.dll
0x71AB0000 - 0x71AC7000 C:\WINDOWS\system32\WS2_32.dll
0x71AA0000 - 0x71AA8000 C:\WINDOWS\system32\WS2HELP.dll
0x71A50000 - 0x71A8F000 C:\WINDOWS\system32\mswsock.dll
0x662B0000 - 0x66308000 C:\WINDOWS\system32\hnetcfg.dll
0x71A90000 - 0x71A98000 C:\WINDOWS\System32\wshtcpip.dll
0x03040000 - 0x03052000 C:\j2sdk1.4.2_05\jre\bin\zeniuswas.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\system32\PSAPI.dll
0x76F20000 - 0x76F47000 C:\WINDOWS\system32\DNSAPI.dll
0x76FB0000 - 0x76FB8000 C:\WINDOWS\System32\winrnr.dll
0x76F60000 - 0x76F8C000 C:\WINDOWS\system32\WLDAP32.dll
0x76FC0000 - 0x76FC6000 C:\WINDOWS\system32\rasadhlp.dll
0x77B40000 - 0x77B62000 C:\WINDOWS\system32\Apphelp.dll
0x77C00000 - 0x77C08000 C:\WINDOWS\system32\VERSION.dll
0x62F00000 - 0x62F13000 C:\oracle\product\10.2.0\client_1\BIN\ocijdbc10.dll
0x043D0000 - 0x04427000 C:\oracle\product\10.2.0\client_1\bin\OCI.dll
0x7C340000 - 0x7C396000 C:\WINDOWS\system32\MSVCR71.dll
0x61C20000 - 0x61E72000 C:\oracle\product\10.2.0\client_1\bin\OraClient10.Dll
0x60870000 - 0x60953000 C:\oracle\product\10.2.0\client_1\bin\oracore10.dll
0x60A80000 - 0x60B44000 C:\oracle\product\10.2.0\client_1\bin\oranls10.dll
0x63690000 - 0x636A8000 C:\oracle\product\10.2.0\client_1\bin\oraunls10.dll
0x60EB0000 - 0x60EB7000 C:\oracle\product\10.2.0\client_1\bin\orauts.dll
0x774E0000 - 0x7761D000 C:\WINDOWS\system32\ole32.dll
0x636B0000 - 0x636B6000 C:\oracle\product\10.2.0\client_1\bin\oravsn10.dll
0x60FA0000 - 0x61092000 C:\oracle\product\10.2.0\client_1\bin\oracommon10.dll
0x60300000 - 0x60857000 C:\oracle\product\10.2.0\client_1\bin\orageneric10.dll
0x63430000 - 0x63457000 C:\oracle\product\10.2.0\client_1\bin\orasnls10.dll
0x04430000 - 0x04590000 C:\oracle\product\10.2.0\client_1\bin\oraxml10.dll
0x02D60000 - 0x02D71000 C:\WINDOWS\system32\MSVCIRT.dll
0x60960000 - 0x60A6D000 C:\oracle\product\10.2.0\client_1\bin\oran10.dll
0x62740000 - 0x6277D000 C:\oracle\product\10.2.0\client_1\bin\oranl10.dll
0x62790000 - 0x627A7000 C:\oracle\product\10.2.0\client_1\bin\oranldap10.dll
0x627F0000 - 0x628F9000 C:\oracle\product\10.2.0\client_1\bin\orannzsbb10.dll
0x62530000 - 0x62583000 C:\oracle\product\10.2.0\client_1\bin\oraldapclnt10.dll
0x62670000 - 0x6268B000 C:\oracle\product\10.2.0\client_1\bin\orancrypt10.dll
0x71AD0000 - 0x71AD9000 C:\WINDOWS\system32\WSOCK32.dll
0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll
0x62920000 - 0x6296C000 C:\oracle\product\10.2.0\client_1\bin\oranro10.dll
0x626B0000 - 0x626B7000 C:\oracle\product\10.2.0\client_1\bin\oranhost10.dll
0x62660000 - 0x62666000 C:\oracle\product\10.2.0\client_1\bin\orancds10.dll
0x629C0000 - 0x629C8000 C:\oracle\product\10.2.0\client_1\bin\orantns10.dll
0x60B50000 - 0x60EA8000 C:\oracle\product\10.2.0\client_1\bin\orapls10.dll
0x04590000 - 0x04599000 C:\oracle\product\10.2.0\client_1\bin\oraslax10.dll
0x63080000 - 0x63284000 C:\oracle\product\10.2.0\client_1\bin\oraplp10.dll
0x61ED0000 - 0x61F5B000 C:\oracle\product\10.2.0\client_1\bin\orahasgen10.dll
0x62AB0000 - 0x62B1A000 C:\oracle\product\10.2.0\client_1\bin\oraocr10.dll
0x62B20000 - 0x62B60000 C:\oracle\product\10.2.0\client_1\bin\oraocrb10.dll
0x5B860000 - 0x5B8B5000 C:\WINDOWS\system32\NETAPI32.dll
0x62980000 - 0x62990000 C:\oracle\product\10.2.0\client_1\bin\orantcp10.dll
0x045A0000 - 0x0463A000 C:\oracle\product\10.2.0\client_1\bin\orasql10.dll
0x77FE0000 - 0x77FF1000 C:\WINDOWS\system32\Secur32.dll
0x71F80000 - 0x71F84000 C:\WINDOWS\system32\security.dll
0x77C70000 - 0x77C93000 C:\WINDOWS\system32\msv1_0.dll
0x76D60000 - 0x76D79000 C:\WINDOWS\system32\iphlpapi.dll
0x5AD70000 - 0x5ADA8000 C:\WINDOWS\system32\uxtheme.dll
0x74720000 - 0x7476C000 C:\WINDOWS\system32\MSCTF.dll
0x76C90000 - 0x76CB8000 C:\WINDOWS\system32\imagehlp.dll
0x59A60000 - 0x59B01000 C:\WINDOWS\system32\DBGHELP.dll

Heap at VM Abort:
Heap
def new generation total 1088K, used 524K [0x10010000, 0x10130000, 0x104f0000)
eden space 1024K, 46% used [0x10010000, 0x10087948, 0x10110000)
from space 64K, 71% used [0x10120000, 0x1012b6c0, 0x10130000)
to space 64K, 0% used [0x10110000, 0x10110000, 0x10120000)
tenured generation total 13304K, used 13060K [0x104f0000, 0x111ee000, 0x14010000)
the space 13304K, 98% used [0x104f0000, 0x111b11c0, 0x111b1200, 0x111ee000)
compacting perm gen total 11520K, used 11316K [0x14010000, 0x14b50000, 0x18010000)
the space 11520K, 98% used [0x14010000, 0x14b1d360, 0x14b1d400, 0x14b50000)

Local Time = Mon Aug 18 09:51:36 2008
Elapsed Time = 38
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
#


Thanks and regards,
Deepak.S
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1134

Deepak,
I don't know why you are getting that error, but I can suggest you try the "thin" driver instead of the OCI driver.

Good Luck,
Avi.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need help in OCI DB connection with Oracle 10g