Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Problems with c3p0-0.9.2-pre1.jar

  1. #1
    Join Date
    May 2010
    Posts
    7

    Default Problems with c3p0-0.9.2-pre1.jar

    I am a new Pentaho user. I am using Pentaho Solutions as my learning guide. I am using the latest biserver-ce on Windows XP SP3. I have carefully made all the changes to the various files to use MySQL as the database. When I make the changes to use c3p0 pooling, things stop working.

    I have downloaded the latest c3p0 and put the c3p0-0.9.2-pre1.jar file in the tomcat\common\lib directory as per every instruction I can find. I also put a copy of this file in the adminstration-console\lib directory. I added the following to mysql5.hibernate.cfg.xml <session-factory>:
    <property name="hibernate.c3p0.acquire_increment">3</property>
    <property name="hibernate.c3p0.idle_test_period">14400</property>
    <property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.max_size">75</property>
    <property name="hibernate.c3p0.max_statements">0</property>
    <property name="hibernate.c3p0.timeout">25200</property>
    <property name="hibernate.c3p0.preferredTestQuery">select 1</property>
    <property name="hibernate.c3p0.testConnectionOnCheckout">true</property>

    When I start pentaho, it fails with the following error:

    2010-06-04 08:38:16,895 ERROR [org.pentaho.platform.repository.hibernate.HibernateUtil] HIBUTIL.ERROR_0006 - Building SessionFactory failed.
    java.lang.NoClassDefFoundError: com/mchange/v2/log/MLog
    at com.mchange.v2.c3p0.DataSources.<clinit>(DataSources.java:59)
    .... many more lines of output ....

    This suggests a classpath problem, but the jar is in the tomcat\common\lib directory and tomcat can find the other libs residing there.

    As a lark, I created a second Pentaho installation to run using hypersonic. (pristine install). I added the c3p0 file to the common\lib directory and added the above mentioned hibernate.c3p0 changes to the hsql.hibernate.cfb.xml file. Only one file changed and the same error occurred.

    I have checked permissions on the c3p0 jar file and they are the same as th hsqldb-x.x.x.jar file in the same directory.

    Any help or suggestions would be greatly appreciated.

    Harold

  2. #2
    Join Date
    May 2010
    Posts
    7

    Default Problems with c3p0-0.9.2-pre1.jar

    Hi all,
    I appear to have found my own solution. I downloaded an older version of c3p0 and put that jar in the lib directory and it worked. Although the c3p0 instructions state that only the c3p0.x.x.x.jar file needs to be in the appropriate lib directories, the c3p0-0.9.2-pre1.bin.zip contains an additional jar filie that must be added to the lib directories. It is mchange-commons-0.2.jar. Adding that fixed the problem on my hypersonic installation. I'm now trying it on the MySQL instance.

    Just a heads up for all c3p0 upgraders.

    Harold
    Last edited by FatherAntox; 06-04-2010 at 11:47 AM. Reason: added title

  3. #3
    Join Date
    May 2010
    Posts
    7

    Default Problems with c3p0-0.9.2-pre1.jar

    In case you are interested, adding the missing jar file fixed my problem with the MySQL instance also.

    Harold
    Last edited by FatherAntox; 06-04-2010 at 11:47 AM. Reason: added title

  4. #4
    ajandrade Guest

    Default

    Hi FatherAntox,

    I also configured my server with c3p0. In Mysql was straightforward to install but in Oracle I got the same error that you have.

    Finally I've solved changing 'Select 1' to 'Select 1 from dual'. The problem was the sql TestQuery.
    Check the settings because it can be.

    <property name="hibernate.c3p0.testConnectionOnCheckout">tru e</property>

    Greetings

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.