From: | fluca1978 at infinito(dot)it (Luca Ferrari) |
---|---|
To: | |
Subject: | [Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection |
Date: | 2010-06-03 12:50:09 |
Message-ID: | 201006031450.10453.fluca1978@infinito.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On Thursday 03 June 2010 02:15:30 pm Roberts, Jon's cat walking on the
keyboard wrote:
> I think you need to first install the jar and then set the class path.
>
> For example:
> select * from
> sqlj.install_jar('file:///java/jars/postgresql-8.4-701.jdbc4.jar',
> 'example_jar', true);
> select sqlj.set_classpath('public', 'example_jar');
>
Yes, I've installed the jar before ( I did not mention) and then I was able to
set the classpath using the jar alias. However, keeping the jar separated or
merging them into a single jar does not solve the problem and the error still
is:
ERROR: java.sql.SQLException: No suitable driver found for
jdbc:postgresql://localhost/myDb
and in the logs I've got the stacktrace:
java.sql.SQLException: No suitable driver found for
jdbc:postgresql://localhost/myDB
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at itpug.pljava.RowGenerator.getResultSet(RowGenerator.java:40)
at
org.postgresql.pljava.internal.ResultSetPicker.<init>(ResultSetPicker.java:25)
Summarizing this is what I've done:
1) sqlj.replace_jar to my new jar containing the Java client
2) sqlj.install_jar for the postgresql driver jar
3) set the classpath so that now I've got:
select sqlj.get_classpath('public');
get_classpath
---------------
driver:myJar
(1 row)
with driver the jar for the jdbc driver, and myjar the jar of my client.
Any suggestion?
Luca
From | Date | Subject | |
---|---|---|---|
Next Message | Roberts, Jon | 2010-06-03 12:56:54 | [Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection |
Previous Message | Roberts, Jon | 2010-06-03 12:15:30 | [Pljava-dev] cannot set the classpath to a specific jar to get anexternal connection |