<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The error means that your class can't find a suitable driver. This occurs if you have a invalid connection string.</div>&nbsp;<a href="http://mondrian.pentaho.org/documentation/configuration.php">http://mondrian.pentaho.org/documentation/configuration.php</a> tells me that you need to include the JdbcDriver as parameter as well<div>so it would be:</div><div><br></div><div><blockquote type="cite">OlapConnection connection =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (OlapConnection) DriverManager.getConnection(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "jdbc:mondrian:<span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">JdbcDrivers=org.postgresql.Driver;Jdbc=jdbc:postgresql://localhost:5432/CdM_db;JdbcUser=postgres;JdbcPassword=Tbcrkpi47a8;" +</span></blockquote><blockquote type="cite">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "Catalog=/descargas/apache-tomcat-5.5.27/webapps/mondrian-embedded/WEB-INF/queries/tickets4.mondrian.xml;" +<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "Role='California manager'");</blockquote><div><br></div><div>Paul<br><div><br><div><div>On 22 Jun 2009, at 18:23, Kezern wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Julian, you was rigth. After rebooting the error changed and I had to add commons-vfs.jar to the path.<br>now I have an error of no suitable driver.<br>Exception in thread "main" org.apache.commons.dbcp.DbcpException: java.sql.SQLException: No suitable driver<br> I have searched in google and in the forum but I didn't find any answer.<br><br><div class="gmail_quote">2009/6/22 Julian Hyde <span dir="ltr">&lt;<a href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</a>></span><br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> <div><span>When faced with an error stack, you should look for the error message and google it. This is the error:</span></div><div class="im"> <div><span><font color="#000080" face="Lucida Sans" size="2"></font></span>&nbsp;</div> <div><span></span>NoClassDefFoundError: org/apache/commons/pool/ObjectPool</div> <div><font color="#000080" face="Lucida Sans" size="2"></font>&nbsp;</div> </div><div><span></span><font face="Lucida Sans"><font color="#000080"><font size="2">A<span>nd google tells you that&nbsp; you need to put commons-pool.jar on your path.</span></font></font></font></div> <div><font face="Lucida Sans"><font color="#000080"><font size="2"><span></span></font></font></font>&nbsp;</div> <div><font face="Lucida Sans"><font color="#000080"><font size="2"><span>Julian</span></font></font></font></div> <div><br></div><br> <blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">  <div dir="ltr" align="left" lang="en-us">  <hr>  <font face="Tahoma" size="2"><b>From:</b> Kezern [mailto:<a href="mailto:kezern@gmail.com" target="_blank">kezern@gmail.com</a>]   <br><b>Sent:</b> Monday, June 22, 2009 8:43 AM<br><b>To:</b>   <a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a><br><b>Cc:</b> Mondrian developer mailing   list<br><b>Subject:</b> Re: [Mondrian] begining with   olap4j<br></font><br></div><div><div></div><div class="h5">  <div></div>Hi Julian,<br>Thanks for your answer. I have made some changes   following your instructions.<br>I have a postgresql database and a cuble   defined into mondrian in a xml file.<br>Now my code is as   follows:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   Class.forName("mondrian.olap4j.MondrianOlap4jDriver");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   OlapConnection connection   =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   (OlapConnection) DriverManager.getConnection(<br>&nbsp;&nbsp;&nbsp;   &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   "jdbc:mondrian:Jdbc=jdbc:postgresql://localhost:5432/CdM_db;JdbcUser=postgres;JdbcPassword=Tbcrkpi47a8;"   +<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   "Catalog=/descargas/apache-tomcat-5.5.27/webapps/mondrian-embedded/WEB-INF/queries/tickets4.mondrian.xml;"   +<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   "Role='California manager'");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   OlapWrapper wrapper = (OlapWrapper)   connection;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OlapConnection   olapConnection = (OlapConnection)   wrapper.unwrap(OlapConnection.class);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   OlapStatement statement = olapConnection.createStatement();<br><br>And I get   this error:<br>Exception in thread "main" mondrian.olap.MondrianException:   Mondrian Error:Internal error: Error while creating connection pool (with URI   jdbc:postgresql://localhost:5432/CdM_db)<br>&nbsp;&nbsp;&nbsp; at   mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:785)<br>&nbsp;&nbsp;&nbsp;   at mondrian.olap.Util.newInternal(Util.java:1435)<br>&nbsp;&nbsp;&nbsp; at   mondrian.rolap.RolapConnection.createDataSource(RolapConnection.java:396)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.rolap.RolapConnection.&lt;init>(RolapConnection.java:173)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.rolap.RolapConnection.&lt;init>(RolapConnection.java:117)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.olap.DriverManager.getConnection(DriverManager.java:110)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.olap.DriverManager.getConnection(DriverManager.java:74)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.olap4j.MondrianOlap4jConnection.&lt;init>(MondrianOlap4jConnection.java:111)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.olap4j.FactoryJdbc3Impl$MondrianOlap4jConnectionJdbc3.&lt;init>(FactoryJdbc3Impl.java:110)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.olap4j.FactoryJdbc3Impl.newConnection(FactoryJdbc3Impl.java:30)<br>&nbsp;&nbsp;&nbsp;   at   mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:109)<br>&nbsp;&nbsp;&nbsp;   at java.sql.DriverManager.getConnection(Unknown Source)<br>&nbsp;&nbsp;&nbsp;   at java.sql.DriverManager.getConnection(Unknown Source)<br>&nbsp;&nbsp;&nbsp;   at olap.App.main(App.java:22)<br>Caused by: java.lang.NoClassDefFoundError:   org/apache/commons/pool/ObjectPool<br>&nbsp;&nbsp;&nbsp; at   mondrian.rolap.RolapConnection.createDataSource(RolapConnection.java:392)<br>&nbsp;&nbsp;&nbsp;   ... 11 more<br><br>What I'm doing wrong?<br><br>  <div class="gmail_quote">2009/6/19 Julian Hyde <span dir="ltr">&lt;<a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a>></span><br>  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Your     connect string is wrong. Something     like<br><br>jdbc:mondrian:Datasource=jdbc/SampleData;Catalog=./foodmart/FoodMart.xml;<br><br>or<br><br>jdbc:mondrian:Jdbc=jdbc:mysql://localhost/foodmart;JdbcUser=foodmart;JdbcPas<br>sword=foodmart;Catalog=./foodmart/FoodMart.xml;<br> <br>Always     starts 'jdbc:mondrian:' if you're using the mondrian olap4j driver,<br>or     'jdbc:xmla:' if you're using the XMLA driver.<br><br>Then you need     'Datasource=' or, more commonly, 'Jdbc=' to give it the URL of<br>the     underlying database.<br><br>Other options for the mondrian driver are     documented here:<br><br><a href="http://mondrian.pentaho.org/documentation/configuration.php#Connect_string_p" target="_blank">http://mondrian.pentaho.org/documentation/configuration.php#Connect_string_p</a><br>roperties<br> <br><br>Julian<br><br><br><br>>     -----Original Message-----<br>> From: <a href="mailto:mondrian-bounces@pentaho.org" target="_blank">mondrian-bounces@pentaho.org</a><br>>     [mailto:<a href="mailto:mondrian-bounces@pentaho.org" target="_blank">mondrian-bounces@pentaho.org</a>]     On Behalf Of Kezern<br>> Sent: Friday, June 19, 2009 12:30 AM<br>> To:     <a href="mailto:mondrian@pentaho.org" target="_blank">mondrian@pentaho.org</a><br>>     Subject: [Mondrian] begining with olap4j<br>><br>> Hi all,<br>> I     have just started with mondrian and olap4j. I'm trying to<br>> build a     java<br>> class which connects to my mondrian and extract some     data.<br>> I have deployed the mondrian-embedded.war into my tomcat     and<br>> I have made<br>> some test with jpivot.<br>> Now I'm     building the new class in eclipse following the<br>> instrucions     of<br>> the olap4j functional specifications.<br>> I have written this     class.<br>><br>> package olap;<br>><br>> import     java.sql.DriverManager;<br>> import java.sql.SQLException;<br>> import     org.apache.log4j.Logger;<br>><br>> import     org.olap4j.*;<br>><br>> public class App<br>> {<br>> &nbsp;     &nbsp; public static void main( String[] args ) throws<br>>     ClassNotFoundException, SQLException<br>> &nbsp; &nbsp; {<br>> &nbsp;     &nbsp; &nbsp; &nbsp; System.out.println( "Hello World!" );<br>> &nbsp;     &nbsp; &nbsp; &nbsp;     Class.forName("mondrian.olap4j.MondrianOlap4jDriver");<br>> &nbsp; &nbsp;     &nbsp; &nbsp; OlapConnection connection =<br>> &nbsp; &nbsp; &nbsp;     &nbsp; &nbsp; &nbsp; (OlapConnection)     DriverManager.getConnection(<br>><br>>     "jdbc:mondrian:local:jdbcURL=jdbc:odbc:MondrianFoodMart;" +<br>> &nbsp;     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Catalog=/WEB-INF/queries/FoodMart.xml;"     +<br>> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Role='California     manager'");<br>> &nbsp; &nbsp; &nbsp; &nbsp; OlapWrapper wrapper =     (OlapWrapper) connection;<br>> &nbsp; &nbsp; &nbsp; &nbsp; OlapConnection     olapConnection = (OlapConnection)<br>>     wrapper.unwrap(OlapConnection.class);<br>> &nbsp; &nbsp; &nbsp; &nbsp;     OlapStatement statement = olapConnection.createStatement();<br>><br>>     // &nbsp; &nbsp; &nbsp; &nbsp;OlapResult result =<br>> // &nbsp; &nbsp;     &nbsp; &nbsp; &nbsp; &nbsp;statement.execute(<br>> // &nbsp; &nbsp;     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"SELECT {[Measures].[Unit Sales]}     ON COLUMNS,\n" +<br>> // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;     &nbsp;" &nbsp;{[Product].Members} ON ROWS\n" +<br>> // &nbsp; &nbsp;     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"FROM [Sales]");<br>> &nbsp;     &nbsp; }<br>> }<br>><br>> And I get this error when the class tries     to make de connection:<br>> Exception in thread "main"     mondrian.olap.MondrianException: Mondrian<br>> Error:Internal error:     Connect string<br>> 'local:jdbcURL=jdbc:odbc:MondrianFoodMart;<br>>     Catalog=/WEB-INF/queries/FoodMart.xml; Role=California manager' must<br>>     contain either 'Jdbc' or 'DataSource'<br>> I have been looking for a     solution but I couldn't find one.<br>> Thanks every     body.<br>><br>><br>><br>><br>>     _______________________________________________<br>> Mondrian mailing     list<br>> <a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br>> <a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br> ><br>><br>><br><br></blockquote></div><br></div></div></blockquote></div> </blockquote></div><br> _______________________________________________<br>Mondrian mailing list<br><a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>http://lists.pentaho.org/mailman/listinfo/mondrian<br></blockquote></div><br></div></div></div></body></html>