Hello,
I have been working in many projects for my company in hibernate. We have all in SVN. They worked fine and they works fine but I'm not able to launch anymore the hibernateconf tool since I update to luna and had to install new version of hibernate tools.
It can't be a problem of configuration, as we all have the same configuration. It's a problem of version. I'm stuck and can't work because this bug.
My problem is that it doesn't find the factorySession (my error message is like the image below but with message:
com/mchange/v2/c3p0/DataSources).
I searched for this problem online but none of them had my solution. It can't connect to the database because it return ClassNoFoundException com/mchange/v2/c3p0/DataSources but I do have that class in my classpath. The configuration of hibernate is this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- non usare Log4Jdbc -->
<!-- Driver Oracle -->
<!--
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@xxx:1111:XXX</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.default_schema">xxx</property>
<property name="hibernate.connection.password">pass</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.show_sql">true</property>
-->
<!-- per usare Log4Jdbc -->
<property name="hibernate.connection.driver_class">net.sf.log4jdbc.DriverSpy</property>
<property name="hibernate.show_sql">false</property>
<!-- Server XXX schema XXX-->
<property name="hibernate.connection.url">jdbc:log4jdbc:oracle:thin:@xxx:1121:XXX</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.connection.password">pass</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.bytecode.use_reflection_optimizer">true</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">590</property>
<property name="hibernate.c3p0.max_size">15</property>
<property name="hibernate.c3p0.max_statements">100</property>
<property name="hibernate.c3p0.min_size">2</property>
<property name="hibernate.c3p0.timeout">5000</property>
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
</session-factory>
</hibernate-configuration>
And it works for all my mates.
I tried to install an old version of hibernate, but you can't find anything below version 4 (http://tools.jboss.org/downloads/overview.html) I tried with http://download.jboss.org/jbosstools/updates/stable/kepler/ but the repository is empty. I tried to comment last 2 properties but it has still the same problem.