Jump to content
Software FX Community

Null pointer exception


Loganathan
 Share

Recommended Posts

I am new to ChartFX . As suggested in the document I moved chartfx70 folder to root (webapps/ChartApp/ chartFx70). I copied the necessary jar files to the lib folder . I also moved LIC files to the lib folder . I get the following error on rendering the chart.renderControl(). Any help is appreciated

 

java.lang.NullPointerException	at com.softwarefx.sfxnet.internal.sn.be(SourceFile:20)	at com.softwarefx.chartfx.server.internal.Internal.OutputFileHandler.d(SourceFile:126)	at com.softwarefx.chartfx.server.internal.Internal.OutputFileHandler.a(SourceFile:185)	at com.softwarefx.chartfx.server.internal.Chart.f_(SourceFile:4547)	at com.softwarefx.chartfx.server.internal.Chart.m(SourceFile:4273)	at com.softwarefx.sfxnet.internal.my.e(SourceFile:117)	at com.softwarefx.chartfx.server.internal.Chart.nQ(SourceFile:4733)	at com.softwarefx.chartfx.server.ChartServer.renderControl(SourceFile:72)	at localhost_InsightCharting_0_1_WEB_INF_grails_app_views_sampleChart_sampleChart_gsp.run(localhost_InsightCharting_0_1_WEB_INF_grails_app_views_sampleChart_sampleChart_gsp:21)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

 

Link to comment
Share on other sites

Hi,

I attached an image of my netbeans project, please check that you have a similar structure of your  file directories. You cna compare this aloso with the Samples project that is in your installation directory.

As a test, you can try to mount the samples project, or copy the directories you need to your solution. Please copy CfxGauges10, the WebINF, and the Chartfx70 file folder.

Then, you might want to post some code that reproduces the issue so I can help you better.

 

Link to comment
Share on other sites

 Hi ,

Thanks for your reply .

I am trying to integrate ChartFx With Grails . When I deploy the chartFX  samples  in tomcat I do get a chart with out any problem ,but when I try running the same sample in my grails application , I get the above mentioned error . I am able to export a chart using chart1.exportChart(FileFormat.JPEG,exportPath) in my grails application. Creating a simple chart using renderControl is not possible .

<%@page import="com.softwarefx.chartfx.server.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
  <%
  ChartServer chart1 = new ChartServer(pageContext,request,response);
  chart1.setWidth(600);
  chart1.setHeight(400);
  chart1.renderControl();
  %>    

This set of code  is not working . When I comment renderControl(), I dont get any error in the application. I have attached my tomcat folder structure .

 

Thanks 

Loganathan

  file:///C:/DOCUME%7E1/sn1272/LOCALS%7E1/Temp/moz-screenshot.jpg
 

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.

 Share

×
×
  • Create New...