Options

"RapidMiner 4.4 / Debian Lenny path issues"

cognitiaclaevescognitiaclaeves Member Posts: 2 Contributor I
edited May 2019 in Help
I'm seeing some weird results when trying to invoke RapidMiner 4.4.

I use this to set the variables and class path:

export RAPID_MINER_HOME="/home/setup/rami/rapidminer-4.4"
RH=$RAPID_MINER_HOME
export JAVA_HOME="/usr/bin/java"

export CLASSPATH="$RH/lib/rapidminer.jar:$RH/lib/weka.jar:"

( file is named rm_env.  I do this: source rm_env )

$ echo -e  " $CLASSPATH \n $RAPID_MINER_HOME \n $JAVA_HOME"
/home/setup/rami/rapidminer-4.4/lib/rapidminer.jar:/home/setup/rami/rapidminer-4.4/lib/weka.jar:
/home/setup/rami/rapidminer-4.4
/usr/bin/java

( So, the environment variables appear to be getting set. )

This is the file I'm trying to run:  ( It compiles successfully with javac Test.java ):

import com.rapidminer.RapidMiner;
import java.util.*;

public class Test {
        public static void main(String[] args){
                System.out.println("Hello World!");
                RapidMiner.init();
                System.out.println("Me Again!");
                Scanner sc = new Scanner(System.in);
                sc.nextLine();
                System.out.println("One More Time.");
        }
}

Here is the result that I get from java Test:

G Jun 12, 2009 5:05:39 PM: Property rapidminer.home is not set. Guessing.
G Jun 12, 2009 5:05:39 PM: Trying parent directory of '/home/setup/rami/rapidminer-4.4/lib/rapidminer.jar'...gotcha!
G Jun 12, 2009 5:05:39 PM: Trying base directory of classes (build) '/home/setup/rami/q2'... gotcha!
G Jun 12, 2009 5:05:39 PM: ----------------------------------------------------
G Jun 12, 2009 5:05:39 PM: Initialization Settings
G Jun 12, 2009 5:05:39 PM: ----------------------------------------------------
G Jun 12, 2009 5:05:39 PM: Default system encoding for IO: UTF-8
G Jun 12, 2009 5:05:39 PM: Load core operators...
G Jun 12, 2009 5:05:39 PM: Load Weka operators: weka not found
G Jun 12, 2009 5:05:39 PM: Load JDBC drivers from lib directory: true
G Jun 12, 2009 5:05:39 PM: Load JDBC drivers from classpath: false
G Jun 12, 2009 5:05:39 PM: Load plugins: true
G Jun 12, 2009 5:05:39 PM: Load plugins from '/home/setup/rami/q2/lib/plugins'
G Jun 12, 2009 5:05:39 PM: ----------------------------------------------------
G Jun 12, 2009 5:05:39 PM: Trying rcfile '/home/setup/rami/q2/etc/rapidminerrc'...skipped
G Jun 12, 2009 5:05:39 PM: Trying rcfile '/home/setup/rami/q2/etc/rapidminerrc.Linux'...skipped
G Jun 12, 2009 5:05:39 PM: Trying rcfile '/home/jae/.rapidminer/4_4_0_rapidminerrc'...skipped
G Jun 12, 2009 5:05:39 PM: Trying rcfile '/home/jae/.rapidminer/4_4_0_rapidminerrc.Linux'...skipped
G Jun 12, 2009 5:05:39 PM: Trying rcfile '/home/setup/rami/q2/testing/rapidminerrc'...skipped
G Jun 12, 2009 5:05:39 PM: Trying rcfile '/home/setup/rami/q2/testing/rapidminerrc.Linux'...skipped
G Jun 12, 2009 5:05:39 PM: Trying rapidminer.rcfile. Property not specified...skipped
G Jun 12, 2009 5:05:39 PM: Loading operators from 'operators.xml'.
G Jun 12, 2009 5:05:40 PM: Loading JDBC driver information from 'resources:jdbc_properties.xml'

( The lines that I don't think are right are as follows ) :

G Jun 12, 2009 5:05:39 PM: Property rapidminer.home is not set. Guessing.
G Jun 12, 2009 5:05:39 PM: Trying parent directory of '/home/setup/rami/rapidminer-4.4/lib/rapidminer.jar'...gotcha!
G Jun 12, 2009 5:05:39 PM: Trying base directory of classes (build) '/home/setup/rami/q2'...gotcha!
G Jun 12, 2009 5:05:39 PM: Load Weka operators: weka not found
G Jun 12, 2009 5:05:39 PM: Load plugins from '/home/setup/rami/q2/lib/plugins'

Here is a call that 'works':

$ java -Drapidminer.home=/home/setup/rami/rapidminer-4.4 Test

G Jun 12, 2009 5:07:48 PM: rapidminer.home is '/home/setup/rami/rapidminer-4.4'.
G Jun 12, 2009 5:07:48 PM: ----------------------------------------------------
G Jun 12, 2009 5:07:48 PM: Initialization Settings
G Jun 12, 2009 5:07:48 PM: ----------------------------------------------------
G Jun 12, 2009 5:07:48 PM: Default system encoding for IO: UTF-8
G Jun 12, 2009 5:07:48 PM: Load core operators...
G Jun 12, 2009 5:07:48 PM: Load Weka operators: true
G Jun 12, 2009 5:07:48 PM: Load JDBC drivers from lib directory: true
G Jun 12, 2009 5:07:48 PM: Load JDBC drivers from classpath: false
G Jun 12, 2009 5:07:48 PM: Load plugins: true
G Jun 12, 2009 5:07:48 PM: Load plugins from '/home/setup/rami/rapidminer-4.4/lib/plugins'
G Jun 12, 2009 5:07:48 PM: ----------------------------------------------------
G Jun 12, 2009 5:07:48 PM: Read rcfile '/home/setup/rami/rapidminer-4.4/etc/rapidminerrc'.
G Jun 12, 2009 5:07:48 PM: Trying rcfile '/home/setup/rami/rapidminer-4.4/etc/rapidminerrc.Linux'...skipped
G Jun 12, 2009 5:07:48 PM: Trying rcfile '/home/jae/.rapidminer/4_4_0_rapidminerrc'...skipped
G Jun 12, 2009 5:07:48 PM: Trying rcfile '/home/jae/.rapidminer/4_4_0_rapidminerrc.Linux'...skipped
G Jun 12, 2009 5:07:48 PM: Trying rcfile '/home/setup/rami/q2/testing/rapidminerrc'...skipped
G Jun 12, 2009 5:07:48 PM: Trying rcfile '/home/setup/rami/q2/testing/rapidminerrc.Linux'...skipped
G Jun 12, 2009 5:07:48 PM: Trying rapidminer.rcfile. Property not specified...skipped
G Jun 12, 2009 5:07:48 PM: Loading operators from 'operators.xml'.
G Jun 12, 2009 5:07:51 PM: Loading JDBC driver information from 'etc:jdbc_properties.xml'.


... Is it necessary to pass the rapidminer.home property through the Java command line?

Answers

  • Options
    fischerfischer Member Posts: 439 Maven
    This is in fact a bug that occurs only if you are using rapidminer.jar but your classpath points to some other place. In your case, something appears to point to "/home/setup/rami/q2" which I don't understand from your posting. However, the problem can be fixed easily.

    Please open com.rapidminer.tools.ParameterService and locate this piece of code (line 80 in my version) and add the marked line:

    if (dir != null) {
    message += "gotcha!";
          // add this line of code:
          found = true;
          // end of edit
          System.setProperty(RapidMiner.PROPERTY_RAPIDMINER_HOME, dir.getAbsolutePath());
    }

    Setting RAPID_MINER_HOME does not have an effext at all. If you go to the start scripts, you will also see that we spell it RAPIDMINER_HOME (with one underscore only). Neither of these variables are interpreted by RapidMiner at runtime. They are only used in our start scripts. If you want to specify it explicitly, you can always set the java property using -Drapidminer.home as you did in your second approach.

    Cheers,
    Simon
  • Options
    cognitiaclaevescognitiaclaeves Member Posts: 2 Contributor I
    Hi Simon.  Thanks for the response.  I had actually started with RAPIDMINER_HOME, however I picked up on RAPID_MINER_HOME by reading the INSTALL.txt, and confused the two...  I couldn't remember where I had seen RAPIDMINER_HOME, so I just posted my script as it stood...

    It turns out that the -Drapidminer.home approach isn't a horrible inconvenience, so I might stick with that, rather than alter the code... but thanks for your response.  It gives me a choice should the -Drapidminer.home prove to be troublesome later.

    Have a great day!
Sign In or Register to comment.