Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: [Mondrian] XML/A support in mondrian not working

  1. #1
    Robert Lemmen Guest

    Default [Mondrian] XML/A support in mondrian not working

    hi folks,

    I have just installed the mondrian-embedded.war from
    mondrian-3.2.1.13885-derby.zip into a apache-tomcat-7.0.8 the general
    system seems to be working, because i can use the "mdxquery" servlet to
    query the embedded database. i want to access the server remotely using
    xml/a, to do this i use olap4j 0.9.8.343 and create a connection like
    this:

    Connection connection = DriverManager.getConnection(
    "jdbc:xmla:Server=http://localhost:8080/mondrian-embedded/xmla;"
    + "Catalog=FoodMart");

    originally this gave me errors, which i fixed by changing the
    datasources.xml and replaced the original DataSourceInfo (which pointed
    to some oracle db) with this:

    <DataSourceInfo>Provider=mondrian;Jdbc='jdbc:derby:classpath:/foodmart';Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=org.apache.derby.jdbc.EmbeddedDriver;JdbcUser=sa;JdbcPassword=sa;PoolNeeded=false;</DataSourceInfo>

    this seems to have done the trick, as i now get a different error which
    i was hoping one of you could help me with. the olap4j seems to do some
    sort of metadata discovery before sending teh actual query, whcih fails
    with an exception:

    XMLA provider gave exception:
    <SOAP-ENV:Fault>
    <faultcode>
    SOAP-ENV:Server.00HSBE02
    </faultcode>
    <faultstring>
    XMLA Discover unparse results error
    </faultstring>
    <faultactor>
    Mondrian
    </faultactor>
    <detail>
    <XA:error xmlns:XA="http://mondrian.sourceforge.net">
    <code>
    00HSBE02
    </code>
    <desc>
    The Mondrian XML: Container was opened in read-only
    mode.
    </desc>
    </XA:error>
    </detail>
    </SOAP-ENV:Fault>

    Request was:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <Discover xmlns="urn:schemas-microsoft-com:xml-analysis"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <RequestType>MDSCHEMA_DIMENSIONS</RequestType>
    <Restrictions>
    <RestrictionList>
    <CATALOG_NAME>FoodMart</CATALOG_NAME><SCHEMA_NAME>FoodMart</SCHEMA_NAME><CUBE_NAME>Sales
    Ragged</CUBE_NAME> </RestrictionList>
    </Restrictions>
    <Properties>
    <PropertyList>
    <DataSourceInfo>Provider=Mondrian;DataSource=MondrianFoodMart;</DataSourceInfo>
    <Catalog>FoodMart</Catalog>
    <Content>Data</Content>
    </PropertyList>
    </Properties>
    </Discover>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    the tomcat log gives some extra info:

    Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal
    error: while counting members of level '[Customers].[Name]; sql=[select
    count(*) from (select distinct "customer"."fullname" from "customer" as
    "customer") as "init"]

    any ideas?

    thanks robert

    --
    Robert Lemmen http://www.semistable.com

    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.10 (GNU/Linux)

    iEYEARECAAYFAk1vpRUACgkQS6AOchRbaWavGwCdEMZzCY4yBJnv8XPJe6LfGYUY
    afoAmgNn6PFKCR0bBFXMUHBk/mVmL7vC
    =MQX3
    -----END PGP SIGNATURE-----

  2. #2
    Robert Lemmen Guest

    Default Re: [Mondrian] XML/A support in mondrian not working

    On Thu, Mar 03, 2011 at 02:26:29PM +0000, Robert Lemmen wrote:
    > Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal
    > error: while counting members of level '[Customers].[Name]; sql=[select
    > count(*) from (select distinct "customer"."fullname" from "customer" as
    > "customer") as "init"]


    turns out exactly this is the problem: derby can't do sub-selects of the
    "select ... from (select ...)" type. doh. switched to postgres for now
    and everything is working fine.

    having some embedded database working for demos would be nice though,
    does anyone know of a different one that has all the features we need
    for use with mondrian?

    cu robert

    --
    Robert Lemmen http://www.semistable.com
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  3. #3
    Luc Boudreau Guest

    Default Re: [Mondrian] XML/A support in mondrian not working

    You can try HSQLDB. We use it as a Mondrian backend for the olap4j
    test suite and it works ok.

    Luc

    On 2011-03-04, at 4:57, Robert Lemmen <robertle (AT) semistable (DOT) com> wrote:

    > On Thu, Mar 03, 2011 at 02:26:29PM +0000, Robert Lemmen wrote:
    >> Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal
    >> error: while counting members of level '[Customers].[Name]; sql=[select
    >> count(*) from (select distinct "customer"."fullname" from "customer" as
    >> "customer") as "init"]

    >
    > turns out exactly this is the problem: derby can't do sub-selects of the
    > "select ... from (select ...)" type. doh. switched to postgres for now
    > and everything is working fine.
    >
    > having some embedded database working for demos would be nice though,
    > does anyone know of a different one that has all the features we need
    > for use with mondrian?
    >
    > cu robert
    >
    > --
    > Robert Lemmen http://www.semistable.com
    > _______________________________________________
    > Mondrian mailing list
    > Mondrian (AT) pentaho (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian

    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  4. #4
    Julian Hyde Guest

    Default RE: [Mondrian] XML/A support in mondrian not working

    > On Thu, Mar 03, 2011 at 02:26:29PM +0000, Robert Lemmen wrote:
    > > Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal
    > > error: while counting members of level '[Customers].[Name];

    > sql=[select
    > > count(*) from (select distinct "customer"."fullname" from

    > "customer" as
    > > "customer") as "init"]

    >
    > turns out exactly this is the problem: derby can't do
    > sub-selects of the
    > "select ... from (select ...)" type. doh. switched to postgres for now
    > and everything is working fine.
    >
    > having some embedded database working for demos would be nice though,
    > does anyone know of a different one that has all the features we need
    > for use with mondrian?


    What you are seeing is peculiar. We regularly run the whole foodmart-based
    test suite against derby, and it works fine.

    Mondrian knows that Derby supports 'count(distinct ...)' so the "while
    counting members of level" queries are of the form 'select count(distinct x)
    from ...' rather than 'select count(*) from (select distinct ...)' that you
    are seeing.

    I'd like to get to the bottom of this issue. What version of derby, mondrian
    and java are you using?

    Julian

    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  5. #5
    Julian Hyde Guest

    Default RE: [Mondrian] XML/A support in mondrian not working

    I looked more closely at this. I don't think it has anything to do with
    distinct-count. That just happens to be the first query Mondrian executes.

    I see you got the error "Container was opened in read-only mode". According
    to http://db.apache.org/derby/releases/...-10.1.3.1.html this is a
    symptom of bug DERBY-541.

    Suggest you upgrade Derby.

    Julian

    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  6. #6
    Robert Lemmen Guest

    Default Re: [Mondrian] XML/A support in mondrian not working

    hi julian,

    On Fri, Mar 04, 2011 at 11:33:48AM -0800, Julian Hyde wrote:
    > I looked more closely at this. I don't think it has anything to do with
    > distinct-count. That just happens to be the first query Mondrian executes.
    >
    > I see you got the error "Container was opened in read-only mode". According
    > to http://db.apache.org/derby/releases/...-10.1.3.1.html this is a
    > symptom of bug DERBY-541.
    >
    > Suggest you upgrade Derby.


    thanks, that was it! I thought i had a recent derby, but indeed i was
    confused about the different CLASSPATH (as always).

    however, i am still not quite there yet. i now get a different error
    message "The Mondrian XML: Feature not implemented"

    if i look in catalina.out, more detail is provided:

    mondrian.xmla.XmlaServlet#doPost: Errors when handling XML/A message
    mondrian.xmla.XmlaException: Mondrian Error:XMLA Discover unparse
    results error
    ....
    Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal
    error: while counting members of level '[Customers].[Name]; sql=[select
    count(*) from (select distinct "customer"."fullname" from "customer" as
    "customer") as "init"]
    ....
    Caused by: java.sql.SQLException: Feature not implemented
    ....
    Caused by: ERROR XSAI3: Feature not implemented
    at
    org.apache.derby.iapi.error.StandardException.newException(Unknown
    Source)
    at org.apache.derby.impl.store.raw.log.ReadOnly.checkVersion(Unknown
    Source)
    at org.apache.derby.impl.store.raw.RawStore.checkVersion(Unknown
    Source)
    at
    org.apache.derby.impl.store.access.RAMTransaction.checkVersion(Unknown
    Source)
    at
    org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.createConglomerate(Unknown
    Source)
    at
    org.apache.derby.impl.store.access.RAMTransaction.createConglomerate(Unknown
    Source)
    at org.apache.derby.iapi.store.access.DiskHashtable.<init>(Unknown
    Source)
    at
    org.apache.derby.iapi.store.access.BackingStoreHashtable.spillToDisk(Unknown
    Source)
    at
    org.apache.derby.iapi.store.access.BackingStoreHashtable.add_row_to_hash_table(Unknown
    Source)
    ....

    spillToDisk() is probably not going to work if the database is embedded
    in the jjar, right? I set the memory params of tomcat to ridiculously
    high based on the assumption that it wouldn't "spill" then, but to no
    avail... any ideas?

    thanks robert

    --
    Robert Lemmen http://www.semistable.com
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  7. #7
    Julian Hyde Guest

    Default RE: [Mondrian] XML/A support in mondrian not working

    I am surprised that Mondrian is generating

    select count(*) from (select distinct "customer"."fullname" from
    "customer" as "customer") as "init"

    rather than

    select count(distinct "customer"."fullname") from "customer"

    If it generated the latter I think it would work. So I think there is a bug
    in Mondrian's Derby dialect (or Mondrian can't identify that it is talking
    to Derby).

    I confess that I've never run mondrian against a Derby instance embedded in
    the jar file. You might try hypersonic and its variants (hsqldb, h2)
    instead.

    Julian

    > -----Original Message-----
    > From: mondrian-bounces (AT) pentaho (DOT) org
    > [mailto:mondrian-bounces (AT) pentaho (DOT) org] On Behalf Of Robert Lemmen
    > Sent: Monday, March 07, 2011 3:07 AM
    > To: mondrian (AT) pentaho (DOT) org
    > Subject: Re: [Mondrian] XML/A support in mondrian not working
    >
    > hi julian,
    >
    > On Fri, Mar 04, 2011 at 11:33:48AM -0800, Julian Hyde wrote:
    > > I looked more closely at this. I don't think it has

    > anything to do with
    > > distinct-count. That just happens to be the first query

    > Mondrian executes.
    > >
    > > I see you got the error "Container was opened in read-only

    > mode". According
    > > to

    > http://db.apache.org/derby/releases/...-10.1.3.1.html this is a
    > > symptom of bug DERBY-541.
    > >
    > > Suggest you upgrade Derby.

    >
    > thanks, that was it! I thought i had a recent derby, but indeed i was
    > confused about the different CLASSPATH (as always).
    >
    > however, i am still not quite there yet. i now get a different error
    > message "The Mondrian XML: Feature not implemented"
    >
    > if i look in catalina.out, more detail is provided:
    >
    > mondrian.xmla.XmlaServlet#doPost: Errors when handling XML/A message
    > mondrian.xmla.XmlaException: Mondrian Error:XMLA Discover unparse
    > results error
    > ...
    > Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal
    > error: while counting members of level '[Customers].[Name];
    > sql=[select
    > count(*) from (select distinct "customer"."fullname" from
    > "customer" as
    > "customer") as "init"]
    > ...
    > Caused by: java.sql.SQLException: Feature not implemented
    > ...
    > Caused by: ERROR XSAI3: Feature not implemented
    > at
    > org.apache.derby.iapi.error.StandardException.newException(Unknown
    > Source)
    > at
    > org.apache.derby.impl.store.raw.log.ReadOnly.checkVersion(Unknown
    > Source)
    > at org.apache.derby.impl.store.raw.RawStore.checkVersion(Unknown
    > Source)
    > at
    > org.apache.derby.impl.store.access.RAMTransaction.checkVersion(Unknown
    > Source)
    > at
    > org.apache.derby.impl.store.access.heap.HeapConglomerateFactor
    > y.createConglomerate(Unknown
    > Source)
    > at
    > org.apache.derby.impl.store.access.RAMTransaction.createConglo
    > merate(Unknown
    > Source)
    > at org.apache.derby.iapi.store.access.DiskHashtable.<init>(Unknown
    > Source)
    > at
    > org.apache.derby.iapi.store.access.BackingStoreHashtable.spill
    > ToDisk(Unknown
    > Source)
    > at
    > org.apache.derby.iapi.store.access.BackingStoreHashtable.add_r
    > ow_to_hash_table(Unknown
    > Source)
    > ...
    >
    > spillToDisk() is probably not going to work if the database
    > is embedded
    > in the jjar, right? I set the memory params of tomcat to ridiculously
    > high based on the assumption that it wouldn't "spill" then, but to no
    > avail... any ideas?
    >
    > thanks robert
    >
    > --
    > Robert Lemmen http://www.semistable.com
    > _______________________________________________
    > Mondrian mailing list
    > Mondrian (AT) pentaho (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian
    >


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  8. #8
    Robert Lemmen Guest

    Default Re: [Mondrian] XML/A support in mondrian not working

    On Mon, Mar 07, 2011 at 09:54:23AM -0800, Julian Hyde wrote:
    > I am surprised that Mondrian is generating
    >
    > select count(*) from (select distinct "customer"."fullname" from
    > "customer" as "customer") as "init"
    >
    > rather than
    >
    > select count(distinct "customer"."fullname") from "customer"
    >
    > If it generated the latter I think it would work. So I think there is a bug
    > in Mondrian's Derby dialect (or Mondrian can't identify that it is talking
    > to Derby).


    just out of curiosity: how can I find out which dialect mondrian thinks
    it is speaking?

    > I confess that I've never run mondrian against a Derby instance embedded in
    > the jar file. You might try hypersonic and its variants (hsqldb, h2)
    > instead.


    will try that soon!

    cu robert

    --
    Robert Lemmen http://www.semistable.com
    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  9. #9
    Julian Hyde Guest

    Default RE: [Mondrian] XML/A support in mondrian not working

    > > If it generated the latter I think it would work. So I
    > think there is a bug
    > > in Mondrian's Derby dialect (or Mondrian can't identify

    > that it is talking
    > > to Derby).

    >
    > just out of curiosity: how can I find out which dialect
    > mondrian thinks
    > it is speaking?


    Attach a debugger.

    Julian

    _______________________________________________
    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.