0

What I am doing wrong? I think, trouble is in hibernate-core-3.5.6-Final-patched-play-1.1.1 library. But I do not know where to get never maven dependency with connection package and ConnectionProvider. I have config like this:

  <spring.version>4.1.3.RELEASE</spring.version>

  <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.3.7.Final</version>
        <scope>provided</scope>
    </dependency>

  <property name="hibernate.connection.provider_class">
        com.vse.uslugi.utilities.sql.DBCPConnectionProvider
  </property>

DBCPConnectionProvider.java http://pastebin.com/06AnvwuN

Semih Eker
  • 2,389
  • 1
  • 20
  • 29
Arthur
  • 1,156
  • 3
  • 20
  • 49

1 Answers1

1

your class is implementing a different interface than hibernate is expecting. you are implementing:

org.hibernate.connection.ConnectionProvider;

while hibernate was compiled against / expects:

org.hibernate.engine.jdbc.connections.spi.ConnectionProvider

the answer is likely much better explained here

to quote "Hibernate keeps changing the package containing the ConnectionProvider base class. It changed from version 3 to 4 and has changed again with verson 4.3."

Having said that, this only explains why you have the problem and shows what you're doing wrong but it doesn't solve your problem. What is the final-patched-play-1.1.1 library? if this is the latest version then I guess you will have to downgrade to hibernate 3 in order to use it.

Community
  • 1
  • 1
Joeblade
  • 1,735
  • 14
  • 22
  • But with org.hibernate.engine.jdbc.connections.spi.ConnectionProvider I have this http://i63.fastpic.ru/big/2014/1220/b2/65c5183fab4ab35ff9cc59788ca93cb2.png :-( – Arthur Dec 20 '14 at 13:49
  • hm based on this http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html it looks like what you were doing is perfectly valid for 3.3 (so if you implement org.hibernate.connection.ConnectionProvider. I don't think my answer answers your question correctly. – Joeblade Dec 20 '14 at 19:00