Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Exception in thread "main" java.lang.NoClassDefFoundError: MondrianFoodMartLoader

  1. #1
    Join Date
    Oct 2012
    Posts
    3

    Unhappy Exception in thread "main" java.lang.NoClassDefFoundError: MondrianFoodMartLoader

    hello.
    Linux olap 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux
    java version "1.6.0_18"
    OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze2)
    OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


    i try to install mondrian

    root@olap:/var/lib/tomcat6/webapps# cat mondrian.sh
    #!/bin/bash
    java -cp “\
    /var/lib/tomcat6/webapps/mondrian/lib/mondrian.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/log4j-1.2.8.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/commons-logging-1.0.4.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/commons-collections-3.1.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/eigenbase-xom.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/eigenbase-resgen.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/eigenbase-properties.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/olap4j.jar:\
    /var/lib/tomcat6/webapps/mondrian/lib/postgresql-9.2-1000.jdbc4.jar\
    “ mondrian.test.loader.MondrianFoodMartLoader \
    -verbose -tables -data -indexes \
    -jdbcDrivers=”org.postgresql.Driver” \
    -inputFile=FoodMartCreateData.sql \
    -outputJdbcURL=”jdbcostgresql://localhost/foodmart” \
    -outputJdbcUser=postgres \
    -outputJdbcPassword=postgres



    But i have Error

    root@olap:/var/lib/tomcat6/webapps# ./mondrian.sh
    Exception in thread "main" java.lang.NoClassDefFoundError: mondrian/test/loader/MondrianFoodMartLoader
    Caused by: java.lang.ClassNotFoundException: mondrian.test.loader.MondrianFoodMartLoader
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
    Could not find the main class: mondrian.test.loader.MondrianFoodMartLoader. Program will exit.


    i cant find a solution in internet or forums - (
    Can you help me please?

  2. #2

    Default

    Are you sure the directory /var/lib/tomcat6/webapps/mondrian/lib/ exists? On my machine it's /var/lib/tomcat6/webapps/mondrian/WEB-INF/lib ...

  3. #3
    Join Date
    Oct 2012
    Posts
    3

    Default

    Quote Originally Posted by dknippers View Post
    Are you sure the directory /var/lib/tomcat6/webapps/mondrian/lib/ exists? On my machine it's /var/lib/tomcat6/webapps/mondrian/WEB-INF/lib ...
    i hav here /var/lib/tomcat6/webapps/mondrian/lib/
    and here /var/lib/tomcat6/webapps/mondrian/WEB-INF/lib/
    i try it with two ways

  4. #4

    Default

    Well any jar file in the /lib directory should be automatically be picked up and placed on the classpath, so I don't know why it would not work. Did you restart Tomcat after changing it to /WEB-INF/lib?
    Code:
    sudo /etc/init.d/tomcat6 restart
    .

  5. #5
    Join Date
    Oct 2012
    Posts
    3

    Default

    Quote Originally Posted by dknippers View Post
    Well any jar file in the /lib directory should be automatically be picked up and placed on the classpath, so I don't know why it would not work. Did you restart Tomcat after changing it to /WEB-INF/lib?
    Code:
    sudo /etc/init.d/tomcat6 restart
    .
    yes i doit.

    root@olap:/home/fima# /etc/init.d/tomcat6 restart
    Stopping Tomcat servlet engine: tomcat6.
    Starting Tomcat servlet engine: tomcat6.
    root@olap:/home/fima# cd /var/lib/tomcat6/webapps/
    root@olap:/var/lib/tomcat6/webapps# ./script.sh
    Exception in thread "main" java.lang.NoClassDefFoundError: mondrian/test/loader/MondrianFoodMartLoader
    Caused by: java.lang.ClassNotFoundException: mondrian.test.loader.MondrianFoodMartLoader
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
    Could not find the main class: mondrian.test.loader.MondrianFoodMartLoader. Program will exit.


    root@olap:/var/lib/tomcat6/webapps# cat script.sh
    java -cp "\
    /var/lib/tomcat6/webapps/mondrian/WEB-INF/lib/mondrian.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/log4j-1.2.8.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/commons-collections-3.1.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/olap4j.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/commons-logging-1.0.4.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-xom.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-resgen.jar:\
    /opt/pentaho/biserver-ce/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-properties.jar:\
    /opt/pentaho/biserver-ce/tomcat/lib/mysql-connector-java-5.1.17.jar" \
    mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes \
    -jdbcDrivers=com.mysql.jdbc.Driver \
    -inputFile=/home/akbar/Downloads/pentaho/analysis/mondrian-3.4.1/demo/FoodMartCreateData.sql \
    -outputJdbcURL="jdbc:mysql://localhost/foodmart?user=foodmart&password=pass.word"

  6. #6
    Join Date
    Mar 2007
    Posts
    142

    Default

    Try this example to load foodmart in HSQLDB.

    - Stick the following properties in a file called mondrian.properties at the root of the project:

    mondrian.foodmart.jdbcURL=jdbc:hsqldb:file:c:/etc/foodmart/hsqldb/foodmart
    mondrian.foodmart.jdbcURL=jdbc:hsqldb:hsql://localhost:9001/sampledata
    mondrian.foodmart.jdbcUser=sa
    mondrian.foodmart.jdbcPassword=
    mondrian.jdbcDrivers=org.hsqldb.jdbcDriver
    driver.classpath=c:/git/sandbox-mondrian/dev-lib/hsqldb-1.8.0.7.jar

    - Change the properties accordingly.
    - Run "ant"
    - Run "ant load-foodmart"
    Luc Boudreau
    aka. Luc le Magnifique
    aka. Monsieur Oui Oui

    Lead Engineer, Pentaho Corporation
    Web: http://devdonkey.blogspot.com
    Twitter: luclemagnifique
    IRC: Monsieur_Oui_Oui@freenode

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.