Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Problem in Mondrian OLAP4J Driver with Apache DBCP ?

  1. #1
    Join Date
    Mar 2008

    Unhappy Problem in Mondrian OLAP4J Driver with Apache DBCP ?

    Hi guys,

    I am using Mondrian OLAP4J Driver with Apache DBCP .(i configure my 'dataSource' as DBCP BasicDataSource in Spring XML configuration) and its not connecting to the server!
    Its giving following error:

    What could be the problem ?

    thanks in advance

    at mondrian.olap4j.MondrianOlap4jConnection.setAutoCommit(
    at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(
    at org.apache.commons.dbcp.PoolableConnectionFactory.activateObject(
    at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(
    at org.apache.commons.dbcp.BasicDataSource.getConnection(
    at com.aeturnum.athiva.modules.analysis.model.datasource.IOLAPDataSourceTest.onSetUp(
    at org.springframework.test.AbstractSingleSpringContextTests.setUp(
    at junit.framework.TestCase.runBare(
    at org.springframework.test.ConditionalTestCase.runBare(
    at junit.framework.TestResult$1.protect(
    at junit.framework.TestResult.runProtected(
    at junit.framework.TestSuite.runTest(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
    b4 getConnection"

  2. #2
    Join Date
    Nov 1999


    I've fixed a couple of problems in mondrian's olap4j driver and enhanced the olap4j test suite to explicitly test with apache commons-dbcp. To be specific, I tested with dbcp version 1.1, and used the BasicDataSource. I assume that other drivers/data sources in dbcp are similar.

    As of mondrian change 10792 (will be in mondrian-3.0.2) and olap4j revision 82 (will be in olap4j-0.9.5) mondrian's olap4j driver now works with dbcp.

    A couple of things to remember:
    * As of dbcp 1.1 - things may have changed in 1.2, I don't know - you can't use java.sql.Wrapper facilities that were introduced in JDK 1.6/JDBC 4.0. So, to get the OlapConnection underneath a dbcp Connection, cast the Connection to DelegatingConnection then call getInnermostDelegate()
    * If you're using BasicDataSource, you must call BasicDataSource.setAccessToUnderlyingConnectionAllowed(true) otherwise getInnermostDelegate will impudently return null.

    Maybe these problems have been fixed in dbcp 1.2. If you're using olap4j with dbcp 1.2, please let me know.

    Lastly, there are still some problems interoperating dbcp 1.1 with the XMLA driver for olap4j. I am working on these...


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.