PDA

View Full Version : mondrian-0.6 test fails



kmuglurmath
05-28-2003, 02:46 PM
Hi,
I just downloaded mondrian 0.6 and setup the mysql database using tables, indexes and data from the mondrian 0.6 mysql data file.
When I run mondrian.bat test from the bin folder, the test fails, and the junit index.html output shows the following:
Tests Errors Failures Time(s)
Main 334 296 8 4.877
Internal error: Error while creating RolapSchema (Provider=mondrian; Jdbc=jdbc:mysql://192.168.1.95/foodmart?user=dwdba&password=password; Catalog=jar:file:/C:\Java\mondrian-0.6\lib/mondrian.war!/WEB-INF/queries/FoodMart.xml)
mondrian.resource.ChainableRuntimeException: Internal error: Error while creating RolapSchema (Provider=mondrian; Jdbc=jdbc:mysql://192.168.1.95/foodmart?user=dwdba&password=password; Catalog=jar:file:/C:\Java\mondrian-0.6\lib/mondrian.war!/WEB-INF/queries/FoodMart.xml)
at mondrian.olap.MondrianResource.newInternal(MondrianResource.java:45)
at mondrian.olap.Util.newInternal(Util.java:433)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:103)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:53)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:122)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:53)
at mondrian.test.TestContext.getFoodMartConnection(TestContext.java:146)
at mondrian.test.FoodMartTestCase.getConnection(FoodMartTestCase.java:43)
at mondrian.test.FoodMartTestCase.runQuery(FoodMartTestCase.java:37)
at mondrian.test.FoodMartTestCase.runQueryCheckResult(FoodMartTestCase.java:143)
at mondrian.test.FoodMartTestCase.runQueryCheckResult(FoodMartTestCase.java:136)
at mondrian.test.BasicQueryTest.testSample0(BasicQueryTest.java:411)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:100)
... 25 more
caused by
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:100)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:53)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:122)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:53)
at mondrian.test.TestContext.getFoodMartConnection(TestContext.java:146)
at mondrian.test.FoodMartTestCase.getConnection(FoodMartTestCase.java:43)
at mondrian.test.FoodMartTestCase.runQuery(FoodMartTestCase.java:37)
at mondrian.test.FoodMartTestCase.runQueryCheckResult(FoodMartTestCase.java:143)
at mondrian.test.FoodMartTestCase.runQueryCheckResult(FoodMartTestCase.java:136)
at mondrian.test.BasicQueryTest.testSample0(BasicQueryTest.java:411)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
I suspect some key file is not in the classpath somewhere, although I did add the mysql jdbc jar file to the classpath set in mondrian.bat.
I'd like to get this working and start using it in my own separate database. Please help! Thanks.

jhyde
05-28-2003, 07:30 PM
Looks like you're missing a JDBC driver. You need to tell Mondrian which JDBC driver to use.
Create a file called mondrian.properties in the directory where you run the test, containing the following line:
mondrian.jdbcDrivers=com.mysql.jdbc.Driver

kmuglurmath
05-29-2003, 12:05 AM
I have the JDBC driver set in the mondrian.properties file. Please see the sequence of commands and the output I get below that finally shows the number of failed tests in junit:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
c:\>cd java\mondrian-0.6
c:\Java\mondrian-0.6>cd bin
c:\Java\mondrian-0.6\bin>dir
Volume in drive C has no label.
Volume Serial Number is 5493-212E
Directory of c:\Java\mondrian-0.6\bin
05/29/2003 04:00 AM <DIR> .
05/29/2003 04:00 AM <DIR> ..
05/28/2003 06:07 PM 1,093 mondrian.bat
05/28/2003 06:06 PM 1,335 mondrian.properties
05/24/2003 07:06 PM 1,003 mondrian.sh
05/24/2003 06:29 PM 577 README.html
05/24/2003 07:06 PM 2,887 runtime.xml
05/28/2003 06:18 PM 4,716 sqlnet.log
6 File(s) 11,611 bytes
2 Dir(s) 5,416,435,712 bytes free
c:\Java\mondrian-0.6\bin>type mondrian.properties
# $Id: //open/mondrian/bin/mondrian.properties#4 $
# This software is subject to the terms of the Common Public License
# Agreement, available at the following URL:
#
http://www.opensource.org/licenses/cpl.html.
# (C) Copyright 2001-2003 Kana Software, Inc. and others.
# All Rights Reserved.
# You must accept the terms of that agreement to use this software.
# jhyde, 31 October, 2001
# Uncomment the following lines to run subsets of the test suite
#mondrian.test.Class=mondrian.olap.fun.BuiltinFunTable
#mondrian.test.Name=testToggleDrillState
# Comma-separated list of JDBC drivers
# mondrian.jdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver,oracle.jdbc.OracleDriver,com.mysql.jdbc.Driver
mondrian.jdbcDrivers=com.mysql.jdbc.Driver
# JDBC connect string used by the test suite.
#mondrian.foodmart.jdbcURL=jdbc:odbc:MondrianFoodMart
#mondrian.foodmart.jdbcURL=jdbc:oracle:oci8:foodmart/foodmart@realm1
#mondrian.foodmart.jdbcURL=jdbc:odbc:MondrianFoodMart
#mondrian.foodmart.jdbcURL=jdbc:hsqldb:demo/hsql/FoodMart
mondrian.foodmart.jdbcURL=jdbc:mysql://192.168.1.95/foodmart?user=dwdba&password=password
# Tracing
#mondrian.trace.level=1
# Additional products. Uncomment the ones you have installed.
#catalina.home=C:/jakarta-tomcat-4.1.24
#weblogic.home=C:/bea/wlserver6.1
# End mondrian.properties
c:\Java\mondrian-0.6\bin>type mondrian.bat
@rem $Id: //open/mondrian/bin/mondrian.bat#3 $
@rem This software is subject to the terms of the Common Public License
@rem Agreement, available at the following URL:
@rem
http://www.opensource.org/licenses/cpl.html.
@rem (C) Copyright 2001-2003 Kana Software, Inc. and others.
@rem All Rights Reserved.
@rem You must accept the terms of that agreement to use this software.
@set SRCROOT=%~dp0\..
@set LIB=%SRCROOT%\lib
@rem set JAVA_HOME=C:/jdk1.3.1_02
@if exist "%JAVA_HOME%/bin/javac.exe" goto javaOk
@echo JAVA_HOME (%JAVA_HOME%) is not set correctly
@goto end
:javaOk
@set CLASSPATH=%LIB%\mondrian.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\ant.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\optional.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\xercesImpl.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\xml-apis.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\junit.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\mm.mysql-2.0.4-bin.jar
%JAVA_HOME%\bin\java -classpath "%CLASSPATH%" -Dant.home="%SRCROOT%" org.apache.tools.ant.Main -buildfile runtime.xml %1 %2 %3 %4 %5 %6 %7 %8 %9
:end
@rem End mondrian.bat
c:\Java\mondrian-0.6\bin>mondrian.bat test
c:\Java\mondrian-0.6\bin>C:\Java\jdk1.4.1\bin\java -classpath "c:\Java\mondrian-0.6\bin\\..\lib\mondrian.jar;c:\Java\mondrian-0.6\bin\\..\lib\ant.jar;c:\Java\mondrian-0.6\bin\\..\lib\optional.jar;c:\Java\mondrian-0.6\bin\\..\lib\xercesImpl.jar;c:\Java\mondrian-0.6\bin\\..\lib\xml-apis.jar;c:\Java\mondrian-0.6\bin\\..\lib\junit.jar;c:\Java\mondrian-0.6\bin\\..\lib\mm.mysql-2.0.4-bin.jar" -Dant.home="c:\Java\mondrian-0.6\bin\\.." org.apache.tools.ant.Main -buildfile runtime.xml test
Buildfile: runtime.xml
test:
[mkdir] Created dir: C:\Java\mondrian-0.6\bin\junit-results
[echo] Running mondrian tests
[echo] Catalog is jar:file:/C:\Java\mondrian-0.6\lib/mondrian.war!/WEB-INF/queries/FoodMart.xml
[echo] JDBC is jdbc:mysql://192.168.1.95/foodmart?user=dwdba&password=password
[echo] JDBC drivers are com.mysql.jdbc.Driver
[junit] Running mondrian.test.Main
[junit] Mondrian: properties loaded from 'file:/c:/Java/mondrian-0.6/bin/mondrian.properties'
[junit] Mondrian: loaded 2 system properties
[junit] Tests run: 334, Failures: 8, Errors: 296, Time elapsed: 4.737 sec
[junit] TEST mondrian.test.Main FAILED
[junitreport] Using Xalan version: Xalan Java 2.2.D11
[junitreport] Transform time: 11106ms
[echo] See results at junit-results/html/index.html.
BUILD SUCCESSFUL
Total time: 22 seconds
c:\Java\mondrian-0.6\bin>

kmuglurmath
06-01-2003, 04:21 PM
Has anybody managed to install and have all tests completely run on mondrian-0.6 successfully with no error messages? If so, could somebody please publish all steps taken for a successful test?
Thanks,
Kiran.