RAPIDMINER 9.7 BETA ANNOUNCEMENT

The beta program for the RapidMiner 9.7 release is now available. Lots of amazing new improvements including true version control!

CLICK HERE TO DOWNLOAD

Problem while integrating RapidMiner using Eclipse

AldiAldi Member Posts: 3 Learner I
edited December 2019 in Help
Hello, I am trying to integrate RapidMiner into my Java Application using Eclipse, I was trying to use the model in my process and extract the results (tree, performance, and table) and show them in my application. But there were a few errors, here are the code and the output.

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;

import com.rapidminer.RapidMiner;
import com.rapidminer.RepositoryProcessLocation;
import com.rapidminer.gui.RapidMinerGUI;
import com.rapidminer.gui.ToolbarGUIStartupListener;
import com.rapidminer.operator.ExecutionMode;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.IOObject;
import com.rapidminer.tools.PlatformUtilities;
import com.rapidminer.Process;
import com.rapidminer.RapidMiner;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.learner.tree.DecisionTreeLeafCreator;
import com.rapidminer.repository.IOObjectEntry;
import com.rapidminer.repository.ProcessEntry;
import com.rapidminer.repository.Repository;
import com.rapidminer.repository.RepositoryLocation;
import com.rapidminer.repository.RepositoryManager;
import com.rapidminer.tools.XMLException;
import com.rapidminer.tools.plugin.Plugin;

import java.io.File;
import java.io.IOException;
import java.lang.Object;
import java.nio.file.Paths;
import java.util.Scanner;

import javax.swing.*;

public class GUILauncher extends JFrame implements ActionListener{
public static void main(String args[]) throws Exception {
// System.setProperty(PlatformUtilities.PROPERTY_RAPIDMINER_HOME, Paths.get("").toAbsolutePath().toString());
// RapidMinerGUI.registerStartupListener(new ToolbarGUIStartupListener());
// RapidMinerGUI.main(args);
new GUILauncher();
try {
System.setProperty(PlatformUtilities.PROPERTY_RAPIDMINER_HOME, Paths.get("").toAbsolutePath().toString());
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
RapidMiner.init();
Plugin.setPluginLocation("D:/RapidMiner Studio/lib/plugins");
Plugin.addAdditionalExtensionDir("D:/RapidMiner Studio/lib/plugins");
Plugin.setInitPlugins(true);
Repository repo = RepositoryManager.getInstance(null).getRepository("Projects");
RepositoryProcessLocation processLocation = new RepositoryProcessLocation(new RepositoryLocation(repo.getLocation(), "Process_25%"));
Process process = processLocation.load(null);
// Operator tree = process.getOperator("Decision Tree");
// tree.setParameter("criterion", "information_gain");
// tree.setParameter("maximal_depth", "6");
// tree.setParameter("apply_pruning", "true");
// tree.setParameter("confidence", "0.5");
// tree.setParameter("apply_prepruning", "true");
// tree.setParameter("minimal_gain", "0.1");
// tree.setParameter("minimal_leaf_size", "2");
// tree.setParameter("minimal_size_for_split", "4");
// tree.setParameter("number_of_prepruning_alternatives", "3");
// IOContainer container = process.run();
// for (int i = 0; i < container.size(); i++) {
// IOObject ioObject = container.getElementAt(i);
// System.out.println(ioObject);
// }
process.run();
} catch (IOException | XMLException ex) {
ex.printStackTrace();
}
}
}
And here is the output:

Dec 28, 2019 5:30:15 PM com.rapidminer.tools.I18N <clinit>
INFO: Set locale to en.
Dec 28, 2019 5:30:15 PM com.rapidminer.tools.PlatformUtilities logInfo
INFO: rapidminer.home is 'D:\IT\5th Semester\Advanced Object-Oriented Programming\Workspace\rapidminer-studio-core\rapidminer-studio-master'.
Dec 28, 2019 5:30:15 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: Using OpenSource license manager.
Dec 28, 2019 5:30:15 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: Initializing license manager.
Dec 28, 2019 5:30:15 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: Using default license location.
Dec 28, 2019 5:30:15 PM com.rapidminer.core.license.ProductConstraintManager initialize
INFO: Registering default product.
Dec 28, 2019 5:30:15 PM com.rapidminer.repository.FileRepositoryProvider load
WARNING: Unknown tag: remoteRepository
Dec 28, 2019 5:30:16 PM com.rapidminer.tools.plugin.Plugin registerPlugins
INFO: Register plugin: PMML
Dec 28, 2019 5:30:16 PM com.rapidminer.tools.plugin.Plugin finalizePluginLoading
SEVERE: Cannot load extension rmx_pmml: Depends on rmx_professional which cannot be found!
Dec 28, 2019 5:30:16 PM com.rapidminer.tools.plugin.Plugin initAll
INFO: Extension rmx_pmml could not be loaded successfully after 4ms.
Dec 28, 2019 5:30:16 PM com.rapidminer.gui.renderer.RendererService registerRenderers
WARNING: Cannot register renderer: java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.ExampleSetVisualizationRenderer
java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.ExampleSetVisualizationRenderer
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.rapidminer.tools.plugin.AllPluginsClassLoader.loadClass(AllPluginsClassLoader.java:51)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.rapidminer.gui.renderer.RendererService.registerRenderers(RendererService.java:264)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:198)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:140)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:132)
at com.rapidminer.RapidMiner.init(RapidMiner.java:772)
at com.rapidminer.RapidMiner.init(RapidMiner.java:689)
at GUILauncher.main(GUILauncher.java:61)

Dec 28, 2019 5:30:16 PM com.rapidminer.gui.renderer.RendererService registerRenderers
WARNING: Cannot register renderer: java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.AttributeWeightsVisualizationRenderer
java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.AttributeWeightsVisualizationRenderer
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.rapidminer.tools.plugin.AllPluginsClassLoader.loadClass(AllPluginsClassLoader.java:51)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.rapidminer.gui.renderer.RendererService.registerRenderers(RendererService.java:264)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:198)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:140)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:132)
at com.rapidminer.RapidMiner.init(RapidMiner.java:772)
at com.rapidminer.RapidMiner.init(RapidMiner.java:689)
at GUILauncher.main(GUILauncher.java:61)

Dec 28, 2019 5:30:16 PM com.rapidminer.gui.renderer.RendererService registerRenderers
WARNING: Cannot register renderer: java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.KernelModelWeightsVisualizationRenderer
java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.KernelModelWeightsVisualizationRenderer
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.rapidminer.tools.plugin.AllPluginsClassLoader.loadClass(AllPluginsClassLoader.java:51)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.rapidminer.gui.renderer.RendererService.registerRenderers(RendererService.java:264)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:198)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:140)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:132)
at com.rapidminer.RapidMiner.init(RapidMiner.java:772)
at com.rapidminer.RapidMiner.init(RapidMiner.java:689)
at GUILauncher.main(GUILauncher.java:61)

Dec 28, 2019 5:30:16 PM com.rapidminer.gui.renderer.RendererService registerRenderers
WARNING: Cannot register renderer: java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.NumericalMatrixVisualizationRenderer
java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.NumericalMatrixVisualizationRenderer
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.rapidminer.tools.plugin.AllPluginsClassLoader.loadClass(AllPluginsClassLoader.java:51)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.rapidminer.gui.renderer.RendererService.registerRenderers(RendererService.java:264)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:198)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:140)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:132)
at com.rapidminer.RapidMiner.init(RapidMiner.java:772)
at com.rapidminer.RapidMiner.init(RapidMiner.java:689)
at GUILauncher.main(GUILauncher.java:61)

Dec 28, 2019 5:30:16 PM com.rapidminer.gui.renderer.RendererService registerRenderers
WARNING: Cannot register renderer: java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.NumericalMatrixVisualizationRenderer
java.lang.ClassNotFoundException: com.rapidminer.extension.html5charts.gui.renderer.NumericalMatrixVisualizationRenderer
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.rapidminer.tools.plugin.AllPluginsClassLoader.loadClass(AllPluginsClassLoader.java:51)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.rapidminer.gui.renderer.RendererService.registerRenderers(RendererService.java:264)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:198)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:140)
at com.rapidminer.gui.renderer.RendererService.init(RendererService.java:132)
at com.rapidminer.RapidMiner.init(RapidMiner.java:772)
at com.rapidminer.RapidMiner.init(RapidMiner.java:689)
at GUILauncher.main(GUILauncher.java:61)

Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The operator class 'concurrency:parallel_decision_tree' is unknown. Possibly you must install a plugin for operators of group 'concurrency'.</em>
Dec 28, 2019 5:30:18 PM com.rapidminer.operator.DummyOperator getExtensionId
WARNING: Cannot connect to update service: java.lang.IllegalStateException: No UpdateManagerFactory registered.
java.lang.IllegalStateException: No UpdateManagerFactory registered.
at com.rapidminer.tools.update.internal.UpdateManagerRegistry.get(UpdateManagerRegistry.java:57)
at com.rapidminer.operator.DummyOperator.getExtensionId(DummyOperator.java:130)
at com.rapidminer.operator.DummyOperator.getParameterTypes(DummyOperator.java:99)
at com.rapidminer.operator.Operator.getParameters(Operator.java:1339)
at com.rapidminer.io.process.XMLImporter.parseOperator(XMLImporter.java:625)
at com.rapidminer.io.process.XMLImporter.parseProcess(XMLImporter.java:395)
at com.rapidminer.io.process.XMLImporter.parseOperator(XMLImporter.java:725)
at com.rapidminer.io.process.XMLImporter.parseOperator(XMLImporter.java:465)
at com.rapidminer.io.process.XMLImporter.parseRootOperator(XMLImporter.java:342)
at com.rapidminer.io.process.XMLImporter.parse(XMLImporter.java:305)
at com.rapidminer.io.process.XMLImporter.parse(XMLImporter.java:280)
at com.rapidminer.Process.readProcess(Process.java:1548)
at com.rapidminer.Process.readProcess(Process.java:1530)
at com.rapidminer.Process.<init>(Process.java:294)
at com.rapidminer.RepositoryProcessLocation.load(RepositoryProcessLocation.java:110)
at GUILauncher.main(GUILauncher.java:67)

Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'criterion' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'maximal_depth' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'apply_pruning' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'confidence' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'apply_prepruning' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'minimal_gain' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'minimal_leaf_size' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'minimal_size_for_split' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter parseOperator
INFO: The parameter 'number_of_prepruning_alternatives' is unknown for operator 'Decision Tree' (" dummy ")."
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The input port <var>training set</var> is unknown at operator <var>Decision Tree</var>.</em>
Dec 28, 2019 5:30:18 PM com.rapidminer.io.process.XMLImporter addMessage
INFO: <em class="error">The output port <var>model</var> is unknown at operator <var>Decision Tree</var>.</em>
Dec 28, 2019 5:30:18 PM com.rapidminer.tools.ResultService init
INFO: No filename given for result file, using stdout for logging results!
Dec 28, 2019 5:30:18 PM com.rapidminer.Process execute
INFO: Process //Projects/Process_25% starts
Exception in thread "main" com.rapidminer.operator.UserError: The dummy operator Decision Tree (replacing concurrency:parallel_decision_tree) cannot be executed. 
at com.rapidminer.operator.DummyOperator.doWork(DummyOperator.java:92)
at com.rapidminer.operator.Operator.execute(Operator.java:1031)
at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
at com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:812)
at com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:423)
at com.rapidminer.operator.Operator.execute(Operator.java:1031)
at com.rapidminer.Process.executeRoot(Process.java:1378)
at com.rapidminer.Process.lambda$7(Process.java:1357)
at com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext$AdaptedCallable.exec(AbstractConcurrencyContext.java:328)
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

In my understanding, I feel like the last error (Exception in thread "main" com.rapidminer.operator.UserError: The dummy operator Decision Tree (replacing concurrency:parallel_decision_tree) cannot be executed.) seems to be the most severe one? Does anybody know how to fix this error? Or what I did wrong? Thank you for the help, highly appreciated.

Best regards

Aldi

Tagged:

Best Answer

Answers

  • sgenzersgenzer 12Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,921  Community Manager
    hi @Aldi I'm sorry no one has chimed in here. Is this still an issue?

    Scott
  • AldiAldi Member Posts: 3 Learner I
    hi @sgenzer I think the problem is that I didn't have the required licenses to use the decision tree operator right? I changed it to Naive Bayes and it worked.

    Aldi
Sign In or Register to comment.