• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate connection management problem?

Mallik Avula
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
i want to use hibernate with apache DBCP connection management
i configure hibernate.cfg.xml
this is my hibernate.cfg.xml file
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

<!-- Database connection settings -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc racle:thin:@</property>
<property name="connection.username">aims</property>
<property name="connection.password">aims</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.provider_class">org.apache.tomcat.dbcp.dbcp.BasicDataSource</property>
<property name="Dbcp.minPoolSize">5</property>
<property name="Dbcp.timeout">500</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="hbm2ddl.auto">update</property>
<mapping resource="contact.hbm.xml"/>

i added naming-factory-dbcp.jar to classpath

i am getting the following error
Could not instantiate connection provider: org.apache.tomcat.dbcp.dbcp.BasicData

please let me know how to solve this and where to configure if my approch wrong.
any help greatly cherished

Jaikiran Pai
Posts: 10447
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the entire exception stacktrace
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!