Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: [Mondrian] Connect to Catalog within webapp

  1. #1
    Kim Goldov Guest

    Default [Mondrian] 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/document...chitecture.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
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Kim Goldov Guest

    Default [Mondrian] RE: Connect to Catalog within webapp

    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 (DOT) 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/document...chitecture.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
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.