deeptic

Error while creating a DrillDown chart

Recommended Posts

Hi,

 

 

 

I am creating the following drill down chart using my own tables:

 

 

 

 

 

 

 

 

However, I get this error in Tomcat:

 

 

 

 

 

exception

 

 

 

org.apache.jasper.JasperException: Unable to compile class for JSP:

 

 

 

An error occurred at line: 6 in the generated java file

 

Only a type can be imported. com.fusioncharts.FusionChartsHelper resolves to a package

 

 

 

An error occurred at line: 89 in the jsp file: /DBExample/Default_New.jsp

 

FusionChartsHelper cannot be resolved

 

86: totalOutput=rs2.getString("TotOutput");

 

87: }

 

88: // Encoding the URL since it has a parameter

 

89: strDataURL = FusionChartsHelper.encodeDataURL("Detailed_New.jsp?Emp_Month="+factoryId,"false",response);

 

90: //Generate

 

91: strXML += "";

 

92:

 

 

 

 

 

Stacktrace:

 

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)

 

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)

 

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)

 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)

 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)

 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)

 

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)

 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)

 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)

 

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)

 

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

 

 

 

 

Is there something that I have missed. Please guide.

 

 

 

Also is there a location for FusionCharts Helper in the downloaded package. I am unable to find it. Am I supposed to make any changes in the same?

Share this post


Link to post
Share on other sites

Hi,

 

 

 

I have been able to resolve the error. I had to make a change in this part of the code:

 

 

 

strDataURL = FusionChartsHelper.encodeDataURL("Detailed_New.jsp?Emp_Month="+factoryId,"false",response);

 

 

 

I changed it to

 

 

 

strDataURL = encodeDataURL("Detailed_New.jsp?Emp_Month="+factoryId,"false",response);

 

 

 

i.e., I removed the 'FusionChartsHelper'

 

 

 

But, I would like to understand one thing. If the example given in the package works by including 'FusionChartsHelper' in the code, why doesn't it work on my table - I mean I had to exclude 'FusionChartsHelper' to compile the code without any errors

Share this post


Link to post
Share on other sites

Hi Deepti

The code in the samples has this line of import.

<%@ page import ="com.fusioncharts.FusionChartsHelper"%>

and the corresponding classes are present in WEB-INF/classes folder of the web application.

Please verify that you have the import statement and the necessary class in your web application.

Hope this helps!:)

Srividya

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