Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 83763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:49:30+00:00 2026-05-10T21:49:30+00:00

Does anybody know what’s going on here: I run hibernate 3.2.6 against a PostgreSQL

  • 0

Does anybody know what’s going on here:

I run hibernate 3.2.6 against a PostgreSQL 8.3 (installed via fink) database on my Mac OS X. The setup works fine when I use Java 6 and the JDBC 4 driver (postgresql-8.3-603.jdbc4). However, I need this stuff to work with Java 5 and (hence) JDBC 3 (postgresql-8.3-603.jdbc3). When I change the jar in the classpath and switch to Java 5 (I do this in eclipse), I get the following error:

Exception in thread 'main' org.hibernate.exception.JDBCConnectionException: Cannot open connection     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) <Rows clipped for readability> Caused by: java.sql.SQLException: No suitable driver     at java.sql.DriverManager.getConnection(DriverManager.java:545)     at java.sql.DriverManager.getConnection(DriverManager.java:140)     at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) 

What’s the problem here? I cannot see it. Here is my hibernate configuration:

<hibernate-configuration>      <session-factory>         <property name='connection.url'>jdbc:postgresql:test</property>         <property name='connection.username'>postgres</property>         <property name='connection.password'>p</property>         <property name='connection.pool_size'>1</property>         <property name='dialect'>org.hibernate.dialect.PostgreSQLDialect</property>         <property name='current_session_context_class'>thread</property>         <property name='show_sql'>true</property>         <mapping resource='com/mydomain/MyClass.hbm.xml'/>     </session-factory> </hibernate-configuration> 

EDIT: The longer, more usual form of the connection URL: jdbc:postgresql://localhost/test has the exact same behaviour.

The driver jar is definitely in the classpath, and I also do not manage to get any errors with this direct JDBC test code:

public static void main(String[] args) throws Exception {   Class.forName('org.postgresql.Driver');     Connection con=DriverManager.getConnection('jdbc:postgresql://localhost/test','postgres', 'p'); } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:49:30+00:00Added an answer on May 10, 2026 at 9:49 pm

    I don’t see you specifying the driver class in your Hibernate configuration. Try adding the following:

    <hibernate-configuration>     <session-factory>         .         .         <property name='connection.driver_class'>org.postgresql.Driver</property>         .     </session-factory> </hibernate-configuration> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

does anybody know what are for PG and GG variables here: module sum(S, Cout,PG,GG,A,B,Cin);
Does anybody know of or have a detailed list of how the BCL in
Does anybody know, how to get a list of leaf nodes in Prolog? Let's
Does anybody know of a free flash obfuscator(protector)? All I can find are commercial
Does anybody know whether one exists? I've been googling this for monthes... Thanks
Does anybody know if you can access the SaevFileDialog control that's used by the
Does anybody know what is the equivalent to $? in Windows command line? Is
Does anybody know if there is a way to display the text value of
Does anybody know some nice documentation about the ruby handsoap gem to get me
does anybody know when the columns are generated of a GridView? After what event?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.