Hi,

I'm new to mondrian and at the moment I'm having problems using the MondrianFoodMartLoader to populate a DB2 database.

First I used MySQL as a backend for mondrian. I imported the data via the following command:
Code:
java -cp "./lib/mondrian.jar:lib/log4j-1.2.9.jar:lib/eigenbase-xom.jar:lib/eigenbase-resgen.jar:lib/eigenbase-properties.jar:/usr/share/java/mysql-connector-java.jar" \
  mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes \
    -jdbcDrivers=com.mysql.jdbc.Driver \
    -inputFile=../mondrian/mondrian-2.4.2.9831/demo/FoodMartCreateData.sql \
    -outputJdbcURL="jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart"
With this everything worked fine. The database was populated with all the tables etc.

Now I'm trying to do the same with DB2.
Code:
java -cp \
    "lib/mondrian.jar:lib/log4j-1.2.9.jar:lib/eigenbase-xom.jar:lib/eigenbase-resgen.jar:lib/eigenbase-properties.jar:lib/db2jcc.jar" \
  mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes \
    -jdbcDrivers=com.ibm.db2.jcc.DB2Driver \
    -inputFile=../mondrian/mondrian-2.4.2.9831/demo/FoodMartCreateData.sql \
    -outputJdbcUser=foodmart \
    -outputJdbcPassword=foodmart \
    -outputJdbcURL="jdbc:db2://localhost:50001/foodmart"
First problem is the following message:
Code:
...
DROP TABLE "employee"
Drop of employee failed. Ignored
CREATE TABLE "employee"(
    "employee_id" INTEGER NOT NULL,
    "full_name" VARCHAR(30) NOT NULL,
    "first_name" VARCHAR(30) NOT NULL,
    "last_name" VARCHAR(30) NOT NULL,
    "position_id" INTEGER,
    "position_title" VARCHAR(30),
    "store_id" INTEGER NOT NULL,
    "department_id" INTEGER NOT NULL,
    "birth_date" DATE NOT NULL,
    "hire_date" TIMESTAMP,
    "end_date" TIMESTAMP,
    "salary" DECIMAL(10,4) NOT NULL,
    "supervisor_id" INTEGER,
    "education_level" VARCHAR(30) NOT NULL,
    "marital_status" VARCHAR(30) NOT NULL,
    "gender" VARCHAR(30) NOT NULL,
    "management_role" VARCHAR(30))
...
Table employee: loaded 1155 rows.
...
CREATE INDEX "i_time_month" ON "time_by_day" ("month_of_year")
Main error
java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:61)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
        at mondrian.test.loader.MondrianFoodMartLoader.loadFromSQLInserts(MondrianFoodMartLoader.java:597)
        at mondrian.test.loader.MondrianFoodMartLoader.load(MondrianFoodMartLoader.java:328)
        at mondrian.test.loader.MondrianFoodMartLoader.main(MondrianFoodMartLoader.java:255)
Finished load at: Wed Jan 09 14:57:49 CET 2008
The tables are populated with data so why is there this NullPointerException and can I safely ignore it?

Second problem is that when I look at the tables(with the db2cc Control Center) every table name has double quotes for example "employee" . Is this intended?

Another question is how can you supply the username and the password in the jdbcURL. Because if I want to use the web application in tomcat I need to change the "web.xml" file and the *.jsp files in the "queries" folder so far I know.

Example from web.xml for the MySQL database. This is working but I have no idea how the url should look like when I am using DB2.
Code:
<param-value>Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.mysql.jdbc.Driver;RoleXX='California manager';</param-value>
Any help would be appreciated.

Matthias