|
org.apache.jasper.JasperException: Unable to compile class for JSP: -
12-31-2008, 12:37 AM
hi,
I a trying to run jsp s under Eclipse running tomcat and I get the
following exception.
It seems I am unable to compile my jsp under my eclipse settings. These
jsps compile if I run Tomcat out of EClipse
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 8 in the generated java file
Only a type can be imported. org.jfree.chart.JFreeChart resolves to a package
An error occurred at line: 9 in the generated java file
Only a type can be imported. org.jfree.chart.ChartUtilities resolves to a package
An error occurred at line: 10 in the generated java file
Only a type can be imported. org.jfree.chart.ChartFactory resolves to a package
An error occurred at line: 11 in the generated java file
Only a type can be imported. org.jfree.data.category.CategoryDataset resolves to a package
An error occurred at line: 12 in the generated java file
Only a type can be imported. org.jfree.chart.plot.CategoryPlot resolves to a package
An error occurred at line: 13 in the generated java file
Only a type can be imported. org.jfree.chart.renderer.category.CategoryItemRend erer resolves to a package
An error occurred at line: 14 in the generated java file
Only a type can be imported. org.jfree.chart.plot.PlotOrientation resolves to a package
An error occurred at line: 15 in the generated java file
Only a type can be imported. org.jfree.chart.renderer.category.BarRenderer resolves to a package
An error occurred at line: 16 in the generated java file
Only a type can be imported. org.jfree.data.category.DefaultCategoryDataset resolves to a package
An error occurred at line: 38 in the jsp file: /getChart.jsp
DefaultCategoryDataset cannot be resolved to a type
35: category[6]="Non Production";
36:
37: //Create Dataset...
38: DefaultCategoryDataset datasets1= new DefaultCategoryDataset();
39:
40: datasets1.addValue(40.2, series1, category[0]);
41: datasets1.addValue(32.3, series1, category[1]);
An error occurred at line: 38 in the jsp file: /getChart.jsp
DefaultCategoryDataset cannot be resolved to a type
35: category[6]="Non Production";
36:
37: //Create Dataset...
38: DefaultCategoryDataset datasets1= new DefaultCategoryDataset();
39:
40: datasets1.addValue(40.2, series1, category[0]);
41: datasets1.addValue(32.3, series1, category[1]);
An error occurred at line: 56 in the jsp file: /getChart.jsp
JFreeChart cannot be resolved to a type
53: datasets1.addValue(15.8, series2, category[5]);
54: datasets1.addValue(42.2, series2, category[6]);
55:
56: final JFreeChart chart = ChartFactory.createBarChart(
57: "chart title",
58: "x axis label",
59: "y axis label ",
An error occurred at line: 56 in the jsp file: /getChart.jsp
ChartFactory cannot be resolved
53: datasets1.addValue(15.8, series2, category[5]);
54: datasets1.addValue(42.2, series2, category[6]);
55:
56: final JFreeChart chart = ChartFactory.createBarChart(
57: "chart title",
58: "x axis label",
59: "y axis label ",
An error occurred at line: 61 in the jsp file: /getChart.jsp
PlotOrientation.VERTICAL cannot be resolved to a type
58: "x axis label",
59: "y axis label ",
60: datasets1,
61: PlotOrientation.VERTICAL,
62: false,
63: true,
64: false
An error occurred at line: 68 in the jsp file: /getChart.jsp
CategoryPlot cannot be resolved to a type
65: );
66: chart.setBackgroundPaint(Color.lightGray);
67: //get a reference to the plot for further customisation...
68: final CategoryPlot plot = chart.getCategoryPlot();
69: CategoryItemRenderer renderer = new BarRenderer();
70: plot.setRenderer(renderer);
71:
An error occurred at line: 69 in the jsp file: /getChart.jsp
CategoryItemRenderer cannot be resolved to a type
66: chart.setBackgroundPaint(Color.lightGray);
67: //get a reference to the plot for further customisation...
68: final CategoryPlot plot = chart.getCategoryPlot();
69: CategoryItemRenderer renderer = new BarRenderer();
70: plot.setRenderer(renderer);
71:
72: // Assume that we have the chart
An error occurred at line: 69 in the jsp file: /getChart.jsp
BarRenderer cannot be resolved to a type
66: chart.setBackgroundPaint(Color.lightGray);
67: //get a reference to the plot for further customisation...
68: final CategoryPlot plot = chart.getCategoryPlot();
69: CategoryItemRenderer renderer = new BarRenderer();
70: plot.setRenderer(renderer);
71:
72: // Assume that we have the chart
An error occurred at line: 73 in the jsp file: /getChart.jsp
ChartUtilities cannot be resolved
70: plot.setRenderer(renderer);
71:
72: // Assume that we have the chart
73: ChartUtilities.saveChartAsPNG(image, chart, 500, 300);
74:
75: FileInputStream fileInStream = new FileInputStream(image);
76: OutputStream outStream = response.getOutputStream();
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:93)
at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:435)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:298)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:277)
at org.apache.jasper.compiler.Compiler.compile(Compil er.java:265)
at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:564)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:302)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:729)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
I m using Eclipse Platform and Version: 3.4.1, JDK1.5 updated as 1.6 and Tomcat 5.5
If any one can help me plz....
Thanks
Swasthik
|