RAPIDMINER CLASS LOADING EXCEPTION

amogha_ec
amogha_ec New Altair Community Member
edited November 5 in Community Q&A
I have installed Rapid miner 4.6 and copied RapidMiner.jar and all other jar files from lib to my project lib folder in eclipse.Am trying to execute a jsp file which is used to plot a pie chart using Rapid miner api.Am using jdk 1.5 and tomcat compiler compliance is also 1.5.But when i execute the jsp am getting exception.Other part of the project is working fine.My jsp code follows:

<%@ page  import="java.io.*" %>
<%@ page  import="org.jfree.chart.*" %>
<%@ page  import="org.jfree.chart.entity.*" %>
<%@ page  import ="org.jfree.data.general.*"%>
<%@ page import="java.util.HashMap" %>  
<%@ page import="com.rapidminer.Process" %>  

<%@ page import="com.rapidminer.Process" %>
<%@ page import="com.rapidminer.gui.plotter.*" %>
<%@ page import="com.rapidminer.gui.plotter.charts.*" %>
<% HashMap<String,Integer> map=(HashMap<String,Integer>)request.getAttribute("map");
    String name="PieChart";
       String[] designation={"CEO","Software Engg","Team Leader","Software Tester","Project Manager","Others"};
       PieChart2DPlotter pieChart=new PieChart2DPlotter();
       final DefaultPieDataset data = new DefaultPieDataset();
       for(int i=0;i<map.size()-1;i++)
           {
            data.setValue(designation, new Double(map.get(designation)));
           }
       data.setValue("Others", new Double(map.get("Others")));
           JFreeChart chart=pieChart.createChart(data,false);
           try
{
   final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
final File file1 = new File("C:\\Excel\\piechart.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="C:\\Excel\\piechart.png"/>
   </body>
</html>  

and the Exception is:


org.apache.jasper.JasperException: Bad version number in .class file (unable to load class com.rapidminer.gui.plotter.charts.PieChart2DPlotter)
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
empcontroller.ControllerSevlet.process(ControllerSevlet.java:213)
empcontroller.ControllerSevlet.doGet(ControllerSevlet.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

Anyone Please Help

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    why are you using such an outdated version of RapidMiner? I'm afraid we cannot provide support for older versions of RapidMiner.

    Regards,
    Marco
  • amogha_ec
    amogha_ec New Altair Community Member
    hello marco,
                      Actually i was using rapidminer 5.1 earlier and was getting the same exception.I thought it was a conflict with jdk 1.5 and RM 5.1 would not support.so i installed RM 4.6 and bit altered my code and started working,but still am getting the same exception as earlier: "Bad serial version id(cannot load the class piechart2Dplotter)".RapidMiner classes successfully compile but failing to load.What might be the problem? Please help..
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    please reply to a topic instead of creating a new thread. For starters, you should definitely use RapidMiner5. And please note that RapidMiner must be build using jdk 1.6.
    As far as I know, this error usually occurs when the classes were compiled under a different java version than your Tomcat is running on.

    Regards,
    Marco