X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 36AD5563D6 for ; Mon, 14 Mar 2005 08:36:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27092-07 for ; Mon, 14 Mar 2005 08:36:00 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by svr1.postgresql.org (Postfix) with ESMTP id 1214F563CE for ; Mon, 14 Mar 2005 08:35:59 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 68so1823759wri for ; Mon, 14 Mar 2005 00:35:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=fr5B8JRlp22+M6RxWb+2eu8yUoqedjD4Uy/xRXz10SBaeDwWRhThlrk59YjoHbYQKUvGn/AuG5EKPE12KXGOls1Ky6QkESO27PfvNur7f6fHKBI2HHMGgRY+cM0Y75NpWmWkfd4OLGJhd2ZKdRLMWZsvCabIO+x2JvYuxy+R+tg= Received: by 10.54.10.39 with SMTP id 39mr4527069wrj; Mon, 14 Mar 2005 00:35:59 -0800 (PST) Received: by 10.54.31.54 with HTTP; Mon, 14 Mar 2005 00:35:59 -0800 (PST) Message-ID: <2989532e050314003572de64eb@mail.gmail.com> Date: Mon, 14 Mar 2005 14:05:59 +0530 From: Antony Paul Reply-To: Antony Paul To: java unix Subject: Re: problem while running simple java program Cc: PostgreSQL JDBC In-Reply-To: <534957390503140027124dc439@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <534957390503140027124dc439@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.736 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/142 X-Sequence-Number: 12534 it seems that you are using GNU Java installed in your system(libgcj). You can test this by giving full path to Sun java compiler instead of java. On Mon, 14 Mar 2005 00:27:57 -0800, java unix wrote: > hi, > > when i run a simple program as given below > > import java.sql.*; > > class PostgreSQLTest { > > public static void main (String[] args) { > > try{ > > Class.forName("org.postgresql.Driver"); > > Connection con = > DriverManager.getConnection("jdbc:postgresql://localhost:5432/test","postgres","roopesh"); > > Statement stmt = con.createStatement(); > > ResultSet rs = stmt.executeQuery("select col1 from test"); > > while(rs.next()) > > { > > System.out.println(rs.getString(1)+"
"); > > } > > }catch(Exception e){ > > System.out.println(e); > > } > > } > > } > > when i run it i am getting the following errors > > [root@roopesh root]# java PostgreSQLTest > Exception in thread "main" java.lang.InternalError: > unexpected exception during > linking: java.lang.ClassNotFoundException: > javax.net.ssl.SSLSocket > at 0x40268e17: > java.lang.Throwable.Throwable(java.lang.String) > (/usr/lib/./li > bgcj.so.3) > at 0x4025bc8e: > java.lang.Error.Error(java.lang.String) > (/usr/lib/./libgcj.so. > 3) > at 0x402691fa: > java.lang.VirtualMachineError.VirtualMachineError(java.lang.St > ring) (/usr/lib/./libgcj.so.3) > at 0x4025d62e: > java.lang.InternalError.InternalError(java.lang.String) > (/usr/ > lib/./libgcj.so.3) > at 0x4025ad82: > java.lang.ClassLoader.resolveClass0(java.lang.Class) > (/usr/lib > /./libgcj.so.3) > at 0x4024646c: java.lang.Class.initializeClass() > (/usr/lib/./libgcj.so.3) > at 0x40244d04: > java.lang.Class.forName(java.lang.String, boolean, > java.lang.C > lassLoader) (/usr/lib/./libgcj.so.3) > at 0x40244d9f: > java.lang.Class.forName(java.lang.String) > (/usr/lib/./libgcj.s > o.3) > at 0x403831e7: ffi_call_SYSV > (/usr/lib/./libgcj.so.3) > at 0x403831a7: ffi_raw_call > (/usr/lib/./libgcj.so.3) > at 0x402306e8: > _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) > (/usr/l > ib/./libgcj.so.3) > at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, > ffi_raw, _Jv_InterpMethodI > nvocation) (/usr/lib/./libgcj.so.3) > at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, > void, ffi_raw, void) (/us > r/lib/./libgcj.so.3) > at 0x4038305c: ?? (??:0) > at 0x40242dd8: > gnu.gcj.runtime.FirstThread.call_main() > (/usr/lib/./libgcj.so. > 3) > at 0x402ad02d: gnu.gcj.runtime.FirstThread.run() > (/usr/lib/./libgcj.so.3) > at 0x4024fc4c: _Jv_ThreadRun(java.lang.Thread) > (/usr/lib/./libgcj.so.3) > at 0x4021c8ac: _Jv_RunMain(java.lang.Class, byte > const, int, byte const, bool > ean) (/usr/lib/./libgcj.so.3) > at 0x08048910: ?? (??:0) > at 0x42015574: __libc_start_main > (/lib/tls/libc.so.6) > at 0x080486c1: ?? (??:0) > > the classpath set is as follows > > [root@roopesh root]# echo $CLASSPATH > /usr/java/j2sdk1.4.2_07/lib/tools.jar:/usr/java/j2sdk1.4.2_07/jre/lib/rt.jar:/us > r/local/pgsql/pg74.215.jdbc3.jar:/usr/local/pgsql/pg74:/usr/local/pgsql/pg74/org > /postgresql:/usr/local/pgsql > > i donot know what is the problem > > thank you > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- rgds Antony Paul http://www.geocities.com/antonypaul24/