Re: No suitable driver found

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: No suitable driver found
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C203937E6A@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на No suitable driver found  (John Dunlap <john.dunlap@exceter.com>)
Ответы Re: No suitable driver found
Список pgsql-jdbc
John Dunlap wrote:

> I've been looking for a solution to this error for a few days now.
> Everything I've found says that the problem should be that I have a
> malformed url but I've gone over it dozens of times and I don't think
> that it's wrong (I wish it was). I'm trying to use hibernate tools to
> generate my database schema through the JDBC driver.
>
> I'm getting the following stack trace,
> java.sql.SQLException: No suitable driver found for
> jdbc:postgresql://localhost:5432/mydatabase
>     at java.sql.DriverManager.getConnection(DriverManager.java:602)
[...]

I don't know anything about Hibernate, but this error suggests that
the system does not know the PostgreSQL JDBC driver.

There are several ways to register it:
- Use the class org.postgresql.Driver, for example with the statement
  Class.forName("org.postgresql.Driver");

- Start the Java Virtual Machine with the flag
  -Djdbc.drivers=org.postgresql.Driver

You'll probably have to figure out how to do that in Hibernate,
but it should work exactly as with other JDBC drivers.

Yours,
Laurenz Albe

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: No suitable driver found
Следующее
От: Clemens Eisserer
Дата:
Сообщение: Re: Updateable ResultSet doesn't fetch sequence-generated values