Sundhar

Html5 Js Chart Server Side Jpg Export Fails

Recommended Posts

Hi,

 

I was trying to create image out of our JS HTML5 chart. I have copied all the fc*.jar into my local setup and pass all necessary arguments. I was able to get everything but when I click download as JPG I get an ArrayIndexOutOfBoundsException: 1, I have also attached the svg contents that was used to export. rename the attachment from .svg.txt to .svg

 

error in the UI

width=0

height=0

DOMId=chartobject-10

statusMessage= Unable to encode buffered image.

statusCode=0

 

But, when I change the export url to the default http://exports.highcharts.com -> I get the created image perfectly., by just changing the url pointing to my local setup it says something wrong with the image converter

 

 

below is the exception i get in the console

 

Aug 16, 2012 5:09:57 PM com.fusioncharts.exporter.servlet.FCExporter doPost

INFO: actionsave

Aug 16, 2012 5:10:09 PM com.fusioncharts.exporter.generators.ImageGenerator getChartImage

INFO: Creating the Chart image

Aug 16, 2012 5:10:59 PM com.fusioncharts.exporter.generators.ImageGenerator getChartImage

INFO: Creating the Chart image

java.lang.ArrayIndexOutOfBoundsException: 1

at com.fusioncharts.exporter.generators.ImageGenerator.getChartImage(ImageGenerator.java:97)

at com.fusioncharts.exporter.resources.FCExporter_IMG.exportProcessor(FCExporter_IMG.java:283)

at com.fusioncharts.exporter.servlet.FCExporter.doPost(FCExporter.java:216)

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 com.manthan.multiconnection.RoleConnection.doFilter(RoleConnection.java:55)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

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.core.StandardHostValve.invoke(StandardHostValve.java:127)

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:298)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Thread.java:662)

Aug 16, 2012 5:11:00 PM com.fusioncharts.exporter.generators.ImageGenerator getChartImage

SEVERE: Image data is not in proper format:java.lang.ArrayIndexOutOfBoundsException: 1

 

suggest what is the problem., here??

tets.svg.txt

Share this post


Link to post
Share on other sites

I don't know if the FCExporter servlet is ready to export javascript charts.

I just use it with flash charts. When u change the url to http://exports.highcharts.com it works because there is a php server that create the image from the svg.

If you can get the svg string, why don't u create a solution to create the image on server?

I started, but i couldn't finish it yet..

Victor

Edited by victor.pereira

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