-->
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.  [ 7 posts ] 
Author Message
 Post subject: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Mon Feb 13, 2012 5:39 am 
Beginner
Beginner

Joined: Thu Apr 21, 2005 12:15 pm
Posts: 34
Just updated from Hibernate 3.6 to Hibernate 4, now getting

10-Feb-2012 14:12:31 org.hibernate.dialect.DerbyDialect <init>
WARN: HHH000430: The DerbyDialect dialect has been deprecated; use one of the version-specific dialects instead
10-Feb-2012 14:12:31 org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator c3p0ProviderPresent
WARN: HHH000022: c3p0 properties were encountered, but the org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider provider class was not found on the classpath; these properties are going to be ignored.

I changed

config.setProperty("hibernate.dialect","org.hibernate.dialect.DerbyDialect");

to

config.setProperty("hibernate.dialect","org.hibernate.dialect.DerbyTenSevenDialect");

and I added

config.setProperty("org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator","org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider");


buts its made no difference

I use maven to configure my project, the relvent dependenices are

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.0.1.Final</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.8.2.2</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.15.0-GA</version>
</dependency>


Top
 Profile  
 
 Post subject: Re: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Mon Feb 13, 2012 6:00 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi,

to get the problem

Quote:
WARN: HHH000022: c3p0 properties were encountered, but the org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider provider class was not found on the classpath; these properties are going to be ignored.


solved, you must add hibernate-c3p0-<yourversion>.jar into your classpath.
You can find this jar in the distribution bundle under \lib\optional\c3p0\


Top
 Profile  
 
 Post subject: Re: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Mon Feb 13, 2012 6:10 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
For the Derby-Dialect I just have seen in the code that the warning
Code:
The DerbyDialect dialect has been deprecated; use one of the version-specific dialects instead


is given out, regardless if you use org.hibernate.dialect.DerbyTenSevenDialect or org.hibernate.dialect.DerbyDialect

so once you use org.hibernate.dialect.DerbyTenSevenDialect

you simply can ignore this warning message.


Top
 Profile  
 
 Post subject: Re: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Mon Feb 13, 2012 6:49 am 
Beginner
Beginner

Joined: Thu Apr 21, 2005 12:15 pm
Posts: 34
pb00067 wrote:
Hi,

to get the problem

Quote:
WARN: HHH000022: c3p0 properties were encountered, but the org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider provider class was not found on the classpath; these properties are going to be ignored.


solved, you must add hibernate-c3p0-<yourversion>.jar into your classpath.
You can find this jar in the distribution bundle under \lib\optional\c3p0\


Thanks Im using Maven, but the problem was that I was using standalone c3po dependency

<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>

instead of the c3po package as a hibernate module:

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.0.1.Final</version>
</dependency>


Top
 Profile  
 
 Post subject: Re: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Mon Feb 13, 2012 6:50 am 
Beginner
Beginner

Joined: Thu Apr 21, 2005 12:15 pm
Posts: 34
pb00067 wrote:
For the Derby-Dialect I just have seen in the code that the warning
Code:
The DerbyDialect dialect has been deprecated; use one of the version-specific dialects instead


is given out, regardless if you use org.hibernate.dialect.DerbyTenSevenDialect or org.hibernate.dialect.DerbyDialect

so once you use org.hibernate.dialect.DerbyTenSevenDialect

you simply can ignore this warning message.


Do you think that it actuall uses the TenSeven dialect then or not, doesn't inspire confidence in Hibernate


Top
 Profile  
 
 Post subject: Re: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Mon Feb 13, 2012 9:03 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
Do you think that it actuall uses the TenSeven dialect then or not, doesn't inspire confidence in Hibernate


Is this intended as a question or is it simply a statement?

Anyway I just opened
https://hibernate.onjira.com/browse/HHH-7059
in regard of this.


Top
 Profile  
 
 Post subject: Re: Problem updating Hibernate 3.6 to Hibernate 4
PostPosted: Tue Feb 21, 2012 3:11 pm 
Beginner
Beginner

Joined: Thu Apr 21, 2005 12:15 pm
Posts: 34
It was a question, the issue you raised answers my concerns, thankyou.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.