java.lang.NoSuchMethodError: org.jfree.text.TextUtilities.dr

A discussion forum for the JCommon class library.

java.lang.NoSuchMethodError: org.jfree.text.TextUtilities.dr

Postby surendranath24 » Tue Apr 06, 2010 3:42 am

my file



<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="java.awt.*" %>
<%@ page import="java.io.*" %>
<%@ page import="org.jfree.chart.*" %>
<%@ page import="org.jfree.chart.entity.*" %>
<%@ page import ="org.jfree.data.general.*"%>
<%@ page import ="org.jfree.text.TextUtilities"%>
<%
final DefaultPieDataset data = new DefaultPieDataset();
data.setValue("One", new Double(43.2));
data.setValue("Two", new Double(10.0));
data.setValue("Three", new Double(27.5));
data.setValue("Four", new Double(17.5));
data.setValue("Five", new Double(11.0));
data.setValue("Six", new Double(19.4));

JFreeChart chart = null;
try {
chart = ChartFactory.createPieChart("Pie Chart ", data, true, true, false);
System.out.print("hello");
}
catch(Exception e) {
System.out.println(e);
}
try {
final ChartRenderingInfo info = new
ChartRenderingInfo(new StandardEntityCollection());
final File file1 = new File("D:\\barchart.png");
ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);
} catch (Exception e) {
out.println(e);
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<IMG SRC="piechart.png" WIDTH="600" HEIGHT="400"
BORDER="0" USEMAP="#chart">
</body>
</html>




iam executing pie chart example iam getting these errors plz help me ...........
i have used eclipse and i also imported jcommon 1.0.16 version .............................

[color=#80BFBF][color=#80BFBF][color=#80BFBF]org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: java.lang.NoSuchMethodError: org.jfree.text.TextUtilities.drawAlignedString(Ljava/lang/String;Ljava/awt/Graphics2D;FFLorg/jfree/ui/TextAnchor;)Ljava/awt/geom/Rectangle2D;
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.pei_jsp._jspService(pei_jsp.java:111)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.lang.NoSuchMethodError: org.jfree
surendranath24
 
Posts: 1
Joined: Tue Apr 06, 2010 3:36 am

Return to JCommon

Who is online

Users browsing this forum: No registered users and 2 guests