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
    Posts
    1

    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
    umanga

    "
    java.lang.UnsupportedOperationException
    at mondrian.olap4j.MondrianOlap4jConnection.setAutoCommit(MondrianOlap4jConnection.java:136)
    at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:268)
    at org.apache.commons.dbcp.PoolableConnectionFactory.activateObject(PoolableConnectionFactory.java:368)
    at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:878)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
    at com.aeturnum.athiva.modules.analysis.model.datasource.IOLAPDataSourceTest.onSetUp(IOLAPDataSourceTest.java:29)
    at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:89)
    at junit.framework.TestCase.runBare(TestCase.java:128)
    at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:228)
    at junit.framework.TestSuite.run(TestSuite.java:223)
    at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    b4 getConnection"

  2. #2
    Join Date
    Nov 1999
    Posts
    1,618

    Default

    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...

    Julian

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.