<!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> </DIV>
<DIV><SPAN class=791194515-22062009></SPAN>NoClassDefFoundError:
org/apache/commons/pool/ObjectPool</DIV>
<DIV><FONT face="Lucida Sans" color=#000080 size=2></FONT> </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 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> </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>
Class.forName("mondrian.olap4j.MondrianOlap4jDriver");<BR>
OlapConnection connection
=<BR>
(OlapConnection) DriverManager.getConnection(<BR>
"jdbc:mondrian:Jdbc=jdbc:postgresql://localhost:5432/CdM_db;JdbcUser=postgres;JdbcPassword=Tbcrkpi47a8;"
+<BR>
"Catalog=/descargas/apache-tomcat-5.5.27/webapps/mondrian-embedded/WEB-INF/queries/tickets4.mondrian.xml;"
+<BR>
"Role='California manager'");<BR>
OlapWrapper wrapper = (OlapWrapper)
connection;<BR> OlapConnection
olapConnection = (OlapConnection)
wrapper.unwrap(OlapConnection.class);<BR>
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> at
mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:785)<BR>
at mondrian.olap.Util.newInternal(Util.java:1435)<BR> at
mondrian.rolap.RolapConnection.createDataSource(RolapConnection.java:396)<BR>
at
mondrian.rolap.RolapConnection.<init>(RolapConnection.java:173)<BR>
at
mondrian.rolap.RolapConnection.<init>(RolapConnection.java:117)<BR>
at
mondrian.olap.DriverManager.getConnection(DriverManager.java:110)<BR>
at
mondrian.olap.DriverManager.getConnection(DriverManager.java:74)<BR>
at
mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:111)<BR>
at
mondrian.olap4j.FactoryJdbc3Impl$MondrianOlap4jConnectionJdbc3.<init>(FactoryJdbc3Impl.java:110)<BR>
at
mondrian.olap4j.FactoryJdbc3Impl.newConnection(FactoryJdbc3Impl.java:30)<BR>
at
mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:109)<BR>
at java.sql.DriverManager.getConnection(Unknown Source)<BR>
at java.sql.DriverManager.getConnection(Unknown Source)<BR>
at olap.App.main(App.java:22)<BR>Caused by: java.lang.NoClassDefFoundError:
org/apache/commons/pool/ObjectPool<BR> at
mondrian.rolap.RolapConnection.createDataSource(RolapConnection.java:392)<BR>
... 11 more<BR><BR>What I'm doing wrong?<BR><BR>
<DIV class=gmail_quote>2009/6/19 Julian Hyde <SPAN dir=ltr><<A
href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</A>></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>>
-----Original Message-----<BR>> From: <A
href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</A><BR>>
[mailto:<A
href="mailto:mondrian-bounces@pentaho.org">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">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>>
public static void main( String[] args ) throws<BR>>
ClassNotFoundException, SQLException<BR>> {<BR>>
System.out.println( "Hello World!" );<BR>>
Class.forName("mondrian.olap4j.MondrianOlap4jDriver");<BR>>
OlapConnection connection =<BR>>
(OlapConnection)
DriverManager.getConnection(<BR>><BR>>
"jdbc:mondrian:local:jdbcURL=jdbc:odbc:MondrianFoodMart;" +<BR>>
"Catalog=/WEB-INF/queries/FoodMart.xml;"
+<BR>> "Role='California
manager'");<BR>> OlapWrapper wrapper =
(OlapWrapper) connection;<BR>> OlapConnection
olapConnection = (OlapConnection)<BR>>
wrapper.unwrap(OlapConnection.class);<BR>>
OlapStatement statement = olapConnection.createStatement();<BR>><BR>>
// OlapResult result =<BR>> //
statement.execute(<BR>> //
"SELECT {[Measures].[Unit Sales]}
ON COLUMNS,\n" +<BR>> //
" {[Product].Members} ON ROWS\n" +<BR>> //
"FROM [Sales]");<BR>>
}<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">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></BLOCKQUOTE></BODY></HTML>