-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: classNotFoundException for postgres
PostPosted: Thu Feb 23, 2006 6:38 am 
Newbie

Joined: Mon Feb 13, 2006 4:39 am
Posts: 3
hibernate3.1.2,postgresql 7.4.1......

hi, now in process to complete hibernate tutorial..As mentioned early, i'm using postgres database server and put the jdbc driver to /lib folder. I got error when try to run this command: ant run -Daction=store

the error:
[java] 17:40:42,147 FATAL DriverManagerConnectionProvider:65 - JDBC Driver class not found: org.postgresql.Driver
[java] java.lang.ClassNotFoundException: org.postgresql.Driver
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)

i already check my postgres jdbc driver and it the right one..

and conguration file
<hibernate-configuration>

<session-factory>

<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql:mytestdb</property>
<property name="connection.username">postgres</property>
<property name="connection.password"></property>

<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>

<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>

<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>

<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>

<mapping resource="events/Event.hbm.xml"/>

</session-factory>

</hibernate-configuration>

any help appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 1:47 am 
Beginner
Beginner

Joined: Mon Jan 30, 2006 2:28 am
Posts: 47
Location: INDIA
1. try to place this jar file to lib folder postgresql-8.0-311.jdbc3.jar for postgres.

2.Refer the below Code Configurations

<session-factory>
<property name="myeclipse.connection.profile">StudentDB</property>
<property name="connection.url">jdbc:postgresql://localhost:5432/StudentDB</property>
<property name="connection.username">postgres</property>
<property name="connection.password">postgres</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<mapping resource="com/genuitec/hibernate/Student.hbm.xml" />
<mapping resource="com/genuitec/hibernate/Usr.hbm.xml" />

</session-factory>

_________________
A.Edward Durai
"The things which are impossible with men are possible with God."


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.