Manuel Hartl created TRINIDAD-2276:
--------------------------------------
Summary: SVG Charts and Java 7
Key: TRINIDAD-2276
URL: https://issues.apache.org/jira/browse/TRINIDAD-2276
Project: MyFaces Trinidad
Issue Type: Bug
Components: Components
Affects Versions: 2.0.1-core
Environment: Windows7 or Linux 2.6, Tomcat7, mojarra2
Reporter: Manuel Hartl
Priority: Critical
Generating of SVG charts with trinidad's component <tr:chart/> does not work,
when the servlet container is executed in a Java7 runtime environment (tested
with 7u4 und 7u5).
It seems that the generated page (so html or javascript) is rendered in such a
way that some SVG java script function does not work any more.
Steffen Spahr also has this problem in his project and he did some research on
it:
---------------------------------------------------------------------------------------------------------
Hi,
today I spent a little time for a deeper analysis of the problem with the
Trinidad Chart component when using Java 7.
So I directly compared the behaviour between the working version (based on
JDK 1.6) and the faulty version (using Java 7) using the
Java-Script-Debugger of FireBug.
My entry point was the "ApacheChart.createSVG" - function in the
ApacheCart1_2_14.js - library.
Following the function calls in the embedded JavaScript:
a) ApacheChart.createSVG
("j_id24","svgChartj_id24","/ProduktFrontController/adf/svg/chart.svg","width:100%;
height:100%;",null);
...
b) var apacheChart = ApacheChart.createChart(type, model, chartId,
isPerspective, legendPosition);apacheChart.setYMajorGridLineCount(3); ;
...
c) apacheChart.draw();
I compared the behavior:
a) ApacheChart.createSVG() could not find a difference
b) ApacheChart.createChart() could not find a difference
c) apacheChart.draw(); different behavior
try
{
var a53=a51.getSVGDocument();
...
}
catch(e)
leads to an NullPointer Exception, because the result of the function call
"a51.getSVGDocument()" is null.
Rem.: This happens only if I am using Java 7 on server-side !!!
I really don't understand why using a different Java version on server-side
leads to this different / faulty behavior on client-side.
Any ideas?
Sincerely
Steffen
---------------------------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira