#10 IBM Websphere WAS 6.1 XMLA drill through compatibility

open
Andreas Voss
None
5
2010-09-21
2010-09-21
Jarod
No

Hi,

We first reported the problem on Pentaho JIRA, but, since we solved it by patching JPivot CVS source, we were redirected there.
( http://jira.pentaho.com/browse/BISERVER-5025 )

Our environment is the following one:
We use a SQLSERVER (2005) cube published by IIS on localhost with XMLA (the cube data comes from "Adventure Works" data).
I deployed a basic JPivot web application under IBM Websphere WAS 6.1 (6.1.0.29 without webservices feature packs), using jpivot-1.8.0-100420.jar from Mondrian 3.2.0.13661 release as a base.
For testing purpose, cube access is not authenticated; so far everything is working, We can realize cube queries with Jpivot and see the result on screen (charts, PDF and Excel exportation,... are also working).

The bug is the following one:
When we use the "drill through" option and execute it, we got the following error in the "Drill Through Table" component on screen:
An error occured
java.lang.ClassCastException: com.ibm.ws.webservices.engine.xmlsoap.SOAPElement incompatible with javax.xml.soap.Text

We solved the problem by patching JPivot source (we used source from JPivot CVS).
The problem was a class cast at line 1143 in "jpivot\src\java\com\tonbeller\jpivot\xmla\XMLA_SOAP.java" in method "executeDrillQuery".

The original code line was:
javax.xml.soap.Text child = (javax.xml.soap.Text)rowDataIt.next();

We replaced it by:
Node child = (Node)rowDataIt.next();

This way, the code is still compatible with javax.xml.soap.Text objects returned by next(), since javax.xml.soap.Text implements javax.xml.soap.Node interface.
com.ibm.ws.webservices.engine.xmlsoap.SOAPElement also implements javax.xml.soap.Node interface.

According to Java official documentation:
http://download.oracle.com/javaee/1.4/api/javax/xml/soap/SOAPElement.html#getChildElements%28%29
Returns an Iterator over all the immediate child Nodes of this element. This includes javax.xml.soap.Text objects as well as SOAPElement objects.

Since the cast object is only used to call "getParentElement()" on it (on the next line in the method), there is no need for javax.xml.soap.Text, javax.xml.soap.Node is sufficient and compatible with javax.xml.soap.Text and javax.xml.soap.SOAPElement objects.

We attach a diff file for the patch ("XMLA_SOAP.java.diff").

We hope to see this fix committed to CVS.
This would improve greatly JPivot compatibility with IBM WAS 6.1.
With this fix, 100% of JPivot functionality would be available under WAS 6.1.

Regards

Discussion

  • Jarod
    Jarod
    2010-09-21

    patch for jpivot\src\java\com\tonbeller\jpivot\xmla\XMLA_SOAP.java

     
    Attachments
  • Jarod
    Jarod
    2010-09-21

    WAS 6.1 log with stack trace for drill through exception

     
    Attachments
  • Jarod
    Jarod
    2010-09-21

    JSP used to test MSAS cube published by XMLA

     
    Attachments
  • Jarod
    Jarod
    2010-09-21

    web.xml used under WAS 6.1 for testing

     
    Attachments
  • Jarod
    Jarod
    2010-09-21

    screenshot of drill through exception using unpatched JPivot

     
    Attachments
  • Jarod
    Jarod
    2010-09-21

    screenshot of drill through working OK with patched JPivot

     
  • Jarod
    Jarod
    2010-09-21

    patched jpivot\src\java\com\tonbeller\jpivot\xmla\XMLA_SOAP.java

     
    Attachments
  • Jarod
    Jarod
    2010-09-21

    • assigned_to: nobody --> avix