Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
chart not showing
maher88
Hello,
I integrated BIRT report in my xhtml pages with JBOSS 7.1 and it works fine exept for charts witch ara not showing up, only the date from report file. I have no exception.
Find more posts tagged with
Comments
mwilliams
Are you using the viewer or the APIs to run your reports?
maher88
Hi,
I'm using the API's.
I followed this blog :
http://www.birt-exchange.org/org/forum/index.php/blog/45/entry-442-using-jsf-2-0-with-birt/&#comment2057
mwilliams
Ah. Let me follow Kris's blog and see if I run into the same issues. I have JBOSS 5.1. I'll try it first. If it works for me, I'll download 7 to see if I have problems there. I'll let you know.
CBR
I had the same problem using JBoss 7.1. The charting framework is using Xerces. JBoss 7 already brings Xerces in a different version. Can you try to remove the xerces jar from the web-inf lib of your application before deploying to JBoss as a war file.
mwilliams
I'm having the same problem using Tomcat 6, as well, so I'm not sure. I'll keep digging.
mwilliams
Forgot to mention that it worked fine when I ran it on Tomcat from Eclipse, but failed when I exported the war file to Tomcat.
maher88
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="113786" data-time="1359662990" data-date="31 January 2013 - 01:09 PM"><p>
I had the same problem using JBoss 7.1. The charting framework is using Xerces. JBoss 7 already brings Xerces in a different version. Can you try to remove the xerces jar from the web-inf lib of your application before deploying to JBoss as a war file.<br /></p></blockquote>
If I remove the xerces jar I obtain a nullpointerexception when invoking ther report from the xhtml page
mwilliams
In his example, I got it to show by changing the PDFRenderOption code to:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
// set render options including output type
HTMLRenderOption options = new HTMLRenderOption();
ByteArrayOutputStream outs = new ByteArrayOutputStream();
options.setOutputStream(outs);
options.setImageHandler(new HTMLServerImageHandler());
options.setBaseImageURL("images");
options.setImageDirectory("E:/apache-tomcat-6.0.36/webapps/JSF_2/images");
options.setEmbeddable(true);
options.setOutputFormat("html");
task.setRenderOption(options);
</pre>
<br />
Let me know if this solves it for you.
maher88
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="113827" data-time="1359737471" data-date="01 February 2013 - 09:51 AM"><p>
In his example, I got it to show by changing the PDFRenderOption code to:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
// set render options including output type
options.setBaseImageURL("images");
options.setImageDirectory("E:/apache-tomcat-6.0.36/webapps/JSF_2/images");
</pre>
<br />
Let me know if this solves it for you.<br /></p></blockquote>
could you tell me more about these two parameters because I'm using JBOSS 7.1. what do you have in this folder?
mwilliams
That's where your charts will go (report engine will put them there), so that the app can find them for the display. The "images" one is the relative location of the folder holding the chart, to the app. If you look at the page source, this should be the src for the img. images/tempImageName.png
maher88
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="113835" data-time="1359750333" data-date="01 February 2013 - 01:25 PM"><p>
That's where your charts will go (report engine will put them there), so that the app can find them for the display. The "images" one is the relative location of the folder holding the chart, to the app. If you look at the page source, this should be the src for the img. images/tempImageName.png<br /></p></blockquote>
It doesn't work anymore. I created the where the charts will go in my jboss/appclient. I tried a lot of things but nothing works. With eclipse's local web browser and firefox the chart simply isn't showing up and with chrome I got a HTTP 404 caused by infound ../custom***.svg
Elkaras
<blockquote class='ipsBlockquote' data-author="'maher88'" data-cid="113874" data-time="1359966892" data-date="04 February 2013 - 01:34 AM"><p>
It doesn't work anymore. I created the where the charts will go in my jboss/appclient. I tried a lot of things but nothing works. With eclipse's local web browser and firefox the chart simply isn't showing up and with chrome I got a HTTP 404 caused by infound ../custom***.svg<br /></p></blockquote>
<br />
how about trying to change output format of chart ... svg to png or jpg ..<br />
<br />
I hope... it's gonna help you ..
maher88
<blockquote class='ipsBlockquote' data-author="'Elkaras'" data-cid="113875" data-time="1359968766" data-date="04 February 2013 - 02:06 AM"><p>
how about trying to change output format of chart ... svg to png or jpg ..<br />
<br />
I hope... it's gonna help you ..<br /></p></blockquote>
I think the problmem comes from my 'options.setBaseImageURL' and 'options.setImageDirectory'
mwilliams
Let me download JBoss7.1 and try it on there. I'll let you know what I see.
mwilliams
It works for me, in JBoss 7.1.1 in Chrome and Firefox. Here are my settings:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
options.setBaseImageURL("images");
options.setImageDirectory("E:/JBoss/jboss-as-7.1.1.Final/standalone/deployments/JSF_JBoss.war/images");
</pre>
maher88
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="113908" data-time="1360014881" data-date="04 February 2013 - 02:54 PM"><p>
It works for me, in JBoss 7.1.1 in Chrome and Firefox. Here are my settings:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
options.setBaseImageURL("images");
options.setImageDirectory("E:/JBoss/jboss-as-7.1.1.Final/standalone/deployments/JSF_JBoss.war/images");
</pre></p></blockquote>
Thanks a lot mwilliams it worked
mwilliams
Awesome! Glad to help! Let us know whenever you have questions!