PDA

View Full Version : install mondrian on postgresql



rgilaard
05-08-2006, 12:58 PM
Hi folks,

first of all I would really like to thank you for this wonderfull piece of opensource software. Now, if only I could get it to work...:-)

I would like to get mondrian to work with my postgresql database. I've found a few notes in the mondrian rc2 doc directory describing somebody's work but can't get it to work yet. I'm not a java developer!

I installed and configured postgresql 8.1 on this openbsd database server.

To load the mondrian Foodmart demo I issued this command:

java -cp "/usr/local/src/mondrian-2.1-bin/lib/mondrian.jar:/usr/local/src/mondrian-2.1-src/mondrian-2.1-RC/lib/log4j-1.2.9.jar:/usr/local/src/mondrian-2.1-src/mondrian-2.1-RC/lib/eigenbase-xom.jar:/usr/local/src/mondrian-2.1-src/mondrian-2.1-RC/lib/eigenbase-resgen.jar:/usr/local/src/postgresql-8.1-405.jdbc3.jar" mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes -jdbcDrivers="org.postgresql.Driver,sun.jdbc.odbc.JdbcOdbcDriver" -inputFile="/usr/local/src/mondrian-2.1-bin/demo/FoodMartCreateData.sql" -outputJdbcURL="jdbc:postgresql://192.168.1.102/company" -outputJdbcUser=****** -outputJdbcPassword=******

And then I get this as a result:

log4j:WARN No appenders could be found for logger (mondrian.test.loader.MondrianFoodMartLoader).
log4j:WARN Please initialize the log4j system properly.
Parameters:
-verbose
-tables
-data
-indexes
-jdbcDrivers=org.postgresql.Driver,sun.jdbc.odbc.JdbcOdbcDriver
-inputFile=/usr/local/src/mondrian-2.1-bin/demo/FoodMartCreateData.sql
-outputJdbcURL=jdbc:postgresql://192.168.1.102/company
-outputJdbcUser=aoladmin
-outputJdbcPassword=boban01

Output connection is PostgreSQL, 8.1.3
Main error
java.lang.NoClassDefFoundError: org/eigenbase/util/property/Trigger
at mondrian.test.loader.MondrianFoodMartLoader.load(MondrianFoodMartLoader.java:279)
at mondrian.test.loader.MondrianFoodMartLoader.main(MondrianFoodMartLoader.java:243)
Finished load at: Mon May 08 22:57:06 CEST 2006

What is wrong here?

Thanks in advanced,

Brgds
Robert

jhyde
05-08-2006, 02:00 PM
The class you need should be in eigenbase-resgen.jar. Does /usr/local/ src/mondrian-2.1-src/mondrian-2.1-RC/lib/eigenbase-resgen.jar actually exist?

Or maybe you have an out of date copy. Download the latest copy from http://perforce.eigenbase.org:8080/open/mondrian/lib/, and try again.

Julian

rgilaard
05-09-2006, 07:08 AM
Thanks for your quick answer.
I'm @ work now, so I can't check it but I think I have found the problem. I'm looking at your post and noticed this:

:/usr/local/ src/mondrian-2.1-src/mondrian-2.1-RC/lib/eigenbase-resgen.jar

There is an extra space between / after the local, so I can imagine that is a problem.

I hope this is the solution because if I can recall it, that jar.file is in that directory.
Will keep you posted......

rgilaard
05-09-2006, 02:05 PM
No luck....
I grappled with these installation issues but with no luck. I downloaded that eigenbase-resgen.jar file but still whenever I try to load the data, I get:

log4j:WARN No appenders could be found for logger (mondrian.test.loader.MondrianFoodMartLoader).
log4j:WARN Please initialize the log4j system properly.
Parameters:
-verbose
-tables
-data
-indexes
-jdbcDrivers=org.postgresql.Driver
-inputFile=/usr/local/src/mondrian-2.1-bin/demo/FoodMartCreateData.sql
-outputJdbcURL=jdbc:postgresql://192.168.1.102/foodmartdb
-outputJdbcUser=foodmart
-outputJdbcPassword=foodmart

Output connection is PostgreSQL, 8.1.3
Main error
java.lang.NoClassDefFoundError: org/eigenbase/util/property/Trigger
at mondrian.test.loader.MondrianFoodMartLoader.load(MondrianFoodMartLoader.java:279)
at mondrian.test.loader.MondrianFoodMartLoader.main(MondrianFoodMartLoader.java:243)
Finished load at: Tue May 09 22:34:08 CEST 2006

So now I don't know what to do next....
Ideas anyone?

jhyde
05-09-2006, 07:57 PM
Run with the 'java -v' option so that java prints out the classes as it loads them. Does it load ANY classes in the org.eigenbase.property package? If it does, it means that eigenbase-resgen.jar is on the classpath correctly.

Does eigenbase-resgen.jar contain the class org.eigenbase.property.Trigger?

rgilaard
05-10-2006, 12:02 PM
No, it does NOT load any classes in that org.eigenbase.property package.

I've extracted this eigenbase-resgen.jar file and this is the contents of that resulting directory:

rgilaard@testserver:/usr/local/src/mondrian-2.1-src/mondrian-2.1-RC/lib/org/eigenbase/resgen$ ls -gGlm

AbstractGenerator.class, AbstractJavaGenerator.class, CppGenerator.class, CppHeaderGenerator.class, FileTask.class,
Generator.class, JavaBaseGenerator.class, JavaBaseGenerator$ExceptionDescription.class, JavaFunctorBaseGenerator.class,
JavaLocaleGenerator.class, PropertiesFileTask.class, Resource.class, ResourceDef.class, ResourceDef$Code.class,
ResourceDef$Exception.class, ResourceDefinition.class, ResourceDefinition$Instance.class, ResourceDef$Message.class,
ResourceDef$Property.class, ResourceDef$ResourceBundle.class, ResourceDef$Resource.class, ResourceDef$Text.class,
ResourceGen.class, ResourceGenTask.class, ResourceGenTask$Include.class, ResourceInstance.class,
ShadowResourceBundle$1.class, ShadowResourceBundle.class, ShadowResourceBundle$MyPropertyResourceBundle.class, Util.class,
Util$DummyPrintStream.class, Util$DummyPrintWriter.class, XmlFileTask.class

rgilaard@testserver:/usr/local/src/mondrian-2.1-src/mondrian-2.1-RC/lib/org/eigenbase/resgen$

So what does this mean?
I also added the eigenbase-resgen to my CLASSPATH and started java without the cp, but also no luck.

Does this mean I don't have the classes in that eigenbase-resgen file?
Why does the java -version option not show any eigenbase class loaded?

Thanks in advanced.

jhyde
05-10-2006, 06:38 PM
Aaargh! I'm an idiot.

The jar file you need on your classpath is eigenbase-properties.jar (as well as eigenbase-resgen.jar).

It should be alongside eigenbase-resgen.jar. If not, download it from the place you downloaded the other one.

Hope that helps.

Julian

PS Note that http://mondrian.sourceforge.net/install.html has an example of the command line with the correct classpath.

rgilaard
05-11-2006, 01:25 PM
Installation went very smooth afterwards!! The data has been loaded into my postgresql database.
I added all the necessarry jar's into my classpath so I could just type java mondrian.......

Kudos for the help.

I will next try to follow that guide you posted and hope I will make it till the end because I really want to test this olap server. Have a few datasets I want to work with.

However, I can see some ambiguity with regards to the docs you provided in that url and the one I was looking at which came from the doc directory of the 2.0 -rc1 installation.

Do I have to adjust the following settings from the web.xml file to suit my needs too:


MDXQueryServlet
mondrian.web.servlet.MDXQueryServlet

connectString
Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver;RoleXX='California manager';




I have to change that as you described in the docs? There are two sections where I saw these tags (webapp and mdxQueryServlet).

Thanks in advanced,