From: Tuan Nguyen <tuanito@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Problem linking Postgresql JDBC driverb and Matlab (Linux)
Date: Wed, 22 Sep 2004 17:12:58 +0000
Message-ID: <56afade704092210123df4ee7f@mail.gmail.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tuanito@gmail.com
Subject: Re: Problem linking Postgresql JDBC driverb and Matlab (Linux)
In-Reply-To: <56afade704092210123df4ee7f@mail.gmail.com>
References: <56afade704092210123df4ee7f@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox