X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 654DA8B9B2E for ; Wed, 23 Feb 2005 03:33:22 +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 16631-04 for ; Wed, 23 Feb 2005 03:33:09 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id E00A68B9B1F for ; Wed, 23 Feb 2005 03:33:11 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1D3nDC-000717-M0 for pgsql-admin@postgresql.org; Wed, 23 Feb 2005 04:29:19 +0100 Received: from 200-101-054-239.bsace705.dsl.brasiltelecom.net.br ([200.101.54.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Feb 2005 04:29:18 +0100 Received: from cviniciusm by 200-101-054-239.bsace705.dsl.brasiltelecom.net.br with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Feb 2005 04:29:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Vinicius Subject: Problem with "/etc/alternatives/java" and "pg74.215.jdbc3.jar". Date: Wed, 23 Feb 2005 00:32:44 -0300 Lines: 82 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 200-101-054-239.bsace705.dsl.brasiltelecom.net.br User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: pt-br, pt X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner-SpamScore: sssss X-MailScanner-From: sql-pgsql-admin@m.gmane.org X-MailScanner-To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.407 tagged_above=0 required=5 tests=AWL, WEIRD_QUOTING X-Spam-Level: * X-Archive-Number: 200502/246 X-Sequence-Number: 16414 Hello, I'm trying to connect to a postgresql database through the postgresql jdbc driver, but appears the errors below: "$ java TesteJDBC_PGSQL libgcj-java-placeholder.sh This script is a placeholder for the /usr/bin/java master link required by jpackage.org conventions. libgcj's rmiregistry, rmic and jar tools are now slave symlinks to these masters, and are managed by the alternatives(8) system. This change was necessary because the rmiregistry, rmic and jar tools installed by previous versions of libgcj conflicted with symlinks installed by jpackage.org JVM packages. Iniciando a conexao com o BD... Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: org.postgresql.Driver at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0) at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0) at TesteJDBC_PGSQL.Conecta() (Unknown Source) at TesteJDBC_PGSQL.main(java.lang.String[]) (Unknown Source) Caused by: java.lang.ClassNotFoundException: javax.net.ssl.SSLSocket not found in [file:/usr/share/java/pg74.215.jdbc3.jar, file:./, core:/] " "... public static Connection Conecta() { String url= "jdbc:postgresql:labprog3"; Connection con; try { System.out.println("Iniciando a conexao com o BD..."); Class.forName("org.postgresql.Driver"); con = DriverManager.getConnection (url,"",""); System.out.println("Banco de Dados Ok e Pronto..."); return con; } catch(ClassNotFoundException fnf) { System.out.println("Houve uma ClassNotFoundException: "+fnf); return null; } catch(SQLException sql) { System.out.println("Houve uma SQLException: "+sql); return null; } } ..." My login has permission to create databases and users and I have created a database called labprog3. I can use the command 'psql' with this database. I did set TCP/IP to true in /var/lib/pgsql/data/postgresql.conf, too. I'm using the followed configuration: kernel-2.6.10-1.766_FC3 kernel-utils-2.4-13.1.49_FC3 postgresql-7.4.7-3.FC3.1 postgresql-jdbc-7.4.7-3.FC3.1 postgresql-libs-7.4.7-3.FC3.1 postgresql-server-7.4.7-3.FC3.1 gcc-java-3.4.2-6.fc3 Does this problem due the libgcj, please? Should I remove the gcc-java, please? TIA, Vinicius. P.S.: Does this mailing list the best place to put this type of problem?