Extending RapidMiner

Update: Since RapidMiner is no longer open-source; extend another framework (am still in search for a good one); (more info).

 

Extending RapidMiner (RM) involves two steps:

  1. Setup RM Project
  2. Setup (YOUR) Extension/Operator

Kind folks at RM have provided several guides; but they are somewhat outdated (plus there are some platform specific issues).  Bellow, I provide notes (and ziped templates) on what has worked for me.

1. Setup RM Project

The following post provide the instructions how to set up eclipse svn and rapidminer.

Things do work under Ubuntu 12.04; but seem no longer working under OSX for rapidminer 5.3 (revision 829).

Problem

In OSX; am getting 28 errors:

attributeList cannot be resolved

which is caused by:

private final JList<ColumnIdentifier> attributeList = new JList<ColumnIdentifier>(new DefaultListModel<ColumnIdentifier>());

with the following explanations:

Multiple markers at this line
	- The type JList is not generic; it cannot be parameterized with arguments <ColumnIdentifier>
	- The type DefaultListModel is not generic; it cannot be parameterized with arguments 
	 <ColumnIdentifier>
	- The type JList is not generic; it cannot be parameterized with arguments <ColumnIdentifier>

Solution

The problem seem to due to the OSX version of Java.  The following steps allow to overcome it.

  • Install JDK 7
    http://jdk7.java.net/download.html
    make sure to install JDK and not just JRE
  • Configure Eclipse to use JDK 7
  • follow instructions in the post with the following modifications: 
    when installing subclipse use the most recent version e.g. 1.8; not 1.6
    configure eclipse to use SVNKit: Team/SVN/SVN Interface/SVNKit
    check out unuk (not vega)
  • Set compiler compliance level to 1.6

If everything compiles you may want to skip to “Building Extension” section.

Other Issues

Problem

Trying to compile RapidMiner gives the following error:

 rapidminer constructor is ambigious

Solution

Instructions are somewhat outdated (screenshots to be precise).  So I have mistakenly installed the Vega version.  The Unuk version/branch should be selected (https://rapidminer.svn.sourceforge.net/svnroot/rapidminer/Unuk).

You may get the message bellow; but just ignore it, and everything should work fine.

Resource '/.org.eclipse.jdt.core.external.folders' already exists.

 

Building RapidMiner

To build the rapidminer.jar; right click on the build.xml in eclipse Run As/”Ant Build …” and select createJar target.

2. Setup (YOUR) Extension/Operator

The official guide on extending RM (zip file contains a very nice manual; and Extension Template and Tutorial Extension).  Although it is a little bit outdated (aimed at Vega; not Unuk).  Here is my modified template that should work with Unuk as is (see paragraph bellow on how to set it up though).

While it should be possible to just create a project for your extension  this did not work well for me.  Instead use the workspace that you have created in the previous step (setting up RM project).  Then you can import the project into it (my modified template); by “Import / Existing Project into Workspace” make sure to check “copy files” (needed since build.xml locates RM by ../); later on you move proj to the desired location for source control, etc.; and created a symbolic link to it.

To build your extension; right click on build.xml and select “Run As / Ant Build …”and select “instal” target.

Then execute the RM Project.  You should be able to see your extension in RM with  “View/Show View/A very simple Window”

When writing your extension make sure to look at a very nice official guide on extending RM.

Previous Issues

Left for reference purposes (or in case I need to re-update the source files).

Currently template references old version of RM (Vega); change the project properties to reference to Unuk; and edit the top of the build.xml file accordingly.

The panel (SimpleWindow) will not show up as shown in tutorial pdf; to get it to show — View/Show View/A

Things should now work.  For more details see pdf manual included in the official guide.

import proj into eclipse (copy into workspace)
Import / Existing Project into Workspace

(make sure to check the “copy project into workspace” option; needed for compilation and finding RM source)

replace: Vega by Unuk in build.xml

In project properties update the Java Build Path to point to RamidMiner_Unuk Project (must be in your workspace)

right click on build.xml and select Run As / Ant Build …
and select “instal” target

Added SimpleWindow (@see Sec. 8.3 in “How to Extend RapidMiner 5.pdf”)
to have it shown uncomment the line in PluginInitTemplate

added vldocking.jar (as per instructions in Sec. 8.3)

Create a new eclipse project and import RapidMiner_Extension_Template project into it (make sure to check “Copy projects into workspace”).

Modify the Eclipse project properties: right click on the project and select Properties/Project References, and select the Unuk proj and click on. Then go to Properties/Java Build Path/Projects click on Add and select Unuk proj and remove Vega proj.  An alternative is to add the rapidminer.jar instead of the whole project.

build.xml refers to Vega,  you need to modify change the references from Vega to Unuk in build.xml:

<property name=”rm.dir” location=”../RapidMiner_Vega” />

->

<property name=”rm.dir” location=”../PATH_TO_RapidMiner_UNUK” />

(and execute build; see above; and refresh the project); and also to

If it could not be located (due to incorrect path) you get the following error:

[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

If you run build.xml with the “install” target.  You may get the following error (actually it will run fine only for the first time):

build.dependencies:
     [echo] Building plugin dependencies of Tutorial Extension...

build_extension.xml:142: The following error occurred while executing this line:
build_extension.xml:194: The following error occurred while executing this line:
build_extension.xml:199: The following error occurred while executing this line:

.metadata/.lock:1: Premature end of file.

It could be fixed (hacked) by commenting out the following line in build.xml:

	<fileset id="build.dependentExtensions" dir="..">
	</fileset>

 

You may want to also copy the RM/ant dir to get rid of the following warning:

version.get:
     [echo] Long version: 5.0.000; short version: 5.0
init.setEncoding:
init:
  [taskdef] Could not load definitions from resource antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource org/freecompany/redline/ant/antlib.xml. It could not be found.
     [copy] Warning: Could not find file RapidMiner_Extension_Tutorial/ant/jsch-0.1.42.jar to copy.
init.setEncoding:

 

Keywords & trails

Eclipse Juno 4.2

rapidminer rm svn eclipse extending extension build does not compile ambiguous

eclipse required projects on the build path does not 8:01pm
 
 
     
Eclipse missing already imported required… – stackoverflow.com 8:01pm
 
 
Searched for eclipse required projects on the build path 8:00pm
 
 
     
java – Required project in build path… – stackoverflow.com 8:00pm
 
 
Searched for eclipse project not visible in workspace 7:59pm
 
 
     
Eclipse Projects not showing up after… – stackoverflow.com

 

Searched for eclipse java.lang.UnsatisfiedLinkError: Could not load SWT library 8:21pm

 

 

 

 

 

Searched for unuk rapidminer 8:09pm

 

 

 

 

 

     
Rapid – I – Subversion – rapid-i.com – Viewed 2 times 8:10pm

 

 

 

 

 

Searched for unuk 452 8:09pm

 

 

 

 

 

Searched for unuk 453 8:09pm

 

 

 

 

 

     
public aborg0 / RapidMiner-Unuk – GitHub – github.com 8:09pm

 

 

 

 

 

Searched for rapidminer The type JList is not generic; it cannot be parameterized with arguments <ColumnIdentifier> 8:06pm

 

 

 

 

 

Searched for rapidminer attributelist cannot be resolved

 

Searched for build.xml:360: java.lang.UnsupportedClassVersionError: com/oracle/appbundler/AppBundlerTask : Unsupported major.minor version 51.0 8:08pm

 

 

 

 

 

Searched for Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path no svnjavahl in java.library.path java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java 7:56pm

 

 

 

 

 

     
eclipse – Failed to load JavaHL Library… – stackoverflow.com 7:56pm

 

 

 

 

 

     
eclipse – JavaHL isn’t working – Stack Overflow – stackoverflow.com 7:56pm

 

 

 

 

 

Searched for subclipse 7:47pm

 

 

 

 

 

     
Subclipse – Tigris.org – tigris.org 7:47pm

 

 

 

 

 

     
subclipse: Subclipse Update Site – tigris.org

 

 

Searched for rapidminer-vega unuk 7:35pm

 

 

 

 

 

     
Extending RapidMiner | Active Intelligence – activeintelligence.org 7:35pm

 

 

 

 

 

Cannot run RapidMiner in Eclipse – 

 

 Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found 7:20pm

 

 

 

 

 

     
ant – Could not load definitions from… – stackoverflow.com 7:20pm

 

 

 

 

 

     
Extending RapidMiner | Active Intelligence – activeintelligence.org – Viewed 2 times 7:20pm

 

 

 

 

 

Searched for Problem: failed to create task or type antlib:net.sf.antcontrib:for Cause: The name is undefined. 7:18pm

 

 

 

 

 

     
ant: failed to create task or type -.

 

 

 

 

 

 

 

 

 

About Neil Rubens

see http://ActiveIntelligence.org
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Extending RapidMiner

  1. Pingback: RapidMiner: Maven Repository | Active Intelligence

  2. Imbafestor says:

    Hey Neil,

    thank you very much for your blog post, it helped me a lot! But i still keep getting errors when building the extension build.xml.
    I didn’t find a contact mail adress so i’ll try it this way. Could you send me a short mail and i’ll provide you with the error log, maybe you have a clue.

    Thank you very much!

    • Neil Rubens says:

      Thanks for your comment.

      First of all; due to license changes (basic license costing $10,000) I highly recommend switching to an open source ML framework. Scikit-learn is a good candidate (Python).

      I no longer have a RapidMiner’s build environment on my computer, so unfortunately am not able to help you with your build problem.

Leave a Reply

Your email address will not be published. Required fields are marked *


*