mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 99 forks source link

Unable to process XMLA request with cyryllics #113

Closed ghost closed 10 years ago

ghost commented 10 years ago

I'm unable to process MDX request which contains cyryllics via XML/A.

I have mondrian deployed at Jetty 8. Mondrian is configured to wait for the incoming requests on localhost:8080/olap/xmla.

Also I have pivot4j-analytics deployed on Tomcat 7. I have configured pivot4j-analytics to be able to connect to this xmla (by editing pivot4j-config.xml).

And also, I have a very simple pivot table that has one measure (Sum with tax) on columns and one dimension (Creator user) on rows. My goal is to make this pivot table work by obtaining data from Mondrian via XMLA.

At start point I have only one row in pivot table - All users (it is collapsed). Then I try to open "all users" hierarchy (extract operation, i think), which contains some usernames in cyrillic. After that pivot4j hangs (and the only option to get it back to life is to refresh the page).

Mondrian console output displays that it was requested to process MDX with cyrillics:

Caused by: mondrian.olap.MondrianException: Mondrian Error:Failed to parse query '

SELECT {[Measures].[Sum with tax]} ON COLUMNS, {[Creator user].[Admin], [Creator user].[sgordeev], [Creator user].[?????? ???? ??????????], [Creator user].[??????????? ????????? ????????????], 

Rest of the output omitted. This question chars are the names in cyrillics.

I'm not sure if it is Mondrian bug or pivot4j's. However, I managed to open "all users" dimention in jpivot.

mysticfall commented 10 years ago

@kiteRk Where is the JPivot application deployed, on Jetty or on Tomcat? And could you tell me what is the system locale of the server where this happens?

ghost commented 10 years ago

JPivot is deployed on Jetty. After your message I deployed both Mondrian and pivot4j on the same server - Tomcat 7.0. However, result remains the same - pivot4j hangs.

For Tomcat server locale is 'ru' (Russian). The same locale is used by Jetty. Should I change the locale?

mysticfall commented 10 years ago

@kiteRk No, I just wanted to know the locale so I could reproduce the issue on my system :)

Currently, I don't have XMLA server ready at my work. But I think I could try it at home on this weekend.

mysticfall commented 10 years ago

@kiteRk I tried to reproduce the problem with Mondrian 3.3.0 and found that the bundled MondrianXmlaServlet does not specify the character encoding option by default. With this setup, I see all the UTF-8 characters displayed as '?' on the client side.

After I specify the encoding option as below, the problem disappeared :

(In web.xml)

  <servlet>
    <servlet-name>MondrianXmlaServlet</servlet-name>
    <servlet-class>mondrian.xmla.impl.MondrianXmlaServlet</servlet-class>
    <init-param>
      <param-name>CharacterEncoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </servlet>

Could you confirm that you have configured Mondrian to send its SOAP messages in the correct encoding?

ghost commented 10 years ago

Hi, Xavier.

Unfortunatelly, I could not answer immediately because I'll be out of the city for the weekend. I'll check it on Monday morning.

2013/10/18 Xavier Cho notifications@github.com

@kiteRk https://github.com/kiteRk I tried to reproduce the problem with Mondrian 3.3.0 and found that the bundled MondrianXmlaServlet does not specify a character encoding option by default. In this setup, I see all the UTF-8 characters displayed as '?' on the client side.

After I specify the encoding option as below, the problem disappeared :

(In web.xml)

MondrianXmlaServlet mondrian.xmla.impl.MondrianXmlaServlet CharacterEncoding UTF-8

Could you confirm that you have configured the Mondrian to send its SOAP messages in the correct encoding?

— Reply to this email directly or view it on GitHubhttps://github.com/mysticfall/pivot4j/issues/113#issuecomment-26617029 .

Stanislav Ivanov

stasdat@gmail.com tel. +7911-934-54-52 skype: ivStas

ghost commented 10 years ago

Hi! Thanks for the solution! With CharacterEncoding configured to UTF-8 everything works fine!