1

I have done one web application using BIRT(Birt runtime 4.2) reports. All the reports accessible properly in local machine as well as through my IP. After creating .war file, I deployed it on my production server(Tomcat8) then BAR chart is not visible it is showing a cross mark(screenshot) instead of the chart, where as if click on export as PDF the report is coming on PDF document. Please help me out.

NOTE: The reports are working properly in application as well as in PDF.

Thanks in Advance..

  • If you look at the browser console (using developer tools), does it show a file not found error while trying to load the bar chart image? – Danilo Tommasina Dec 28 '15 at 09:36
  • It is not showing that type of error but its showing HTTPS security is compromised by "HTTP://ServerIP:8443/testApp/webcontent/birt/images/FirstPage_disabled.gif." I think this not related to this problem. Earlier even report form also not able render by IE ,but I have changed the browser settings i.e., have to enable Display Mixed Content in IE-> Internet Options ->Miscellaneous -> Display Mixed Content. After this change I am able to access the table reports. Only charts and embedded images in the reports are not visible now. – Raja Kanapaka Dec 28 '15 at 10:16
  • the Birt viewer is doing a bit of odd stuff when changing between http and https, look at the URL you posted in your last comment, it shows HTTP protocol on port 8443 (which I assume it is a HTTPS connector) – Danilo Tommasina Dec 28 '15 at 10:20
  • In Apache24\conf\extra\httpd-ssl.conf we have defined ProxyPass and ProxyPassReverse. If we directly deploy the war file in tomcat and start the server without using apache 2.4 all the reports are working properly but we need to access reports with http and 8080 port. If give HTTPS then reports will not be accessible. So please explain me do I need change any configurations in server or in BIRT configuration files? – Raja Kanapaka Dec 28 '15 at 10:32
  • My main problem was written in SO( http://stackoverflow.com/questions/34261744/birt-report-not-working-after-deploying-on-tomacat-server) After changing some configurations in birt conf and browser I got the solution partially. Now I am facing the above problem(CHARTS and embedded Images not rendering by browser) – Raja Kanapaka Dec 28 '15 at 10:37
  • in your SO question you mentioned, that you set baseURL HTTP://...:8443, but port 8443 (usually) serves HTTPS connections not HTTP connections... now I think that if you are using the proxy-pass stuff, you should be able to set baseURL to HTTPS://...8443, not however that this will no longer work locally on tomcat without your apache in front of it – Danilo Tommasina Dec 28 '15 at 10:56
  • a solution my be to remove the 'baseURL' setting, then have tomcat expose only the HTTP connector (e.g. port 8080). Finally you use apache to add proxy passes for both HTTP (port 80) and HTTPs (port 443) to your tomcat only to HTTP port 8080. – Danilo Tommasina Dec 28 '15 at 11:01
  • sorry correction to my suggestion above: try setting 'baseURL' to https://...:443 and apply the suggested proxy passes for both http and https – Danilo Tommasina Dec 28 '15 at 11:08
  • Thank for your reply. I have ProxyPass /myApp http:serverIp:8443/myApp and ProxyPassReverse /myApp http:serverIp:8443/myApp in Apache24\conf\extra\httpd-ssl.conf file. These lines are enough or should I add anything else? – Raja Kanapaka Dec 28 '15 at 11:12

1 Answers1

1

Based on the comments, easiest setup I could imagine in order to avoid issues (including issues with mixed content):

  • Setup tomcat to serve HTTP requests on port 8080 (context /myApp, do not add any HTTPS setup in tomcat)
  • Set BIRT's baseURL to https://apacheServerHost/myApp
  • Add the following to your httpd.conf apache config:

    ProxyPass /myApp http:tomcatServerIp:8080/myApp

    ProxyPassReverse /myApp http:tomcatServerIp:8080/myApp

  • Add the following to your httpd-ssl.conf apache config:

    ProxyPass /myApp http:tomcatServerIp:8080/myApp

    ProxyPassReverse /myApp http:tomcatServerIp:8080/myApp

Why this?

  • The browser knows nothing about the tomcat server, it will only 'see' your apache server
  • When you connect to the BIRT viewer over HTTP using the apacheServer host URL, all images will be loaded by HTTPS (using baseURL path), base page HTTP loading from HTTPS is ok.
  • When you connect to the BIRT viewer over HTTPS using the apacheServer host URL, all images will be loaded by HTTPS (using baseURL path), which is ok
Danilo Tommasina
  • 1,740
  • 11
  • 25
  • Thank you sir for your help. It wasn't solve my problem. Now also I am getting table reports only not chart type reports. – Raja Kanapaka Dec 29 '15 at 09:41
  • uh? sorry, I don't get it, the proposed solution did not work? What errors do you get in the browser console? – Danilo Tommasina Dec 29 '15 at 09:45
  • I have made the changes that you have told. I deployed and restarted my server. It is showing same error as i post in the question.. Thank you – Raja Kanapaka Dec 29 '15 at 09:50
  • What errors do you get in the browser developer's console? You probably have 404 errors. When you open the BIRT viewer in your browser (pointing to the apache server), it will open the 'Viewer JSPs' using http or https. Then the browser will do other http/https calls to the server using the baseURL property which has to point to the apache server not the tomcat server. – Danilo Tommasina Dec 29 '15 at 10:03
  • I am getting the following error for all files of BIRT(Ex: birt css,images) SEC7111: HTTPS security is compromised by HTTP://serverIP:8443/myApp/webcontent/birt/images/NextPage_disabled.gifFile: frameset. in browser developer console. – Raja Kanapaka Dec 29 '15 at 10:38
  • Did you set baseURL to *https*://apacheServerHost/myApp or *https*://apacheServerHost:8443/myApp (in case you are using a non standard https port)? Note that it is *HTTPS* not *HTTP* – Danilo Tommasina Dec 29 '15 at 10:40
  • I have set like _HTTP://apacheServerHost:8443_. If I set baseURL like _HTTP://apacheServerHost:8443/myApp_ even Table reports also not coming. – Raja Kanapaka Dec 29 '15 at 10:49
  • If I give HTTPS its not detecting the report path. – Raja Kanapaka Dec 29 '15 at 11:16
  • well then I guess there is still some wrong setup in apache, or somewhere else... I cannot help you further, sorry. – Danilo Tommasina Dec 29 '15 at 12:50
  • Thank you very much sir for your patience in helping out. – Raja Kanapaka Dec 30 '15 at 05:22