N
Narsing
Guys,
Do anyone of U have a solution for this???
When I try to use the connection pooling of Apache for Hibernate, I get
Class not found exception. I did add the commons-dbcp-1.2.1-jar file to
the class path and added other properties in the config file ...
hibernate.cfg.xml ...
<property
name="hibernate.connection.provider_class">org.hibernate.connection.DBCPConnectionProvider
</property>
<property name="hibernate.dbcp.maxActive">8</property>
<property name="hibernate.dbcp.maxIdle">8</property>
<property name="hibernate.dbcp.maxWait">100</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>
<property name="hibernate.dbcp.test OnReturn">true</property>
<property name="hibernate.dbcp.ps.maxActive">8</property>
<property name="hibernate.dbcp.ps.maxIdle">8</property>
<property name="hibernate.dbcp.ps.maxWait">1000*60*30</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>
but I am getting the following errors:
FATAL [main] org.hibernate.connection.ConnectionProviderFactory - Could
not instantiate connection provider
java.lang.ClassNotFoundException:
org.hibernate.connection.DBCPConnectionProvider
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:54)
at
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:301)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1041)
at
org.uabhs.patient.hibernate.HibernateManager.getSessionFactory(HibernateManager.java:27)
at
org.uabhs.patient.util.HibernateUtil.buildGetPatientListSearchCriteria(HibernateUtil.java:169)
at
org.uabhs.patient.services.HibernateEmmiServices.getPatientList(HibernateEmmiServices.java:32)
at org.uabhs.patient.Test.TestClient.main(TestClient.java:56)
SM_EMMI - 2006-09-14 11:13:36,687 ERROR [main]
org.uabhs.patient.hibernate.HibernateManager -
org.hibernate.HibernateException: Could not instantiate connection
provider: org.hibernate.connection.DBCPConnectionProvider
org.hibernate.HibernateException: Could not instantiate connection
provider: org.hibernate.connection.DBCPConnectionProvider
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:58)
at
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:301)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1041)
at
org.uabhs.patient.hibernate.HibernateManager.getSessionFactory(HibernateManager.java:27)
at
org.uabhs.patient.util.HibernateUtil.buildGetPatientListSearchCriteria(HibernateUtil.java:169)
at
org.uabhs.patient.services.HibernateEmmiServices.getPatientList(HibernateEmmiServices.java:32)
at org.uabhs.patient.Test.TestClient.main(TestClient.java:56)
Exception in thread "main"
Any suggestion is appreciated.
Thanks
-Narsing
Do anyone of U have a solution for this???
When I try to use the connection pooling of Apache for Hibernate, I get
Class not found exception. I did add the commons-dbcp-1.2.1-jar file to
the class path and added other properties in the config file ...
hibernate.cfg.xml ...
<property
name="hibernate.connection.provider_class">org.hibernate.connection.DBCPConnectionProvider
</property>
<property name="hibernate.dbcp.maxActive">8</property>
<property name="hibernate.dbcp.maxIdle">8</property>
<property name="hibernate.dbcp.maxWait">100</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>
<property name="hibernate.dbcp.test OnReturn">true</property>
<property name="hibernate.dbcp.ps.maxActive">8</property>
<property name="hibernate.dbcp.ps.maxIdle">8</property>
<property name="hibernate.dbcp.ps.maxWait">1000*60*30</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>
but I am getting the following errors:
FATAL [main] org.hibernate.connection.ConnectionProviderFactory - Could
not instantiate connection provider
java.lang.ClassNotFoundException:
org.hibernate.connection.DBCPConnectionProvider
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:54)
at
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:301)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1041)
at
org.uabhs.patient.hibernate.HibernateManager.getSessionFactory(HibernateManager.java:27)
at
org.uabhs.patient.util.HibernateUtil.buildGetPatientListSearchCriteria(HibernateUtil.java:169)
at
org.uabhs.patient.services.HibernateEmmiServices.getPatientList(HibernateEmmiServices.java:32)
at org.uabhs.patient.Test.TestClient.main(TestClient.java:56)
SM_EMMI - 2006-09-14 11:13:36,687 ERROR [main]
org.uabhs.patient.hibernate.HibernateManager -
org.hibernate.HibernateException: Could not instantiate connection
provider: org.hibernate.connection.DBCPConnectionProvider
org.hibernate.HibernateException: Could not instantiate connection
provider: org.hibernate.connection.DBCPConnectionProvider
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:58)
at
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:301)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1041)
at
org.uabhs.patient.hibernate.HibernateManager.getSessionFactory(HibernateManager.java:27)
at
org.uabhs.patient.util.HibernateUtil.buildGetPatientListSearchCriteria(HibernateUtil.java:169)
at
org.uabhs.patient.services.HibernateEmmiServices.getPatientList(HibernateEmmiServices.java:32)
at org.uabhs.patient.Test.TestClient.main(TestClient.java:56)
Exception in thread "main"
Any suggestion is appreciated.
Thanks
-Narsing