3 Replies Latest reply on Feb 15, 2016 1:31 AM by Koen Aers

    Cannot use C3P0 with Hibernate

    Jon Baumgartner Newbie

      Hibernate works great for me until I attempt to include C3P0, at which point I run into issues. I added these to my pom.xml:

       

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

       

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

       

       

      I then added C3P0 properties to my hibernate.cfg.xml:

       

        <property name="hibernate.c3p0.max_statements">0</property>

        <property name="hibernate.c3p0.timeout">100</property>

        <property name="hibernate.c3p0.idle_test_period">100</property>

        <property name="hibernate.c3p0.min_size">10</property>

        <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property>

        <property name="hibernate.c3p0.acquire_increment">1</property>

        <property name="hibernate.c3p0.max_size">100</property>

       

      (I also tried using org.hibernate.connection.C3P0ConnectionProvider for the hibernate.connection.provider_class, but no change.)

       

      When I do this, and attempt to run some HQL, I get the following exception:

       

      java.lang.NoSuchMethodError: org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.extractIsolation(Ljava/util/Map;)Ljava/lang/Integer;

          at org.hibernate.c3p0.internal.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:200)

          at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)

          at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)

          at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)

          at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)

          at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)

          at org.jboss.tools.hibernate.runtime.v_4_3.internal.ConfigurationFacadeImpl.buildTargetSessionFactory(ConfigurationFacadeImpl.java:24)

          at org.jboss.tools.hibernate.runtime.common.AbstractConfigurationFacade.buildSessionFactory(AbstractConfigurationFacade.java:169)

          at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:285)

          at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)

          at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:108)

          at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:280)

          at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:81)

          at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:55)

          at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)

          at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:59)

          at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)

          at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)

          at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:462)

          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

          at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)

          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)

          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)

          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)

          at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)

          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)

          at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)

          at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)

          at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)

          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)

          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)

          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)

          at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)

          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)

          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

          at java.lang.reflect.Method.invoke(Unknown Source)

          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)

          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)

          at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

       

       

      I switched hibernate.c3p0 back to 4.3.11.Final and that worked, but then I got runtime errors. I'm really not sure what I'm missing.

        • 1. Re: Cannot use C3P0 with Hibernate
          Jay SenSharma Master

          Try changing the  c3p0 version  from <version>0.9.1.2</version>       to    <version>0.9.2.1</version>

           

          As it looks like hibernate 5.0.7.Final   has a dependency to c3p0 version 0.9.2.1

          http://mvnrepository.com/artifact/org.hibernate/hibernate-c3p0/5.0.7.Final

           

          For further debugging please post the output of the following Maven command:

           

          mvndependency:tree -Dverbose
          OR
          mvn dependency:tree -Dverbose -Dincludes=hibernate-c3p0
          OR
          mvn dependency:tree -Dverbose -Dincludes=c3p0
          


           

           

          Regards

          Jay SenSharma

          • 2. Re: Cannot use C3P0 with Hibernate
            Jon Baumgartner Newbie

            Thanks! Okay, first, c3p0 with groupId of just c3p0 is old, only goes up as far as version 0.9.1.2. To get to 0.9.2.1, I had to use the one from com.mchange. The current version of that is 0.9.5.2.

             

            I tried with both 0.9.5.2 and 0.9.2.1 of com.mchange's c3p0, but got the same errors.

             

            Here is the result of mvn dependency:tree -Dverbose

             

            [INFO] Scanning for projects...

            [INFO]                                                                        

            [INFO] ------------------------------------------------------------------------

            [INFO] Building IccWebService 0.0.1-SNAPSHOT

            [INFO] ------------------------------------------------------------------------

            [INFO]

            [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ IccWebService ---

            [INFO] IccWebService:IccWebService:war:0.0.1-SNAPSHOT

            [INFO] +- asm:asm:jar:3.3.1:compile

            [INFO] +- com.sun.jersey:jersey-bundle:jar:1.19:compile

            [INFO] |  \- (javax.ws.rs:jsr311-api:jar:1.1.1:compile - omitted for duplicate)

            [INFO] +- org.json:json:jar:20151123:compile

            [INFO] +- com.sun.jersey:jersey-server:jar:1.19:compile

            [INFO] |  \- com.sun.jersey:jersey-core:jar:1.19:compile

            [INFO] |     \- (javax.ws.rs:jsr311-api:jar:1.1.1:compile - omitted for duplicate)

            [INFO] +- org.hibernate:hibernate-core:jar:5.0.7.Final:compile

            [INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile

            [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile

            [INFO] |  +- org.javassist:javassist:jar:3.18.1-GA:compile

            [INFO] |  +- antlr:antlr:jar:2.7.7:compile

            [INFO] |  +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile

            [INFO] |  +- org.jboss:jandex:jar:2.0.0.Final:compile

            [INFO] |  +- dom4j:dom4j:jar:1.6.1:compile

            [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:compile

            [INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile

            [INFO] |     \- (org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile - omitted for duplicate)

            [INFO] +- org.glassfish:javax.persistence:jar:10.0-b28:compile

            [INFO] +- com.google.code.gson:gson:jar:2.5:compile

            [INFO] +- net.sf.jt400:jt400:jar:8.7:compile

            [INFO] +- org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.6:compile

            [INFO] |  +- org.apache.maven:maven-plugin-api:jar:2.2.1:compile

            [INFO] |  +- org.apache.maven:maven-artifact:jar:2.2.1:compile

            [INFO] |  |  \- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for conflict with 3.0.20)

            [INFO] |  +- org.apache.maven:maven-model:jar:2.2.1:compile

            [INFO] |  |  \- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  +- org.apache.maven:maven-project:jar:2.2.1:compile

            [INFO] |  |  +- (org.apache.maven:maven-settings:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-profile:jar:2.2.1:compile

            [INFO] |  |  |  +- (org.apache.maven:maven-model:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-interpolation:jar:1.11:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-model:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-artifact-manager:jar:2.2.1:compile

            [INFO] |  |  |  +- (org.apache.maven:maven-repository-metadata:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.apache.maven:maven-artifact:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  |  \- backport-util-concurrent:backport-util-concurrent:jar:3.1:compile

            [INFO] |  |  +- org.apache.maven:maven-plugin-registry:jar:2.2.1:compile

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-interpolation:jar:1.11:compile - omitted for conflict with 1.21)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-artifact:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile

            [INFO] |  |     +- junit:junit:jar:3.8.1:compile

            [INFO] |  |     +- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.5.15)

            [INFO] |  |     \- (classworlds:classworlds:jar:1.1-alpha-2:compile - omitted for conflict with 1.1)

            [INFO] |  +- org.apache.maven:maven-core:jar:2.2.1:compile

            [INFO] |  |  +- (org.apache.maven:maven-settings:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-6:runtime

            [INFO] |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:runtime - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:compile

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-6:compile

            [INFO] |  |  |  +- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6:compile

            [INFO] |  |  |  |  +- nekohtml:xercesMinimal:jar:1.9.6.2:compile

            [INFO] |  |  |  |  +- nekohtml:nekohtml:jar:1.9.6.2:compile

            [INFO] |  |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.wagon:wagon-http:jar:1.0-beta-6:compile

            [INFO] |  |  |  +- (org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-6:runtime

            [INFO] |  |  |  +- (org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6:runtime - omitted for duplicate)

            [INFO] |  |  |  +- org.apache.jackrabbit:jackrabbit-webdav:jar:1.5.0:runtime

            [INFO] |  |  |  |  +- org.apache.jackrabbit:jackrabbit-jcr-commons:jar:1.5.0:runtime

            [INFO] |  |  |  |  +- (org.slf4j:slf4j-api:jar:1.5.3:runtime - omitted for conflict with 1.5.6)

            [INFO] |  |  |  |  \- commons-httpclient:commons-httpclient:jar:3.0:runtime

            [INFO] |  |  |  |     \- commons-codec:commons-codec:jar:1.2:runtime

            [INFO] |  |  |  +- org.slf4j:slf4j-nop:jar:1.5.3:runtime

            [INFO] |  |  |  |  \- (org.slf4j:slf4j-api:jar:1.5.3:runtime - omitted for duplicate)

            [INFO] |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:runtime - omitted for duplicate)

            [INFO] |  |  +- org.slf4j:slf4j-jdk14:jar:1.5.6:runtime

            [INFO] |  |  |  \- org.slf4j:slf4j-api:jar:1.5.6:runtime

            [INFO] |  |  +- org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime

            [INFO] |  |  +- org.apache.maven.reporting:maven-reporting-api:jar:2.2.1:compile

            [INFO] |  |  |  +- org.apache.maven.doxia:doxia-sink-api:jar:1.1:compile

            [INFO] |  |  |  |  \- (org.apache.maven.doxia:doxia-logging-api:jar:1.1:compile - omitted for duplicate)

            [INFO] |  |  |  \- org.apache.maven.doxia:doxia-logging-api:jar:1.1:compile

            [INFO] |  |  |     \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-30:compile - omitted for conflict with 1.0-alpha-9-stable-1)

            [INFO] |  |  +- (org.apache.maven:maven-profile:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-model:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-artifact:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-utils:jar:1.4.2:compile - omitted for conflict with 1.5.15)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-repository-metadata:jar:2.2.1:compile

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-error-diagnostics:jar:2.2.1:compile

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-project:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- commons-cli:commons-cli:jar:1.2:compile

            [INFO] |  |  +- (org.apache.maven:maven-plugin-api:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-6:runtime

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.4.2:runtime - omitted for conflict with 1.5.15)

            [INFO] |  |  |  +- (org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-6:compile - scope updated from runtime; omitted for duplicate)

            [INFO] |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:runtime - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile

            [INFO] |  |  |  +- (org.apache.maven:maven-plugin-api:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  |  +- (org.apache.maven:maven-artifact:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  |  +- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile

            [INFO] |  |  |  \- (classworlds:classworlds:jar:1.1-alpha-2:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-artifact-manager:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven:maven-monitor:jar:2.2.1:compile

            [INFO] |  |  +- org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-6:compile

            [INFO] |  |  |  +- com.jcraft:jsch:jar:0.1.38:compile

            [INFO] |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.4.2:compile - omitted for conflict with 1.5.15)

            [INFO] |  |  |  +- org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-6:compile

            [INFO] |  |  |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.4.2:compile - omitted for conflict with 1.5.15)

            [INFO] |  |  |  |  +- (org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-6:compile - omitted for conflict with 1.0-alpha-4)

            [INFO] |  |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  |  \- (org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile - omitted for duplicate)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  +- classworlds:classworlds:jar:1.1:compile

            [INFO] |  |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile

            [INFO] |  |     +- (org.codehaus.plexus:plexus-utils:jar:1.5.5:compile - omitted for conflict with 1.5.15)

            [INFO] |  |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile

            [INFO] |  +- org.apache.maven:maven-settings:jar:2.2.1:compile

            [INFO] |  |  +- (org.apache.maven:maven-model:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-interpolation:jar:1.11:compile - omitted for duplicate)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:1.5.15:compile - omitted for duplicate)

            [INFO] |  |  \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile - omitted for duplicate)

            [INFO] |  +- org.apache.maven:maven-archiver:jar:2.6:compile

            [INFO] |  |  +- (org.apache.maven:maven-artifact:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-model:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-core:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- org.apache.maven.shared:maven-shared-utils:jar:0.7:compile

            [INFO] |  |  |  \- com.google.code.findbugs:jsr305:jar:2.0.1:compile

            [INFO] |  |  +- (org.codehaus.plexus:plexus-archiver:jar:2.8.1:compile - omitted for conflict with 2.9)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:3.0.20:compile - omitted for conflict with 1.5.15)

            [INFO] |  |  \- (org.codehaus.plexus:plexus-interpolation:jar:1.21:compile - omitted for conflict with 1.11)

            [INFO] |  +- org.codehaus.plexus:plexus-io:jar:2.4.1:compile

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:3.0.20:compile - omitted for conflict with 1.5.15)

            [INFO] |  |  \- (commons-io:commons-io:jar:2.2:compile - omitted for duplicate)

            [INFO] |  +- commons-io:commons-io:jar:2.2:compile

            [INFO] |  +- org.codehaus.plexus:plexus-archiver:jar:2.9:compile

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:3.0.20:compile - omitted for conflict with 1.5.15)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-io:jar:2.4:compile - omitted for conflict with 2.4.1)

            [INFO] |  |  \- org.apache.commons:commons-compress:jar:1.9:compile

            [INFO] |  +- org.codehaus.plexus:plexus-interpolation:jar:1.21:compile

            [INFO] |  +- com.thoughtworks.xstream:xstream:jar:1.4.4:compile

            [INFO] |  |  +- xmlpull:xmlpull:jar:1.1.3.1:compile

            [INFO] |  |  \- xpp3:xpp3_min:jar:1.1.4c:compile

            [INFO] |  +- org.codehaus.plexus:plexus-utils:jar:3.0.20:compile

            [INFO] |  +- org.apache.maven.shared:maven-filtering:jar:1.3:compile

            [INFO] |  |  +- (org.apache.maven:maven-project:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-core:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-model:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-artifact:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven:maven-settings:jar:2.2.1:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.maven.shared:maven-shared-utils:jar:0.6:compile - omitted for conflict with 0.7)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-utils:jar:3.0.18:compile - omitted for conflict with 3.0.20)

            [INFO] |  |  +- (org.codehaus.plexus:plexus-interpolation:jar:1.19:compile - omitted for conflict with 1.21)

            [INFO] |  |  \- org.sonatype.plexus:plexus-build-api:jar:0.0.4:compile

            [INFO] |  |     \- (org.codehaus.plexus:plexus-utils:jar:1.5.8:compile - omitted for conflict with 3.0.20)

            [INFO] |  \- org.apache.maven.shared:maven-mapping:jar:1.0:compile

            [INFO] |     +- (org.apache.maven:maven-artifact:jar:2.0.6:compile - omitted for conflict with 2.2.1)

            [INFO] |     \- (org.codehaus.plexus:plexus-interpolation:jar:1.15:compile - omitted for conflict with 1.21)

            [INFO] +- com.sun.jersey:jersey-servlet:jar:1.19:compile

            [INFO] |  \- (com.sun.jersey:jersey-server:jar:1.19:compile - omitted for duplicate)

            [INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:compile

            [INFO] +- javax.transaction:jta:jar:1.1:compile

            [INFO] +- org.apache.tomcat:tomcat-catalina:jar:8.0.5:compile

            [INFO] |  +- org.apache.tomcat:tomcat-servlet-api:jar:8.0.5:compile

            [INFO] |  +- org.apache.tomcat:tomcat-jsp-api:jar:8.0.5:compile

            [INFO] |  |  +- org.apache.tomcat:tomcat-el-api:jar:8.0.5:compile

            [INFO] |  |  \- (org.apache.tomcat:tomcat-servlet-api:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  +- org.apache.tomcat:tomcat-juli:jar:8.0.5:compile

            [INFO] |  +- org.apache.tomcat:tomcat-annotations-api:jar:8.0.5:compile

            [INFO] |  +- org.apache.tomcat:tomcat-api:jar:8.0.5:compile

            [INFO] |  |  \- (org.apache.tomcat:tomcat-servlet-api:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  +- org.apache.tomcat:tomcat-jni:jar:8.0.5:compile

            [INFO] |  +- org.apache.tomcat:tomcat-coyote:jar:8.0.5:compile

            [INFO] |  |  +- (org.apache.tomcat:tomcat-servlet-api:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.tomcat:tomcat-jni:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  |  +- (org.apache.tomcat:tomcat-juli:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  |  \- (org.apache.tomcat:tomcat-util:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  +- org.apache.tomcat:tomcat-util:jar:8.0.5:compile

            [INFO] |  |  \- (org.apache.tomcat:tomcat-juli:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |  \- org.apache.tomcat:tomcat-util-scan:jar:8.0.5:compile

            [INFO] |     +- (org.apache.tomcat:tomcat-util:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |     +- (org.apache.tomcat:tomcat-juli:jar:8.0.5:compile - omitted for duplicate)

            [INFO] |     \- (org.apache.tomcat:tomcat-api:jar:8.0.5:compile - omitted for duplicate)

            [INFO] +- org.hibernate:hibernate-c3p0:jar:5.0.7.Final:compile

            [INFO] |  +- (org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile - omitted for duplicate)

            [INFO] |  +- (org.hibernate:hibernate-core:jar:5.0.7.Final:compile - omitted for duplicate)

            [INFO] |  \- (com.mchange:c3p0:jar:0.9.2.1:compile - omitted for duplicate)

            [INFO] \- com.mchange:c3p0:jar:0.9.2.1:compile

            [INFO]    \- com.mchange:mchange-commons-java:jar:0.2.3.4:compile

            [INFO] ------------------------------------------------------------------------

            [INFO] BUILD SUCCESS

            [INFO] ------------------------------------------------------------------------

            [INFO] Total time: 3.949 s

            [INFO] Finished at: 2016-02-02T09:13:14-05:00

            [INFO] Final Memory: 17M/440M

            [INFO] ------------------------------------------------------------------------

             

            • 3. Re: Cannot use C3P0 with Hibernate
              Koen Aers Master

              Hey Jon,

               

              Can you please create and attach a minimal project setup, ready to import in JBoss Tools, that reproduces this issue? Also please detail the different components of your platform (OS, Java, JBoss Tools (or JBoss Developer Studio) version and Hibernate version).

               

              Cheers,

              Koen