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 53BFD329E76 for ; Wed, 22 Sep 2004 18:13:46 +0100 (BST) 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 56946-04 for ; Wed, 22 Sep 2004 17:13:40 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.203]) by svr1.postgresql.org (Postfix) with ESMTP id E7D60329D20 for ; Wed, 22 Sep 2004 18:13:39 +0100 (BST) Received: by mproxy.gmail.com with SMTP id 79so2029555rnk for ; Wed, 22 Sep 2004 10:13:29 -0700 (PDT) Received: by 10.38.79.75 with SMTP id c75mr2815773rnb; Wed, 22 Sep 2004 10:12:59 -0700 (PDT) Received: by 10.38.89.73 with HTTP; Wed, 22 Sep 2004 10:12:58 -0700 (PDT) Message-ID: <56afade704092210123df4ee7f@mail.gmail.com> Date: Wed, 22 Sep 2004 17:12:58 +0000 From: Tuan Nguyen Reply-To: tuanito_AT_gmail_DOT_com_NOSPAM@svr1.postgresql.org To: pgsql-jdbc@postgresql.org Subject: Problem linking Postgresql JDBC driverb and Matlab (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/147 X-Sequence-Number: 11037 Hello, I know this subject has also to do with Matlab, but I do not get any answer on the Matlab forum, so I allow myself to crosspost my question here. The Matlab error messages give however a lot of indications that may be relevant to readers of this newsgroup. I am still having some problems trying to connect Postgresql via the JDBC driver and Matlab. I believe that Matlab does not know where the driver is. I am just wondering if I am using the right driver for my version of Java and I am wondering whether my export CLASSPATH has the good syntax. Can somebody help me as it is driving me nuts (I've been working on this for a quite a few days) ? I am also wondering why it requires the SSL module (cf below). It seems that this function is supported by Java 1.4 only, and my Matlab runs on Java 1.3.1. Shall I change the Java version of Matlab (and in that case, how can I do it ?). Thanks. Configuration : Slackware 9.1 - Matlab 6.5 R13 - Java 1.4.2_03, but Matlab runs on 1.3.1 Blackdown EDU>> version -java ans = Java 1.3.1 with Blackdown Java-Linux Team Java HotSpot(TM) Server VM (mixed mode) I tried drivers pg74.215.jdbc2ee.jar and pg74.215.jdbc3.jar I added in classpath.txt : /usr/local/pgsql/share/java/pg74.215.jdbc2ee.jar (and then tried with pg74.215.jdbc3.jar) and from bash : export CLASSPATH=/usr/local/pgsql/share/java/pg74.215.jdbc2ee.jar:. (is this the right syntax ?) and from Matlab : EDU>> java.lang.Class.forName('org.postgresql.Driver'); ??? Java exception occurred: java.lang.ClassNotFoundException: org/postgresql/Driver at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120). EDU>> conn = database('testdb','postgres','postgres','org.postgresql.Driver','jdbc:postgresql://masd/MOSE'); ??? Java exception occurred: java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocket at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at com.mathworks.toolbox.database.databaseConnect.makeDatabaseConnection(databaseConnect.java:100). Error in ==> /usr/local/matlab6p5/toolbox/database/database/@database/database.m On line 114 ==> connectionVector = makeDatabaseConnection(conn); EDU>> confds ??? Java exception occurred: java.lang.NoClassDefFoundError: javax/net/ssl/SSLSocket at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at com.mathworks.toolbox.database.databaseConnect.makeDatabaseConnection(databaseConnect.java:100). Error in ==> /usr/local/matlab6p5/toolbox/database/database/@database/database.m On line 114 ==> connectionVector = makeDatabaseConnection(conn); Error in ==> /usr/local/matlab6p5/toolbox/database/vqb/loginconnect.m On line 26 ==> c = database(datasource,u,p,srcs{i,2},srcs{i,3}); Error in ==> /usr/local/matlab6p5/toolbox/database/vqb/confds.m On line 141 ==> c = loginconnect(sourcestr); ??? Error while evaluating uicontrol Callback. Thanks very much for your help.