[Mondrian] Mondrian with Hive

Luc Boudreau lucboudreau at gmail.com
Wed Feb 29 12:57:06 EST 2012


Looks like the driver is rejecting Apache DBCP's call to
setAutoCommit(). This has to be fixed in the hive driver.

Luc


On Wed, Feb 29, 2012 at 11:49 AM, Venkatesh U
<venkatesh.umaashankar at gmail.com> wrote:
> Hi,
>  I have downloaded the latest version of mondrian-3.3.0.14703
> and hive-0.7.1-cdh3u3. My hive server is running and i have defined a simple
> schema. But the jdbc connection does not seem to work.
>
> Here are the steps i followed,
>
> -> I copied $HIVE_HOME/lib/*jar to mondrian-webapp/WEB-INF/lib and also
> created a symobolic link to $HIVE_HOME/conf
> in mondrian-webapp/WEB-INF/classes directory
> -> copied hadoop*core*jar to WEB-INF/lib
> -> Modified web.xml as below
>
>  <context-param>
>     <param-name>connectString</param-name>
>
> <param-value>Provider=mondrian;Jdbc=jdbc:hive://localhost:9999/default;Catalog=/WEB-INF/queries/TestHive.xml;JdbcDrivers=org.apache.hadoop.hive.jdbc.HiveDriver</param-value>
>   </context-param>
>
> but I am getting the below error
>
> Results: Error:
>
> mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while
> creating SQL connection: Jdbc=jdbc:hive://localhost:9999/default
> 	at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:912)
> 	at mondrian.olap.Util.newInternal(Util.java:2038)
> 	at mondrian.olap.Util.newError(Util.java:2054)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:232)
> 	at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:195)
> 	at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:239)
> 	at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:60)
> 	at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1121)
> 	at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:913)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:151)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:87)
> 	at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
> 	at mondrian.olap.DriverManager.getConnection(DriverManager.java:71)
> 	at mondrian.olap.DriverManager.getConnection(DriverManager.java:53)
> 	at
> mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:90)
> 	at mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:241)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> 	at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> 	at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> 	at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> 	at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
> 	at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a
> connection, pool exhausted
> 	at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:212)
> 	... 30 more
> Caused by: java.util.NoSuchElementException: Could not create a validated
> object, cause: Method not supported - setAutoCommit(true)
> 	at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806)
> 	at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> 	... 31 more
> Cannot get a connection, pool exhaustedjava.util.NoSuchElementException:
> Could not create a validated object, cause: Method not supported -
> setAutoCommit(true)
> 	at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806)
> 	at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:212)
> 	at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:195)
> 	at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:239)
> 	at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:60)
> 	at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:1121)
> 	at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:913)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:151)
> 	at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:87)
> 	at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
> 	at mondrian.olap.DriverManager.getConnection(DriverManager.java:71)
> 	at mondrian.olap.DriverManager.getConnection(DriverManager.java:53)
> 	at
> mondrian.web.servlet.MdxQueryServlet.processRequest(MdxQueryServlet.java:90)
> 	at mondrian.web.servlet.MdxQueryServlet.doGet(MdxQueryServlet.java:241)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> 	at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> 	at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> 	at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> 	at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
> 	at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
>
>
> What version of mondrian works with hive ? or Am i missing something?
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>


More information about the Mondrian mailing list