[Mondrian] RE: Connect to Catalog within webapp

Kim Goldov kgoldov at uw.edu
Mon May 10 20:40:39 EDT 2010


Stepping through the working Mondrian demo revealed that "/WEB-INF/queries2/FluMart.xml" was being mapped to "jndi:/localhost/mondrian/WEB-INF/queries2/FluMart.xml". Adding the "jndi:/localhost..." text to the beginning of my Catalog path in my API code seems to be a reasonable solution.

Kim 

-----Original Message-----
From: Kim Goldov 
Sent: Monday, May 10, 2010 12:10 PM
To: 'mondrian at pentaho.org'
Subject: Connect to Catalog within webapp

I'm getting an error when trying to connect to a catalog file specified as "/WEB-INF/FluMart.xml" using the API, 

DriverManager.getConnection(
	              "Provider=mondrian;" +
	              "Jdbc=jdbc:mysql://localhost/flumart;" +
	              "JdbcUser=foodmart;" +
	              "JdbcPassword=xyz;" +
	              "Catalog=/WEB-INF/FluMart.xml;",
	              null);

--->   Virtual file is not readable: /WEB-INF/FluMart.xml

The Mondrian documentation at http://mondrian.pentaho.org/documentation/architecture.php indicates that this should work (for FoodMart.xml)

If I specify the catalog as "Catalog=file:///home/kgoldov/tomcat/webapps/mondrian/WEB-INF/FluMartX.xml;" it connects correctly.

The strange thing is that the relative path, "/WEB-INF/queries2/FluMart.xml" works fine in a modified mondrian demo ...

In mondiran.jsp:
<jp:mondrianQuery id="query01" jdbcDriver="com.mysql.jdbc.Driver" jdbcUrl="jdbc:mysql://localhost/flumart?user=foodmart&password=xyz" catalogUri="/WEB-INF/queries2/FluMart.xml"> <!-- WORKS! -->

Thanks,
Kim



More information about the Mondrian mailing list