Question

I have a webapp that I'm trying to use Mondrian within. And I'm getting the following exception when I try to open a connection:

Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Virtual file is not readable: /WEB-INF/olap/mycube.xml

I have tested this cube using a plain J2SE program from the command line, and it works fine. However, when I tried to execute the same cube in my web application I get the error above. My connect string is the following:

jdbc:mondrian:Jdbc=jdbc:mysql://${server.db.host}/HRWarehouse?user=${server.db.username}&password=${server.db.password};Catalog=/WEB-INF/olap/mycube.xml;

This is very similar to what I've found in the Mondrian web application. However, somehow that application has installed the ServletContext in the VFS, but there is exactly zero documentation out there that I can find through google about any sort of special configuration for mondrian in a web application.

I have worked around the issue by setting the path to the schema to be absolute reference instead of relative to webapp context. While this has allowed me to continue testing it is not a suitable solution to the problem. I'm looking for a answer on how to that fix the exception that allows a webapp context relative URL.

Was it helpful?

Solution

I think you need to specify the work file in the Catalog,

 `jdbc:mondrian:Jdbc=jdbc:mysql://${server.db.host}/HRWarehouse?user=${server.db.username}&password=${server.db.password};Catalog=file:/path/to/schema.xml;`

I cant recall if it was absolute path or not, try both again.

I would also double check the connection string just to make sure it's written properly. Also, here is a link that might end up helpful if you don't have it already.

Update Try to add jndi:/ at the beggining of your path: jndi:/localhost/path/to/file.xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top