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

Ask A Question

Stats

  • Questions 79k
  • Answers 79k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer set dirname=c:/some/folder echo %dirname% REM retrieve the last letter of… May 11, 2026 at 4:11 pm
  • Editorial Team
    Editorial Team added an answer http://support.microsoft.com/kb/316748 public bool IsAuthenticated(String domain, String username, String pwd) {… May 11, 2026 at 4:11 pm
  • Editorial Team
    Editorial Team added an answer Are you properly base64 decoding your the string from your… May 11, 2026 at 4:11 pm

Related Questions

Does anybody know what hypothetical indexes are used for in sql server 2000? I
Does anybody know what's going on here: I run hibernate 3.2.6 against a PostgreSQL
Does anybody know what is the best approach to accessing a sql view through
Does anybody know what the theme parts WP_FRAMELEFT , WP_SMALLFRAMERIGHT etc are used for?
I know that Hpricot is still a standard but I remember hearing about a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.