Thread: JDBC in PostgreSql for Linux
I am running a Java application on Linux which connects to the Postgresql on Linux using jdbcodbc bridge.
But this is the error I am getting :
sun.jdbc.odbc.JdbcOdbcDriver
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
at 0x4028115f: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402740d2: java.lang.Exception.Exception(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402737a8: java.lang.ClassNotFoundException.ClassNotFoundException(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4030b2be: java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402606d7: gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40272cc7: java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.3)
at 0x40260e09: _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x4025d1fd: java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x4025d2bf: java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4039d347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
at 0x4039d307: ffi_raw_call (/usr/lib/libgcj.so.3)
at 0x40248528: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40248e34: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40246424: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/libgcj.so.3)
at 0x4039d1bc: ?? (??:0)
at 0x4025b308: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3)
at 0x402c60b1: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
at 0x40267fdc: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
at 0x4023478c: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.3)
at 0x08048900: ?? (??:0)
at 0x420158d4: ?? (??:0)
at 0x080486c1: ?? (??:0)
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
at 0x4028115f: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402740d2: java.lang.Exception.Exception(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402737a8: java.lang.ClassNotFoundException.ClassNotFoundException(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4030b2be: java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402606d7: gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40272cc7: java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.3)
at 0x40260e09: _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x4025d1fd: java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x4025d2bf: java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4039d347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
at 0x4039d307: ffi_raw_call (/usr/lib/libgcj.so.3)
at 0x40248528: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40248e34: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40246424: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/libgcj.so.3)
at 0x4039d1bc: ?? (??:0)
at 0x4025b308: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3)
at 0x402c60b1: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
at 0x40267fdc: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
at 0x4023478c: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.3)
at 0x08048900: ?? (??:0)
at 0x420158d4: ?? (??:0)
at 0x080486c1: ?? (??:0)
I have also tried running a Java application using the Native JDBC Driver.
I get the following error :
Driver not found for URL: jdbc:postgresql@10.100.102.31:5432:notes
java.sql.SQLException: Driver not found for URL: jdbc:postgresql@10.100.102.31:5432:notes
at 0x4028115f: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402740d2: java.lang.Exception.Exception(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40316294: java.sql.SQLException.SQLException(java.lang.String, java.lang.String, int) (/usr/lib/libgcj.so.3)
at 0x40316244: java.sql.SQLException.SQLException(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40316102: java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties) (/usr/lib/libgcj.so.3)
at 0x4031603a: java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4039d347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
at 0x4039d307: ffi_raw_call (/usr/lib/libgcj.so.3)
at 0x40248528: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40248e34: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40246424: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/libgcj.so.3)
at 0x4039d1bc: ?? (??:0)
at 0x4025b308: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3)
at 0x402c60b1: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
at 0x40267fdc: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
at 0x4023478c: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.3)
at 0x08048900: ?? (??:0)
at 0x420158d4: ?? (??:0)
at 0x080486c1: ?? (??:0)
java.sql.SQLException: Driver not found for URL: jdbc:postgresql@10.100.102.31:5432:notes
at 0x4028115f: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402740d2: java.lang.Exception.Exception(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40316294: java.sql.SQLException.SQLException(java.lang.String, java.lang.String, int) (/usr/lib/libgcj.so.3)
at 0x40316244: java.sql.SQLException.SQLException(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40316102: java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties) (/usr/lib/libgcj.so.3)
at 0x4031603a: java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4039d347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
at 0x4039d307: ffi_raw_call (/usr/lib/libgcj.so.3)
at 0x40248528: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40248e34: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
at 0x40246424: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/libgcj.so.3)
at 0x4039d1bc: ?? (??:0)
at 0x4025b308: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3)
at 0x402c60b1: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
at 0x40267fdc: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
at 0x4023478c: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.3)
at 0x08048900: ?? (??:0)
at 0x420158d4: ?? (??:0)
at 0x080486c1: ?? (??:0)
Can you help me?Do you have any contact number?
Do you have any url links that might be helpful to me?
Or any other contact number in India or abroad for PostgreSql?
Please do reply me asap.
Thanks and Regards,
Kallol Nandi,Systems Analyst,
Indus Software - A Division of R Systems International Ltd.,
Tidel Park, Taramani, Chennai-600113, India.
Phone: +91-44-22540014/6 Extn: 209
Fax: +91-44-22540017
Email: Kallol.Nandi@indussoft.com
Visit us @ http://www.indussoft.com/
"The information in this email is confidential, and intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are the addressee, the contents of this email are intended for your use only and it must not be forwarded to any third party, without first obtaining written authorization from the originator, or Indus Software. It may contain information, which is confidential and legally privileged, and the same shall not be used, or dealt with, by any third party, in any manner whatsoever, without the specific consent of Indus Software.
The opinions expressed are those of the sender, and do not necessarily reflect those of the Indus Software."