Subject: [Pljava-dev] cannot set the classpath to a specific jar to get an external connection
Date: Thu, 3 Jun 2010 10:52:32 +0200
Message-ID: <201006031052.33192.fluca1978@infinito.it> (raw)
Hi all,
not sure if what I'd like to do is possible, but I'd like to use JDBC within a
pl/java function to extract data from another database (something similar to
dbilink). However if I try to change the connection to another URL rather that
"jdbc:default:connection" I got an error saying there is no suitable driver,
so I tried to add explicitly the postgresql jar to the schema, but the
following fails:
select sqlj.set_classpath('public',
'/java/jars/postgresql-8.4-701.jdbc4.jar');
ERROR: java.sql.SQLException: No such jar:
/java/jars/postgresql-8.4-701.jdbc4.jar
So my questions are:
1) what am I missing in setting the classpath?
2) is it possible to open a connection to another database cluster?
Thanks,
Luca
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 using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] cannot set the classpath to a specific jar to get an external connection
In-Reply-To: <201006031052.33192.fluca1978@infinito.it>
* 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