Sundhar

Pure Html Js Chart Fails In Server Side Export..

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 could be the problem., here??

tets.svg.txt

Share this post


Link to post
Share on other sites

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 could be the problem., here??

 

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

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Please note:

During export of the pure JavaScript charts, the chart data is sent to external servers for processing and converting to image.

 

You must have an active internet connection for this feature to work.

 

In case you want to process the exported data on your own server, you may setup the chart to send the data to your own server.

 

For more details on 'Setup your own server to process and export JavaScript charts', please refer to the link below,

http://docs.fusioncharts.com/charts/contents/exporting-image/ECPureJS.html#ownserver

 

Said this, have you followed the steps mentioned in the above link to set up you own server?

 

If yes, you shouldn't get the any error message.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi Bindhu,

 

Yes, I followed the docs that was mentioned in the URL that u gave.., but that was specific to a local server that has PHP setup.

 

But, I am using a J2EE server., so I cannot apply the same steps that was mentioned., Do u have any other docs specific to exporting Pure JS chart to image via J2EE server.

 

 

As, Victor said I doubt if FCExporter servlet supports Pure JS charts exporting to image/pdf? Can you pls confirm the same?

 

Regards

Sundhar

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi Sundhar,

 

Please take note of the few limitations, when using the pure JavaScript(HTML5) Export method, listed below:

  • Pure Client-side export is currently not supported
  • Export component currently does not have an equivalent JavaScript fallback
  • Server-side export feature requires a separate setup and implementation

When rendered using JavaScript (HTML5), there is only one mode of export - at Server-side.

 

 

By default, JavaScript (HTML5) charts use Highcharts server to get exported image. However you can place the PHP and JAR files on your servers and then over-ride the URL.And this is only for PHP.

 

We do not have any implementation for a J2EE server, as of now.

 

Hope this clarifies.

Edited by Bindhu

Share this post


Link to post
Share on other sites

Hi Bindu,

 

Thanks for clarification., I understood the limitation.,

 

Do u have any official page that has these limitations mentioned?

 

Regards

Sundhar

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