Jump to content
Software FX Community

Help regarding NullPointerException on renderToStream 3-arg variant


silentvortex

Recommended Posts

Hello! I see that my post about this issue is being ignored... Why is this happening? Has the answer to this question been posted before? Please point me in the right direction!

Below is my original post:

 

I have succesfully integrated chartfx with my existing appand managed to include a map in a jsp test page. The renderControl andrenderToStream methods seem to be working fine with my code. When i tryto use the 3 arg version of renderToStream  without any codemodifications other than this  i keep getting NPE:

java.lang.NullPointerException at com.softwarefx.chartfx.server.internal.ej.a(SourceFile:29) at com.softwarefx.chartfx.server.internal.i.cw(SourceFile:168) at com.softwarefx.chartfx.server.internal.i.c(SourceFile:218) at com.softwarefx.chartfx.server.internal.bo.b(SourceFile:126) at com.softwarefx.chartfx.server.internal.fd.rM(SourceFile:561) at com.softwarefx.chartfx.server.internal.gl.c(SourceFile:107) at com.softwarefx.chartfx.server.internal.dp.b(SourceFile:60) at com.softwarefx.chartfx.server.internal.Chart.a(SourceFile:4484) at com.softwarefx.chartfx.server.internal.Chart.a(SourceFile:4684) at com.softwarefx.chartfx.server.internal.Chart.a(SourceFile:4738) at com.softwarefx.chartfx.server.ChartServer.renderToStream(SourceFile:78)

I have tried passing all sorts of OutputStream and Writerimplementations to the renderToStream call but all i get is thisexception. Since code is obfuscated i have no clue what i am doingwrong, so any help would be greatly appreciated. 

Thanks

post-5827-13922409710285_thumb.png

Link to comment
Share on other sites

 The developers have already replied. The chart is trying to export an interactive chart, which is not supported. It will be fixed on the next release, but for now the workaround is very simple. Just add this to your code.

 chart1.getImageSettings().setInteractive(false);

Link to comment
Share on other sites

  Please note that when you export a chart as a stream, you will get the image of the chart, the IMG tag and the IMG MAP. Therefore the only interactivity possible are things that can be embedded in an IMG MAP (tooltips and links). This will not change over the next Service Pack release. What we are taking care of right now is to disable the interactivity for you when exporting the chart, so you will not get the NPE.

Maybe if you explained a little more of what you are trying to do (why are you exporting the chart) we can think of something that would work for you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...