Options

"Error: Unknown operator class: 'process'!"

flyfireflyfire Member Posts: 11 Contributor II
edited May 2019 in Help
Hello all.
I am new to RapidMiner program. I have written a program based on RapidMiner, but it came out an error I could not solve, although I tried all the method I knew.

I have already solved this problem, thanks for help!Here is my program. This program reads an xml file of a RapidMiner process, and try to run it.
import java.io.File;

import com.rapidminer.Process;
import com.rapidminer.RapidMiner;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.IOContainer;

public class Test {

   /**
    * @param args
    */
   public static void main(String[] args) {
      // TODO Auto-generated method stub
     
      try{
          /*
           * 配置一个Process工作的XML文件,这个文件可以在示例文件夹里挑选出一个来.
           * 在这里我们用了最简单的读取样本的流程文件
           */
          File file = new File("D:\\java\\Workspace\\RapidMinerTest\\src\\com\\rapidminer\\resources\\customs_Kmeans.xml");
          System.setProperty("rapidminer.home", "E:\\Program Files\\Rapid-I\\RapidMiner5");
          //System.setProperty("rapidminer.rcfile", "E:\\Program Files\\Rapid-I\\RapidMiner5\\resources\\com\\rapidminer\\resources\\rapidminerrc");
   
          System.setProperty("rapidminer.init.weka","false");
          RapidMiner.init();

          //Process temp = RapidMiner.readProcessFile(file);
          Process temp = new Process(file);
          System.out.println("---------------");
         
          IOContainer io = temp.run();

          ExampleSet exampleSet = io.get(ExampleSet.class);
         
          System.out.println("exampleSet:==============" );
         
          System.out.println(exampleSet.getAttributes());
         
          System.out.println("ExampleSource Operator:");
         
          System.out.println(temp.getRootOperator().getOperator(0));
         
      }catch(Exception e){
          e.printStackTrace();
      }
     
   }

}
Here is the error log.

G Oct 21, 2010 5:01:26 PM: rapidminer.home is 'E:\Program Files\Rapid-I\RapidMiner5'.
G Oct 21, 2010 5:01:26 PM: ----------------------------------------------------
G Oct 21, 2010 5:01:26 PM: Initialization Settings
G Oct 21, 2010 5:01:26 PM: ----------------------------------------------------
G Oct 21, 2010 5:01:26 PM: Default system encoding for IO: GBK
G Oct 21, 2010 5:01:26 PM: Load core operators...
G Oct 21, 2010 5:01:26 PM: Load Weka operators: weka not found
G Oct 21, 2010 5:01:26 PM: Load JDBC drivers from lib directory: true
G Oct 21, 2010 5:01:26 PM: Load JDBC drivers from classpath: false
G Oct 21, 2010 5:01:26 PM: Load plugins: true
G Oct 21, 2010 5:01:26 PM: Load plugins from 'E:\Program Files\Rapid-I\RapidMiner5\lib\plugins'
G Oct 21, 2010 5:01:26 PM: ----------------------------------------------------
G Oct 21, 2010 5:01:26 PM: Trying rcfile 'E:\Program Files\Rapid-I\RapidMiner5\etc\rapidminerrc'...skipped
G Oct 21, 2010 5:01:26 PM: Trying rcfile 'E:\Program Files\Rapid-I\RapidMiner5\etc\rapidminerrc.Windows 7'...skipped
G Oct 21, 2010 5:01:26 PM: Trying rcfile 'C:\Users\20\.rapidminer\4_4_0_rapidminerrc'...skipped
G Oct 21, 2010 5:01:26 PM: Trying rcfile 'C:\Users\20\.rapidminer\4_4_0_rapidminerrc.Windows 7'...skipped
G Oct 21, 2010 5:01:26 PM: Trying rcfile 'D:\java\Workspace\RapidMinerTest\rapidminerrc'...skipped
G Oct 21, 2010 5:01:26 PM: Trying rcfile 'D:\java\Workspace\RapidMinerTest\rapidminerrc.Windows 7'...skipped
G Oct 21, 2010 5:01:26 PM: Read rcfile 'E:\Program Files\Rapid-I\RapidMiner5\resources\com\rapidminer\resources\rapidminerrc'.
G Oct 21, 2010 5:01:26 PM: Loading operators from 'operators.xml'.
G Oct 21, 2010 5:01:27 PM: [Error] Cannot register 'ExcelExampleSetWriter': java.lang.NoClassDefFoundError: jxl/format/CellFormat
G Oct 21, 2010 5:01:27 PM: [Error] Cannot register 'NeuralNet': java.lang.NoClassDefFoundError: org/joone/engine/NeuralNetListener
G Oct 21, 2010 5:01:27 PM: [Error] Cannot register 'NeuralNetSimple': java.lang.NoClassDefFoundError: org/encog/neural/data/NeuralDataSet
G Oct 21, 2010 5:01:28 PM: Loading JDBC driver information from 'resources:jdbc_properties.xml'.
G Oct 21, 2010 5:01:28 PM: [Warning] Cannot register renderer: java.lang.NoClassDefFoundError: org/joone/engine/OutputPatternListener
G Oct 21, 2010 5:01:28 PM: [Warning] Cannot register renderer: java.lang.NoClassDefFoundError: org/encog/neural/data/NeuralData
com.rapidminer.tools.XMLException: Unknown operator class: 'process'!
at com.rapidminer.operator.Operator.createFromXML(Operator.java:1460)
at com.rapidminer.Process.readProcess(Process.java:859)
at com.rapidminer.Process.<init>(Process.java:168)
at com.Test.main(Test.java:48)
First, I don't get that why these errors show up. My project has include the path of rapidminer.jar, even xpp3.jar and xstream.jar.

G Oct 21, 2010 5:01:27 PM: [Error] Cannot register 'ExcelExampleSetWriter': java.lang.NoClassDefFoundError: jxl/format/CellFormat
G Oct 21, 2010 5:01:27 PM: [Error] Cannot register 'NeuralNet': java.lang.NoClassDefFoundError: org/joone/engine/NeuralNetListener
G Oct 21, 2010 5:01:27 PM: [Error] Cannot register 'NeuralNetSimple': java.lang.NoClassDefFoundError:


Second, I don't get this error. I have already import the package, why it still can not see Process class. Where is the "process" class instead of "Process" class?
com.rapidminer.tools.XMLException: Unknown operator class: 'process'!
at com.rapidminer.operator.Operator.createFromXML(Operator.java:1460)
at com.rapidminer.Process.readProcess(Process.java:859)
at com.rapidminer.Process.<init>(Process.java:168)
at com.Test.main(Test.java:48)


Best,
flyfire
Tagged:

Answers

  • Options
    haddockhaddock Member Posts: 849 Maven
    Hi there,

    I seem to remember this coming up before, check out ...

    http://rapid-i.com/rapidforum/index.php/topic,2367.0.html

    Moreover there was some talk of providing a guide to application embedding; you'll have to pay when it emerges, but as they say, 'time is money' .

    Good luck!

  • Options
    flyfireflyfire Member Posts: 11 Contributor II
    haddock wrote:


    you'll have to pay when it emerges, but as they say, 'time is money' .

    Hi,
    Thank you for your reply. I don't quite get the "pay" means. Isn't rapidminer an open-source software, there is something to pay but only the newest operators. However, here is the Process class, I think maybe it is not the "pay" problem.

    I already include the rapidminer.jar, the xpp3.jar, the xstream.jar in my Eclipse Libraries set.
  • Options
    flyfireflyfire Member Posts: 11 Contributor II
    Hi.
    I have changed the rapidminer.jar from version 4.4 to version 5.0. It seemed to identify the class Process.
    Here is the running message.
    2010-10-22 15:00:30 CONFIG: Locale not specified explicitly. Set default locale to US. (RapidMiner.init())
    2010-10-22 15:00:30 CONFIG: Initializing I18N (RapidMiner.splashMessage())
    2010-10-22 15:00:30 CONFIG: Ensuring RapidMiner Home is set (RapidMiner.splashMessage())
    2010-10-22 15:00:30 INFO: rapidminer.home is 'E:\Program Files\Rapid-I\RapidMiner5'. (Launcher.ensureRapidMinerHomeSet())
    2010-10-22 15:00:30 CONFIG: Reading Configuration Files (RapidMiner.splashMessage())
    2010-10-22 15:00:30 CONFIG: Reading configuration resource com/rapidminer/resources/rapidminerrc. (ParameterService.loadAllRCFiles())
    2010-10-22 15:00:30 CONFIG: Execution mode UNKNOWN does not permit file access. Ignoring all rcfiles. (ParameterService.loadAllRCFiles())
    2010-10-22 15:00:30 CONFIG: Registering Plugins (RapidMiner.splashMessage())
    2010-10-22 15:00:30 CONFIG: Read extension state. (ManagedExtension.readConfiguration())
    2010-10-22 15:00:30 CONFIG: Scanning plugins in E:\Program Files\Rapid-I\RapidMiner5\lib\plugins. (Plugin.findAndRegisterPlugins())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'Text Processing'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_text-5.0.7.jar!/com/rapidminer/resources/parserulesTextProcessing.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'PMML'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_pmml-5.0.2.jar!/com/rapidminer/resources/parserulesPMML.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'Weka'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_weka-5.0.1.jar!/com/rapidminer/resources/parserulesWekaExtension.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'PaREn Wizard'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_paren-5.0.1.jar!/com/rapidminer/resources/parserulesParen.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'R Extension'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_r-5.0.1.jar!/com/rapidminer/resources/parserulesR.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'Web Mining'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_web-5.0.4.jar!/com/rapidminer/resources/parserulesWeb.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'Reporting'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_reporting-5.0.2.jar!/com/rapidminer/resources/parserulesReporting.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Loading renderers from 'Series'. (RendererService.init())
    2010-10-22 15:00:30 CONFIG: Reading parse rules from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_series-5.0.2.jar!/com/rapidminer/resources/parserulesValueSeries.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:30 CONFIG: Initializing Operators (RapidMiner.splashMessage())
    2010-10-22 15:00:30 CONFIG: Loading operators from 'OperatorsCore.xml'. (OperatorService.registerOperators())
    2010-10-22 15:00:30 CONFIG: Loading operator documentation from jar:file:/E:/SETUP/rapidminer/lib/rapidminer.jar!/com/rapidminer/resources/i18n/OperatorsCoreDocumentation.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:31 WARNING: Password in XML file looks like unencrypted plain text. (ParameterTypePassword.decryptPassword())
    2010-10-22 15:00:32 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_parallel-5.0.1.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:32 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_parallel-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocParallel.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:32 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_text-5.0.7.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:32 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_text-5.0.7.jar!/com/rapidminer/resources/i18n/OperatorsDocTextProcessing.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:32 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_pmml-5.0.2.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:32 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_pmml-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocPMML.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:32 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_weka-5.0.1.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:32 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_weka-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocWekaExtension.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:32 CONFIG: Creating operators from factory com.rapidminer.tools.WekaOperatorFactory (OperatorService.parseOperators())
    2010-10-22 15:00:34 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_paren-5.0.1.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:34 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_paren-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocParen.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:34 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_r-5.0.1.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:34 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_r-5.0.1.jar!/com/rapidminer/resources/i18n/OperatorsDocR.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:34 CONFIG: Creating operators from factory com.rapidminer.operator.r.ROperatorFactory (OperatorService.parseOperators())
    2010-10-22 15:00:34 INFO: No operator descriptor specified for plugin Community. Trying plugin initializtation class com.rapidminer.community.CommunityPluginInit. (Plugin.registerOperators())
    2010-10-22 15:00:34 WARNING: No operator descriptor defined for: Community (Plugin.registerOperators())
    2010-10-22 15:00:34 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_web-5.0.4.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:34 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_web-5.0.4.jar!/com/rapidminer/resources/i18n/OperatorsDocWeb.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:34 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_reporting-5.0.2.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:34 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_reporting-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocReporting.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:34 CONFIG: Loading operators from 'C:\Users\20\.RapidMiner5\managed\rmx_series-5.0.2.jar'. (OperatorService.registerOperators())
    2010-10-22 15:00:34 CONFIG: Loading operator documentation from jar:file:C:\Users\20\.RapidMiner5\managed\rmx_series-5.0.2.jar!/com/rapidminer/resources/i18n/OperatorsDocValueSeries.xml. (OperatorDocBundle$XMLControl.newBundle())
    2010-10-22 15:00:34 CONFIG: Number of registered operator classes: 581; number of registered operator descriptions: 721; number of replacements: 533 (OperatorService.init())
    2010-10-22 15:00:34 CONFIG: Cannot access file system. Bypassing loading of operator usage statistics. (UsageStatistics.load())
    2010-10-22 15:00:34 CONFIG: Initializing XML Transformation Rules (RapidMiner.splashMessage())
    2010-10-22 15:00:34 CONFIG: Reading parse rules from jar:file:/E:/SETUP/rapidminer/lib/rapidminer.jar!/com/rapidminer/resources/parserules.xml (XMLImporter.importParseRules())
    2010-10-22 15:00:34 CONFIG: Loading JDBC Drivers (RapidMiner.splashMessage())
    2010-10-22 15:00:34 CONFIG: Loading JDBC driver information from 'resource jdbc_properties.xml'. (DatabaseService.loadJDBCProperties())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver com.mysql.jdbc.Driver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver org.postgresql.Driver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver net.sourceforge.jtds.jdbc.Driver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver org.hsqldb.jdbcDriver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 WARNING: Missing database driver class name for 'ODBC Bridge (e.g. Access)' (JDBCProperties.<init>())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver net.sourceforge.jtds.jdbc.Driver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver com.ingres.jdbc.IngresDriver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 CONFIG: Loaded JDBC driver ca.ingres.jdbc.IngresDriver (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed. (JDBCProperties.registerDrivers())
    2010-10-22 15:00:34 CONFIG: Ignoring jdbc_properties.xml files in execution mode UNKNOWN. (DatabaseService.init())
    2010-10-22 15:00:34 CONFIG: Initializing Data Repository (RapidMiner.splashMessage())
    2010-10-22 15:00:34 INFO: Cannot access file system in execution mode UNKNOWN. Not loading repositories. (RepositoryManager.load())
    2010-10-22 15:00:34 CONFIG: Initializing XML Serialization (RapidMiner.splashMessage())
    2010-10-22 15:00:34 CONFIG: Defining XML Serialization Alias Pairs (RapidMiner.splashMessage())
    2010-10-22 15:00:35 CONFIG: Initializing Renderers (RapidMiner.splashMessage())
    2010-10-22 15:00:35 CONFIG: Loading renderers from 'file:/E:/SETUP/rapidminer/lib/rapidminer.jar!/com/rapidminer/resources/ioobjects.xml'. (RendererService.init())
    2010-10-22 15:00:35 CONFIG: Loading renderers from 'ioobjects.xml'. (RendererService.init())
    ---------------
    2010-10-22 15:00:35 INFO: Process D:\java\Workspace\RapidMinerTest\src\com\rapidminer\resources\customs_Kmeans.xml starts (Process.run())
    java.lang.NullPointerException
    at com.rapidminer.operator.clustering.clusterer.KMeans.generateClusterModel(KMeans.java:152)
    at com.rapidminer.operator.clustering.clusterer.AbstractClusterer.doWork(AbstractClusterer.java:95)
    at com.rapidminer.operator.Operator.execute(Operator.java:771)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:709)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:368)
    at com.rapidminer.operator.Operator.execute(Operator.java:771)
    at com.rapidminer.Process.run(Process.java:899)
    at com.rapidminer.Process.run(Process.java:795)
    at com.rapidminer.Process.run(Process.java:790)
    at com.rapidminer.Process.run(Process.java:780)
    at com.Test.main(Test.java:99)
    Although it came out all red font, I could pass the following line.
               Process temp = new Process(file);
    But when it came to this line, my program jumped to error catching part.
               IOContainer io = temp.run();
    The error message is:
    java.lang.NullPointerException
    at com.rapidminer.operator.clustering.clusterer.KMeans.generateClusterModel(KMeans.java:152)
    at com.rapidminer.operator.clustering.clusterer.AbstractClusterer.doWork(AbstractClusterer.java:95)
    at com.rapidminer.operator.Operator.execute(Operator.java:771)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:709)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:368)
    at com.rapidminer.operator.Operator.execute(Operator.java:771)
    at com.rapidminer.Process.run(Process.java:899)
    at com.rapidminer.Process.run(Process.java:795)
    at com.rapidminer.Process.run(Process.java:790)
    at com.rapidminer.Process.run(Process.java:780)
    at com.Test.main(Test.java:99)


    Does somebody know what does this means?
    My original mining stream does work in the rapidminer GUI, so the xml file probably has no errors.
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    just to make it clear: RapidMiner is of course OpenSource (more exactly: AGPL3), but we offer the service to help you with the integration, which of course is not for free.

    Are you trying to import an old RapidMiner 4.4 process to RapidMiner 5? This might cause some problems...

    Greetings,
      Sebastian
Sign In or Register to comment.