US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: encoding problem in MDX query

  1. #1
    Join Date
    Nov 2006
    Posts
    4

    Default encoding problem in MDX query

    Hi all,

    I have a problem regarding some characters in an MDX query because the default encoding used in the pentaho BI platform is UTF-8.

    So running the following MDX query failed:
    <query><![CDATA[select NON EMPTY {[Measures].[Nombre de PS]} ON columns, NON EMPTY {([libellé_discipline].[toutes les disciplines], [région_département].[toutes les régions], [Statut].[Tous les Statuts])} ON rows from [PS] ]]></query>

    the corresponding log:

    com.tonbeller.jpivot.olap.model.OlapException: Mondrian Error:MDX object '[libell?_discipline].[toutes les disciplines]' not found in cube 'PS'
    at com.tonbeller.jpivot.mondrian.MondrianModel.initialize(MondrianModel.java:394)
    at com.tonbeller.jpivot.olap.model.OlapModelDecorator.initialize(OlapModelDecorator.java:129)
    at com.tonbeller.jpivot.tags.OlapModelProxy$MyState.initialize(OlapModelProxy.java:76)
    at com.tonbeller.jpivot.tags.PageStateManager.initializeAndShow(PageStateManager.java:37)
    at com.tonbeller.jpivot.tags.OlapModelProxy.initializeAndShow(OlapModelProxy.java:161)
    at com.tonbeller.jpivot.tags.OlapModelTag.doEndTag(OlapModelTag.java:76)
    at org.apache.jsp.jsp.Pivot_jsp._jspService(org.apache.jsp.jsp.Pivot_jsp:306)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


    is there any configuration for the encoding?

    Any help would be appreciated...

  2. #2
    Join Date
    Nov 2006
    Posts
    4

    Default Re:encoding problem in MDX query

    Well I solved the problem in this way:
    I changed the encoding type in the xml files from 'UTF-8' to 'ISO-8859-1' in the j2ee deployment module.

    Then I changed the constant:
    private static String ENCODING = "UTF-8";
    to
    private static String ENCODING = "ISO-8859-1";
    in the class LocaleHelper.java in the source code.

    Now it is working...

  3. #3
    Join Date
    Nov 1999
    Posts
    469

    Default Re:encoding problem in MDX query

    I'm glad you solved your problem.

    We have a way to do this that does not invovle changing the source code.

    If you look in web.xml (pentaho-demo/jboss/server/default/deploy/pentaho.war/WEB-INF/web.xml) you will see a section near the top of the file that is commented out.

    Code:
        <!-- this defaults to UTF-8, uncomment this section and change the value for other encodings
    	<context-param> 
    		<param-name>encoding</param-name>
    		<param-value>windows-1256</param-value> 
    	</context-param>
        -->
    If you uncomment this code and specify the encoding that you want it will be picked up automatically.

    e.g.

    Code:
        <!-- this defaults to UTF-8, uncomment this section and change the value for other encodings -->
    	<context-param> 
    		<param-name>encoding</param-name>
    		<param-value>ISO-8859-1</param-value> 
    	</context-param>
    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •