View Full Version : Build test fails - mysql

08-15-2002, 12:04 PM
I tried building both mondrian 0.2 and 0.3 and the build test fails on both.
For database, I am using mySql and the rest of the software used are the recommeneded ones.
Any ideas?
[java] Error in test 'non empty 1(mondrian.test.Main$2)': java.lang.NullPointerException
[java] at mondrian.olap.OlapElementBase.hashCode(OlapElementBase.java:42)
[java] at mondrian.rolap.PrivateHierarchyUsage.hashCode(PrivateHierarchyUsage.java:45)
[java] at java.util.HashMap.get(HashMap.java:266)
[java] at mondrian.rolap.RolapHierarchy.getUsage(RolapHierarchy.java:348)
[java] at mondrian.rolap.RolapHierarchy.setForeignKey(RolapHierarchy.java:154)
[java] at mondrian.rolap.RolapHierarchy.<init>(RolapHierarchy.java:98)
[java] at mondrian.rolap.RolapDimension.newHierarchy(RolapDimension.java:71)
[java] at mondrian.rolap.RolapCube.<init>(RolapCube.java:53)
[java] at mondrian.rolap.RolapConnection.loadSchema(RolapConnection.java:125)
[java] at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:64)
[java] at mondrian.olap.DriverManager.getConnection(DriverManager.java:38)
[java] at mondrian.test.TestContext.getFoodMartConnection(TestContext.java:87)
[java] at mondrian.test.FoodMartTestCase.getConnection(FoodMartTestCase.java:40)
[java] at mondrian.test.FoodMartTestCase.runQuery(FoodMartTestCase.java:34)
[java] at mondrian.test.FoodMartTestCase.assertSize(FoodMartTestCase.java:47)
[java] at mondrian.test.Main$2.runTest(Main.java:371)
[java] at junit.framework.TestCase.runBare(TestCase.java:140)
[java] at junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at junit.framework.TestResult.runProtected(TestResult.java:124)
[java] at junit.framework.TestResult.run(TestResult.java:109)
[java] at junit.framework.TestCase.run(TestCase.java:131)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
[java] at junit.framework.TestSuite.run(TestSuite.java:168)
[java] at mondrian.test.Main.run(Main.java:70)
[java] at mondrian.test.Main.main(Main.java:25)
[java] Error in test 'non empty 2(mondrian.test.Main$3)': java.lang.NullPointerException
[java] at mondrian.olap.OlapElementBase.hashCode(OlapElementBase.java:42)

08-16-2002, 05:13 AM
I've just made some fixes to our MySQL implementation ( -- let me know if you'd like the source code), but we'll need some more work to handle hierarchies which are based upon more than one table.
I've not seen this precise error, however. What version of MySQL and JDBC driver are you using?

08-16-2002, 07:37 AM
I changed to mysql-max-3.23.52 and I also changedthe jdbc driver to:mysql-connector-java-2.0.14-bin.jar.
Here' s my conn info:
<property name="mondrian.jdbcDrivers"
<property name="mondrian.resourceURL"
<property name="mondrian.foodmart.jdbcURL"
<property name="mondrian.foodmart.catalogURL"
I tried it with mondrian0.2 and I get the following error:
[java] java.lang.NullPointerException
[java] at mondrian.resource.ResourceBase.init(ResourceBase.java:52)
[java] at mondrian.resource.ResourceBase.init(ResourceBase.java:36)
[java] at mondrian.olap.MondrianResource.<init>(MondrianResource.java:24)
[java] at mondrian.olap.MondrianResource.instance(MondrianResource.java:42)
[java] at mondrian.test.TestContext.<init>(TestContext.java:58)
[java] at mondrian.test.TestContext.init(TestContext.java:50)
[java] at mondrian.test.Main.run(Main.java:43)
[java] at mondrian.test.Main.main(Main.java:25)
[java] Exception in thread "main"
[java] Java Result: 1
I will try it with mondrian0.3 too and let you know. Do we use the same data for Mondrian0.3 as I don't see a seperate data file for 0.3.
Can I get the changes you have made by doing a fresh download from the source repository ?

08-20-2002, 10:06 AM
I have placed the latest source code (build 111) in the 'experiemental' package: mondrian-0.3.111-src.zip.
You still can't run the FoodMart schema on MySQL. The reason is complicated. "Customers" is a snow-flake dimension (join of 2 tables), and that generates a subquery in the from clause (aka inline view, aka dynamic table) which MySQL can't handle. I'm working on this, but it will be several days.
However, I think your problem is much simpler. The location of the exception makes me think that mondrian isn't finding the resource file it needs, MondrianResource_en.xml. I have resourceURL set to the FOLDER which holds the resource file:
in deploy_env.properties, and
in mondrian.properties. Are those properties set correctly?