-->
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: hibernate 4.2 doesn't work with old projects
PostPosted: Thu Mar 19, 2015 10:27 am 
Newbie

Joined: Thu Mar 19, 2015 9:56 am
Posts: 2
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).
Image
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.


Top
 Profile  
 
 Post subject: Re: hibernate 4.2 doesn't work with old projects
PostPosted: Tue Mar 24, 2015 4:49 am 
Newbie

Joined: Thu Mar 19, 2015 9:56 am
Posts: 2
Well, finally I manage to install an old version and all works. I don't know what happened to the new version which is not able to find a class that I already have in the path :(

I hope this will be fixed with hibernate 5 or maybe I would find why that happend.


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.