<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6001.18248" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=791194515-22062009>When faced with an error stack, you should 
look for the error message and google it. This is the error:</SPAN></DIV>
<DIV><SPAN class=791194515-22062009><FONT face="Lucida Sans" color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=791194515-22062009></SPAN>NoClassDefFoundError: 
org/apache/commons/pool/ObjectPool</DIV>
<DIV><FONT face="Lucida Sans" color=#000080 size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=791194515-22062009></SPAN><FONT face="Lucida Sans"><FONT 
color=#000080><FONT size=2>A<SPAN class=791194515-22062009>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 
class=791194515-22062009></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face="Lucida Sans"><FONT color=#000080><FONT size=2><SPAN 
class=791194515-22062009>Julian</SPAN></FONT></FONT></FONT></DIV>
<DIV><BR></DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Kezern [mailto:kezern@gmail.com] 
  <BR><B>Sent:</B> Monday, June 22, 2009 8:43 AM<BR><B>To:</B> 
  jhyde@pentaho.com<BR><B>Cc:</B> Mondrian developer mailing 
  list<BR><B>Subject:</B> Re: [Mondrian] begining with 
  olap4j<BR></FONT><BR></DIV>
  <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&gt;(RolapConnection.java:173)<BR>&nbsp;&nbsp;&nbsp; 
  at 
  mondrian.rolap.RolapConnection.&lt;init&gt;(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&gt;(MondrianOlap4jConnection.java:111)<BR>&nbsp;&nbsp;&nbsp; 
  at 
  mondrian.olap4j.FactoryJdbc3Impl$MondrianOlap4jConnectionJdbc3.&lt;init&gt;(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">jhyde@pentaho.com</A>&gt;</SPAN><BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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>&gt; 
    -----Original Message-----<BR>&gt; From: <A 
    href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</A><BR>&gt; 
    [mailto:<A 
    href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</A>] 
    On Behalf Of Kezern<BR>&gt; Sent: Friday, June 19, 2009 12:30 AM<BR>&gt; To: 
    <A href="mailto:mondrian@pentaho.org">mondrian@pentaho.org</A><BR>&gt; 
    Subject: [Mondrian] begining with olap4j<BR>&gt;<BR>&gt; Hi all,<BR>&gt; I 
    have just started with mondrian and olap4j. I'm trying to<BR>&gt; build a 
    java<BR>&gt; class which connects to my mondrian and extract some 
    data.<BR>&gt; I have deployed the mondrian-embedded.war into my tomcat 
    and<BR>&gt; I have made<BR>&gt; some test with jpivot.<BR>&gt; Now I'm 
    building the new class in eclipse following the<BR>&gt; instrucions 
    of<BR>&gt; the olap4j functional specifications.<BR>&gt; I have written this 
    class.<BR>&gt;<BR>&gt; package olap;<BR>&gt;<BR>&gt; import 
    java.sql.DriverManager;<BR>&gt; import java.sql.SQLException;<BR>&gt; import 
    org.apache.log4j.Logger;<BR>&gt;<BR>&gt; import 
    org.olap4j.*;<BR>&gt;<BR>&gt; public class App<BR>&gt; {<BR>&gt; &nbsp; 
    &nbsp; public static void main( String[] args ) throws<BR>&gt; 
    ClassNotFoundException, SQLException<BR>&gt; &nbsp; &nbsp; {<BR>&gt; &nbsp; 
    &nbsp; &nbsp; &nbsp; System.out.println( "Hello World!" );<BR>&gt; &nbsp; 
    &nbsp; &nbsp; &nbsp; 
    Class.forName("mondrian.olap4j.MondrianOlap4jDriver");<BR>&gt; &nbsp; &nbsp; 
    &nbsp; &nbsp; OlapConnection connection =<BR>&gt; &nbsp; &nbsp; &nbsp; 
    &nbsp; &nbsp; &nbsp; (OlapConnection) 
    DriverManager.getConnection(<BR>&gt;<BR>&gt; 
    "jdbc:mondrian:local:jdbcURL=jdbc:odbc:MondrianFoodMart;" +<BR>&gt; &nbsp; 
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Catalog=/WEB-INF/queries/FoodMart.xml;" 
    +<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Role='California 
    manager'");<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; OlapWrapper wrapper = 
    (OlapWrapper) connection;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; OlapConnection 
    olapConnection = (OlapConnection)<BR>&gt; 
    wrapper.unwrap(OlapConnection.class);<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 
    OlapStatement statement = olapConnection.createStatement();<BR>&gt;<BR>&gt; 
    // &nbsp; &nbsp; &nbsp; &nbsp;OlapResult result =<BR>&gt; // &nbsp; &nbsp; 
    &nbsp; &nbsp; &nbsp; &nbsp;statement.execute(<BR>&gt; // &nbsp; &nbsp; 
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"SELECT {[Measures].[Unit Sales]} 
    ON COLUMNS,\n" +<BR>&gt; // &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
    &nbsp;" &nbsp;{[Product].Members} ON ROWS\n" +<BR>&gt; // &nbsp; &nbsp; 
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"FROM [Sales]");<BR>&gt; &nbsp; 
    &nbsp; }<BR>&gt; }<BR>&gt;<BR>&gt; And I get this error when the class tries 
    to make de connection:<BR>&gt; Exception in thread "main" 
    mondrian.olap.MondrianException: Mondrian<BR>&gt; Error:Internal error: 
    Connect string<BR>&gt; 'local:jdbcURL=jdbc:odbc:MondrianFoodMart;<BR>&gt; 
    Catalog=/WEB-INF/queries/FoodMart.xml; Role=California manager' must<BR>&gt; 
    contain either 'Jdbc' or 'DataSource'<BR>&gt; I have been looking for a 
    solution but I couldn't find one.<BR>&gt; Thanks every 
    body.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; 
    _______________________________________________<BR>&gt; Mondrian mailing 
    list<BR>&gt; <A 
    href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</A><BR>&gt; <A 
    href="http://lists.pentaho.org/mailman/listinfo/mondrian" 
    target=_blank>http://lists.pentaho.org/mailman/listinfo/mondrian</A><BR>&gt;<BR>&gt;<BR>&gt;<BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>