Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: xmlaTest exception

  1. #1

    Default xmlaTest exception

    I have mondrian 2.2.2 running on tomcat 5.5.20 on win xp, and I can't get the xmlaTest page to work. The other example pages work. The foodmart access database is setup as a ODBC datasource. I edited the datasources.xml file to read:
    <?xml version="1.0"?>
    <DataSources>
    <DataSource>
    <DataSourceName>MondrianFoodMart</DataSourceName>
    <DataSourceDescription>FoodMart 2000 Data Warehouse From MS Analysis Services</DataSourceDescription>
    <URL>http://localhost:8080/mondrian/xmla</URL>
    <DataSourceInfo>Provider=mondrian; Jdbc=jdbcdbc:MondrianFoodMart; JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver</DataSourceInfo>
    <ProviderType>MDP</ProviderType>
    <AuthenticationMode>Unauthenticated</AuthenticationMode>
    <Catalogs>
    <Catalog name="FoodMart">
    <Definition>/WEB-INF/schema/FoodMart.xml</Definition>
    </Catalog>
    </Catalogs>
    </DataSource>
    </DataSources>
    In web.xml I have configured the datasource with the full file path to datasources.xml. Browsing to localhost:8080/mondrian/xmla returns 'http method get not supported by this url' as expected.
    Clicking on the xml for analysis tester however causes an exception:
    org.apache.jasper.JasperException: Exception in JSP: /xmlaTest.jsp:91
    88: if (whichRequest >= requestResponses.length) {
    89: whichRequest = requestResponses.length - 1;
    90: }
    91: Object[] defaultRequestResponse = (Object[]) requestResponses[whichRequest];
    92: Element requestElem = (Element) defaultRequestResponse[1];
    93: String defaultRequest = XmlaUtil.element2Text(requestElem);
    94: String postURL = request.getParameter("postURL");
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.ArrayIndexOutOfBoundsException: -1
    org.apache.jsp.xmlaTest_jsp._jspService(xmlaTest_jsp.java:124)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    The exception results because whichRequest is set to -1.
    Any suggestions on how to fix this? Have I incorrectly configured something?
    Thanks
    Ben

  2. #2
    Join Date
    Oct 2005
    Posts
    18

    Default xmlatest Exception solution

    I've found where is the problem!
    It's concerning with whitespaces in the path. The code tries to find the files with the xmla test, and if no one is found you get the posted exception.

    For instance, in my path
    "E:\Documentos Pedro\workspace\mondrian\WEB-INF\classes\mondrian\xmla\test\queryFiles"

    the following mondrian code (in XmlTestContext)
    new File(XmlaTestContext.class.getResource("./queryFiles").getFile())
    tries to find the mentioned sample files, but it returns no one because is looking for files in "E:\Documentos%20Pedro\workspace\mondrian\WEB-INF\classes\mondrian\xmla\test\queryFiles", path that obviously does not exist.

    Workaroud: patch the code or create a workspace in a different place without whitespaces.

    Pedro

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.