Menu
Download Free Trial

Stream error occurred while loading ‘http://localhost:8080/pentaho/Xmla’

Hi! I’m trying to connect to Pentaho Mondrian, and I get the error “Stream error occurred while loading http://localhost:8080/pentaho/Xmla. I am sure that this URL is correct because it works fine for Excel.
I have found the answer for Microsoft Analysis Services, but I need the same guide for Pentaho Mondrian.
P.S. I enabled CORS on Tomcat Server as it described here: http://tomcat.apache.org/tomcat-8.0-doc/config/filter.html#CORS_Filter, but the error still occures. In which file of Tomcat should be these filters? What am I doing wrong?
Thanks.

7 answers

Public
Ian Sadovy Flexmonster April 13, 2016

Hello Alexey,
 
Thank you for the question.
You are right, the issue is connected to CORS.
Please try to add CorsFilter to <tomcat_dir>/conf/web.xml and then restart Tomcat Server. 

<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

Please let me know if it works for you.
 
Regards,
Ian

Public
Alexey A. April 13, 2016

Hello, Ian! This filter is already present in this file, but the error still occures. Another browser (Google Chrome) gives another text of the error: 
“Unable to open file report.xml?405709259.

It seems that this file doesn’t exist or ‘Access-Control-Allow-Origin’ header is absent in the resource requested.”
What else can be wrong?
 
 

Public
Ian Sadovy Flexmonster April 13, 2016

To avoid browser security restrictions for JavaScript please place all component files to the web server (i.e. http://localhost).
Regarding the first issue, are there any errors in the Developers Console?

Public
Alexey A. April 13, 2016

All component files are located on the webserver. In the developers console I see that the request is sent: method – OPTIONS, and status code – 302, and the error: 
jquery.min.js:4 XMLHttpRequest cannot load file:///C:/flexmonster/component/report-mondrian.xml?405709498. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource

Public
Ian Sadovy Flexmonster April 13, 2016

It is not allowed to load files from hte local file system in Chrome (i.e. file:///C:/).
Please try to place “report-mondrian.xml” to the webserver as well and refer to it as “http://localhost/report-mondrian.xml”.
Hope it helps.

Public
Alexey A. April 13, 2016

The issue was that i had to specify in the report.xml file the login and password, i.e.:
http://localhost:8080/pentaho/Xmla?userid=user&password=password
 

Public
Ian Sadovy Flexmonster April 13, 2016

Good! Glad to hear that the issue is resolved.

This question is now closed