On Wed, 6 Jan 1999, Ing. Conrado Miguel Rodr?guez Fern?ndez wrote:

> 
> I'm trying to distribute my PostgreSQL tables through JDBC:RMI. I have been using
> the PostgreSQL JDBC driver from contrib.redhat. and it do it's job Ok.
> 
> The JDBC:RMI system has been also succesfully tested with the JDBC-ODBC
> bridge.  The problem arises when I try to connect to the SQL Server through
> the following URL: 
> 
>      jdbc:rmi://horus/jdbc:postgresql:conrado 
> 
> Where "jdbc:postgresql:conrado" is the URL for reaching my database through JDBC
> (not RMI-JDBC) which has been tested, and the rest is required by RMI-JDBC (horus 
> is the server's name).
> 
> The execution gives the following messages:
> 
> java.sql.SQLException: No suitable driver
> java.sql.SQLException: No suitable driver
>       at RmiJdbc.RJDriver.connect(RJDriver.java:136)
>       at java.sql.DriverManager.getConnection(DriverManager.java:91)
>       at java.sql.DriverManager.getConnection(DriverManager.java:134)
>       at TestClient.main(TestClient.java:34)
> 
> The  RMI-JDBC documentation announces that "No suitable driver" means that the 
>driver is
> not registerd but when you see the RMI-JDBC servers output it clearly shows:
> 
> [conrado@Horus tantra]$ java RmiJdbc.RJJdbcServer postgresql.Driver
> postgresql.Driver registered in DriverManager
> Binding RmiJdbcServer...
> RmiJdbcServer bound in rmi registry
> 
> what means that the driver is recognized. I was thinking in a bug in the JDBC driver
> but I think that the RMI-JDBC layer uses the driver as any other application.
> 
> Does anybody has a clue?

I'm not familiar with RMI, but I had a similar problem. I've added the
path of the jdbc driver into my classpath, and then it worked.

An other solution:

unpack the jdbc driver with jar xvf postres.jar and copy it into your
project directory. -> No additional entry into your classpath is
necessary.

-=draft=- 
-=www.zeitgeist.ch=-

Reply via email to