Sign in to follow this  
pts/3

Ie8 Win Xp Javascript Error

Recommended Posts

A coworker is using Internet Explorer 8 on Windows XP and cannot view any FusionCharts. The Javascript error returned says FusionCharts.js line 76 character 261 has an error. Using Chrome on the same computer can render charts. I am using @version fusioncharts/3.2.2-release.3880

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

Welcome to FusionCharts Forum! smile.gif

 

Please try the same by enabling the Compatibility Mode in IE 8 and see if this helps.

 

Hope this helps.

Share this post


Link to post
Share on other sites
Hi,

Welcome to FusionCharts Forum! smile.gif

 

Please try the same by enabling the Compatibility Mode in IE 8 and see if this helps.

 

Hope this helps.

 

 

Hi Angshu. Thanks for your quick reply. As you suggested, the charts will render with compatibility mode on. That is enough of a fix for now, but out of curiosity, are there plans for adding native support for IE8?

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

There is an issue with the current version of FusionCharts XT in IE 8 Standard Mode.

We are already looking into this and shall update you at the earliest.

Happy FusionCharting! biggrin.gif

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

We will get back to you once there is any news from our end.

 

Thank you very much for your continued patience and patronage.

 

Hope you have a great day!

Share this post


Link to post
Share on other sites

Hi,

 

We will get back to you once there is any news from our end.

 

Thank you very much for your continued patience and patronage.

 

Hope you have a great day!

 

Any update on this issue?

 

thanks!

Share this post


Link to post
Share on other sites
Guest Sumedh

Any update on this issue?

 

thanks!

 

Hi,

 

What chart type is used?

 

Also, can you paste your XML code here? so that we can test?

Share this post


Link to post
Share on other sites

Hi,

 

What chart type is used?

 

Also, can you paste your XML code here? so that we can test?

 

I downloaded the latest version of XT and that seems to have fixed the issue. However with the new version, comes problems with exporting to images/pdf.

 

http://forum.fusioncharts.com/index.php?app=core&module=search&do=user_activity&userMode=content&&mid=28132

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Could you please provide your code for exporting the chart image/PDF to server, to better investigate your issue?

 

Please find one sample code for Exporting chart at server side using JAVA, as an attachment and see if it helps.

 

Awaiting your response!

Edited by Sashibhusan

Share this post


Link to post
Share on other sites

Hi,

 

Could you please provide your code for exporting the chart image/PDF to server, to better investigate your issue?

 

Please find one sample code for Exporting chart at server side using JAVA, as an attachment and see if it helps.

 

Awaiting your response!

 

I can't post everything, but here are some of the relevant parts. The export works fine, there are just server-side exceptions thrown. Thanks

 

web.xml

	<servlet>
	<display-name>FCExporter</display-name>
	<servlet-name>FCExporter</servlet-name>
	<servlet-class>com.fusioncharts.exporter.servlet.FCExporter</servlet-class>

</servlet>
<servlet-mapping>
	<servlet-name>FCExporter</servlet-name>
	<url-pattern>/FCExporter</url-pattern>
</servlet-mapping>

 

fusioncharts_export.properties

SAVEPATH=/assets/images/
HTTP_URI=http://www.yourdomain.com/images/
OVERWRITEFILE=false
INTELLIGENTFILENAMING=true
FILESUFFIXFORMAT=TIMESTAMP

 

chart properties

<chart decimals="1" showValues="0" showBorder="0" showLegend="1" canvasBorderAlpha="0" showPlotBorder="0" plotFillAngle="360" showAlternateVGridColor="0" plotGradientColor="" plotSpacePercent="100" exportEnabled="1" exportAtClient="0" exporthandler="/cp/FCExporter" exportAction="download" yAxisName="kWh" PYAxisName="kWh" showSum="1" canvasbgColor="ffffff" bgColor="ffffff" bgAlpha="100" showDivLineSecondaryValue="0" showSecondaryLimits="0">
...
</chart>

Edited by some_one

Share this post


Link to post
Share on other sites

Here are some additional INFO logs that may help:

 

14-May-2012 11:42:38 AM com.fusioncharts.exporter.servlet.FCExporter init
INFO: FCExporter Servlet Init called
14-May-2012 11:42:38 AM com.fusioncharts.exporter.servlet.FCExporter init
INFO: Is SAVEPATH on server absolute?false
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator getPDFObjects
INFO: Creating PDF specific objects.
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator getPDFObjects
INFO: Gathering data for  each page
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator getBitmapData24
INFO: Parsing image data
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator getBitmapData24
INFO: Image data parsed successfully
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator compress
INFO: Compressing the image data
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator compress
INFO: Image data compressed
14-May-2012 11:42:38 AM com.fusioncharts.exporter.generators.PDFGenerator getPDFObjects
INFO: PDF data created successfully
14-May-2012 11:42:38 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet FCExporter threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:610)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at com.fusioncharts.exporter.resources.FCExporter_PDF.exportOutput(FCExporter_PDF.java:184)
at com.fusioncharts.exporter.servlet.FCExporter.doPost(FCExporter.java:192)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:883)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:722)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2214)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Share this post


Link to post
Share on other sites

Hi,

 

Could you please provide your code for exporting the chart image/PDF to server, to better investigate your issue?

 

Please find one sample code for Exporting chart at server side using JAVA, as an attachment and see if it helps.

 

Awaiting your response!

I think I found the issue. You can't call getOutputStream and getWriter in the same response body. In your source (FCExporter_PDF.java and probably the other export classes), OutputStream is used to write the binary data, then the PrintWriter tries to write character data (status codes). This will throw an exception.

 

This code only executes for downloads, not writing the file to the server disk. I'm surprised this was not caught earlier.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Did you try using the sample demo project posted earlier by Sashibhusan?

 

The attached sample code does not out put any exceptions.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi,

 

Did you try using the sample demo project posted earlier by Sashibhusan?

 

The attached sample code does not out put any exceptions.

 

Hope this helps!

 

I am using those jars (java) from your attached file. They still produce errors that I have posted earlier. This happens ONLY for PDF streaming (download option) because exceptions are thrown from calling

response.getOutputStream()

then a few lines down you call

response.getWriter()

 

Thanks

Edited by some_one

Share this post


Link to post
Share on other sites

I am using those jars (java) from your attached file. I created a fresh project using sample data.xml from your website. They still produce the same errors that I have posted earlier... I assure you. This happens for PDF streaming (download option) because exceptions are thrown from calling

response.getOutputStream()

then a few lines down you call

response.getWriter()

 

Thanks

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

I tried to export the image by clicking on 'Export to PDF' button and after the capture phase, the file was downloaded with out any exceptions.

 

I am afraid, I am unable to replicate the issue using the above demo project.

 

Can you please share your project with us or the Live URL so that we will be able to test it.

Share this post


Link to post
Share on other sites

Hi,

 

I tried to export the image by clicking on 'Export to PDF' button and after the capture phase, the file was downloaded with out any exceptions.

 

I am afraid, I am unable to replicate the issue using the above demo project.

 

Can you please share your project with us or the Live URL so that we will be able to test it.

 

Attached is a sample project using code from your website and the jars you sent me. There is also a .png of the error in the attached file.

web.zip

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Can you please try using the standard approach to render the chart within a JSP?

 

Please try and use <fc> tag to render the chart.

 

I tried using your Data.xml and your JSP to replicate the bug but with no luck.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi,

 

Can you please try using the standard approach to render the chart within a JSP?

 

Please try and use <fc> tag to render the chart.

 

I tried using your Data.xml and your JSP to replicate the bug but with no luck.

 

Hope this helps!

We don't use JSP's in our project. We use a third party java framework. Regardless, the error still occurs if I use a simple JSP's project or not. Perhaps you do not see the error because logMessageSetVO is not empty (line 178 of FCExporter_PDF). Put a breakpoint at this section and you will see that there are issues here. I don't see why the issue of calling getWriter and getOutputStream is not addressed. FCExporter_PDF does exactly this and you cannot do this in Java. I can find you several references if you like.

Share this post


Link to post
Share on other sites

We don't use JSP's in our project. We use a third party java framework. Regardless, the error still occurs if I use a simple JSP's project or not. Perhaps you do not see the error because logMessageSetVO is not empty (line 178 of FCExporter_PDF). Put a breakpoint at this section and you will see that there are issues here. I don't see why the issue of calling getWriter and getOutputStream is not addressed. FCExporter_PDF does exactly this and you cannot do this in Java. I can find you several references if you like.

 

Any status update on this? If you are testing with standard Tomcat setup, the logs get generated to the localhost*.log file. I had a co-worker try and reproduce the error and they didn't notice the error at first because the exception got written to tomcat/logs/localhost*.log file, not to the standard out console. Please inspect all your logs.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

I am afraid, I still cant replicate the issue. I checked everywhere but no error has been logged.

 

Hope this helps!

Share this post


Link to post
Share on other sites

This is from your source code (FC_Exporter_PDF.java). If this code is not current, please let me know. I can't explain why you don't get the exception but I can point out why I am getting the error. In the below code, the OutputStream is retrieved to write the PDF binary data to response. Then a few lines below that, PrintWriter is retrieved to write character data to the response. You can't write both binary and character data to the response, its one or the other. This is why I am getting error and I believe this should be the focus of our discussion, not reproducing the error. Please investigate this.

 

			
.....
.....
OutputStream os;
try {
	os = response.getOutputStream();

	for (int i = 0; i < pdfBytes.length; i++)
		os.write(pdfBytes[i]);
	os.flush();
	// os.close();
} catch (IOException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}

}
if (logMessageSetVO.getErrorsSet() == null
	|| logMessageSetVO.getErrorsSet().isEmpty()) {
meta_values = exportBean.getMetadataAsQueryString(null, true,
		isHTML);
PrintWriter out;
try {
	out = response.getWriter();
	out.print(meta_values + noticeMessage + "&statusCode="
			+ Status.SUCCESS.getCode() + "&statusMessage="
			+ Status.SUCCESS);
} catch (IOException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}
}

Share this post


Link to post
Share on other sites

A coworker is using Internet Explorer 8 on Windows XP and cannot view any FusionCharts. The Javascript error returned says FusionCharts.js line 76 character 261 has an error. Using Chrome on the same computer can render charts. I am using @version fusioncharts/3.2.2-release.3880

 

I am having the same problem on Windows XP and IE8. Some other post indicates we must put compatibility mode on, but if we do, our system, which requires IE8, registers as IE7, and the entire system does not work.

 

I also found elsewhere in this forum posting (http://forum.fusionc...__fromsearch__1) that the latest version solves that problem, but if you do that, the graphs don't export properly, which brings me to the other unsolved problem I have, which I reported here: http://forum.fusionc...__fromsearch__1, which is still not solved :-(

 

So, in short, based on the posts mentioned above, if I DO NOT upgrade, graphs do not show on IE8. If I DO upgrade, the export does not work.

 

Anyone has an idea how to overcome BOTH problems? I can not choose which one I want to solve, as both export and display is needed - our system can not work without both showing and exporting the graphs.

 

Thanks in advance,

 

Kobus

Share this post


Link to post
Share on other sites

I am having the same problem on Windows XP and IE8. Some other post indicates we must put compatibility mode on, but if we do, our system, which requires IE8, registers as IE7, and the entire system does not work.

 

I also found elsewhere in this forum posting (http://forum.fusionc...__fromsearch__1) that the latest version solves that problem, but if you do that, the graphs don't export properly, which brings me to the other unsolved problem I have, which I reported here: http://forum.fusionc...__fromsearch__1, which is still not solved :-(

 

So, in short, based on the posts mentioned above, if I DO NOT upgrade, graphs do not show on IE8. If I DO upgrade, the export does not work.

 

Anyone has an idea how to overcome BOTH problems? I can not choose which one I want to solve, as both export and display is needed - our system can not work without both showing and exporting the graphs.

 

Thanks in advance,

 

Kobus

 

Oh, just to be thorough, we have purchased two licenses of FusionCharts XT (@version fusioncharts/3.2.2-release.3880) at the moment. I can provide my license codes in the event that they will be needed to upgrade or resolve the issues. Thanks!

Share this post


Link to post
Share on other sites

Anyone has an idea how to overcome BOTH problems?

Kobus

 

I have an idea. Get them to fix the export issue :) Not sure why we are ignored. As a side note, the export of the chart will work (the file is generated), but there are (seemingly harmless) exceptions thrown in the process.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Apologies for the delay in response.

 

With the same lines of code, we are unable to see any exceptions.

 

Can you please share the entire project with all the JavaScript and SWF files that you are currently using?

 

Also, please let us know the environment on which you are able to replicate the issue.

 

Awaiting your response.

Share this post


Link to post
Share on other sites

Hi,

 

Apologies for the delay in response.

 

With the same lines of code, we are unable to see any exceptions.

 

Can you please share the entire project with all the JavaScript and SWF files that you are currently using?

 

Also, please let us know the environment on which you are able to replicate the issue.

 

Awaiting your response.

 

I threw this together in 5 minutes using my version of FC and the jar's you gave me. I'm using NetBeans 7 as my IDE, with tomcat 7, although I can reproduce the error with tomcat 6. If you leave the default setup for logs then there are several logs generated from tomcat, so please ensure you inspect all of them.

web.zip

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

I am unable to import the project into my IDE.

 

Can you please send your project in such a way that am able to import the same.

 

Awaiting your response.

Share this post


Link to post
Share on other sites

Hi,

 

I am unable to import the project into my IDE.

 

Can you please send your project in such a way that am able to import the same.

 

Awaiting your response.

 

I can't upload anymore. Your forum has a max of 10mb per thread. Its really not that hard to create a project from my upload either.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this