Setting rapidminer.home, Loading plugins
gistolero
New Altair Community Member
Hello,
I am getting errors while running rapidminer with the rapidminer-text plugin. Here is a description of the current envrionment and what I have done...
First, rapidminer is installed in /opt/rapidminer without rapidminer-text. The CLASSPATH is set to rapidminer.jar.
/home/user/swe $ echo $CLASSPATH
/opt/rapidminer/lib/rapidminer.jar
This is my short test 'application'
G Nov 9, 2008 6:09:50 PM: Property rapidminer.home is not set. Guessing.
G Nov 9, 2008 6:09:50 PM: Trying base directory of classes (build) '/home/user'...gotcha!
G Nov 9, 2008 6:09:50 PM: ----------------------------------------------------
G Nov 9, 2008 6:09:50 PM: Initialization Settings
G Nov 9, 2008 6:09:50 PM: ----------------------------------------------------
...
===> Why is '/home/user' set as rapidminer.home ('/homer/user'...gotcha)??? There are no rapidminer libraries/files and it isn't the current directory.
Now, the test application sets rapidminer.home:
G Nov 9, 2008 6:23:35 PM: rapidminer.home is '/opt/rapidminer'.
G Nov 9, 2008 6:23:35 PM: ----------------------------------------------------
G Nov 9, 2008 6:23:35 PM: Initialization Settings
G Nov 9, 2008 6:23:35 PM: ----------------------------------------------------
G Nov 9, 2008 6:23:35 PM: Default system encoding for IO: UTF-8
G Nov 9, 2008 6:23:35 PM: Load core operators...
G Nov 9, 2008 6:23:35 PM: Load Weka operators: false
G Nov 9, 2008 6:23:35 PM: Load JDBC drivers from lib directory: false
G Nov 9, 2008 6:23:35 PM: Load JDBC drivers from classpath: false
G Nov 9, 2008 6:23:35 PM: Load plugins: true
G Nov 9, 2008 6:23:35 PM: Load plugins from '/opt/rapidminer/lib/plugins'
G Nov 9, 2008 6:23:35 PM: ----------------------------------------------------
G Nov 9, 2008 6:23:35 PM: Read rcfile '/opt/rapidminer/etc/rapidminerrc'.
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/opt/rapidminer/etc/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/rapidminerrc'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rapidminer.rcfile. Property not specified...skipped
G Nov 9, 2008 6:23:36 PM: Loading operators from 'operators.xml'.
G Nov 9, 2008 6:23:37 PM: Loading JDBC driver information from 'etc:jdbc_properties.xml'.
rapidminer.home points to /opt/rapidminer and test.groovy runs without errors. Ok, but my final application needs the rapidminer-text plugin...
/home/user/swe $ cp -a /tmp/rapidminer-text-4.2.jar /opt/rapidminer/lib/plugins/
/opt/rapidminer/lib $ ls /opt/rapidminer/lib/plugins
rapidminer-text-4.2.jar Readme.txt
/home/user/swe $ groovy test.groovy
G Nov 9, 2008 6:18:25 PM: rapidminer.home is '/opt/rapidminer'.
G Nov 9, 2008 6:18:25 PM: Loading operators from '/opt/rapidminer/lib/plugins/rapidminer-text-4.2.jar'.
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'TextInput': java.lang.NoClassDefFoundError: com/rapidminer/operator/OperatorChain
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'StringTextInput': java.lang.NoClassDefFoundError: com/rapidminer/operator/OperatorChain
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'SingleTextInput': java.lang.NoClassDefFoundError: com/rapidminer/operator/OperatorChain
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'FeatureExtraction': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'Crawler': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'MashUp': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'LogFileSource': java.lang.NoClassDefFoundError: com/rapidminer/operator/O
...
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'TokenLengthFilter': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: ----------------------------------------------------
G Nov 9, 2008 6:18:25 PM: Initialization Settings
G Nov 9, 2008 6:18:25 PM: ----------------------------------------------------
G Nov 9, 2008 6:18:25 PM: Default system encoding for IO: UTF-8
G Nov 9, 2008 6:18:25 PM: Load core operators...
G Nov 9, 2008 6:18:25 PM: Load Weka operators: false
G Nov 9, 2008 6:18:25 PM: Load JDBC drivers from lib directory: false
G Nov 9, 2008 6:18:25 PM: Load JDBC drivers from classpath: false
G Nov 9, 2008 6:18:25 PM: Load plugins: true
G Nov 9, 2008 6:18:25 PM: Load plugins from '/opt/rapidminer/lib/plugins'
G Nov 9, 2008 6:18:25 PM: ----------------------------------------------------
G Nov 9, 2008 6:18:25 PM: Read rcfile '/opt/rapidminer/etc/rapidminerrc'.
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/opt/rapidminer/etc/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/rapidminerrc'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rapidminer.rcfile. Property not specified...skipped
G Nov 9, 2008 6:18:25 PM: Loading operators from 'operators.xml'.
G Nov 9, 2008 6:18:27 PM: Loading JDBC driver information from 'etc:jdbc_properties.xml'.
===> It seems that rapidminer extracts the rapidminer-text plugin and overwrites his own classes, because core and plugin use the same package names 'com/rapidminer/...'. I have tested different CLASSPATHs (/opt/rapidminer/lib/rapidminer.jar, /opt/rapidminer/lib/rapidminer.jar:/opt/rapidminer/lib/plugins/rapidminer-text-4.2.jar, ...) without success. Either rapidminer overwrites classes from rapidminer.jar or from rapidminer-text-4.2.jar. What am I doing wrong?
===> It would be very nice if someone could explain the rapidminer.home + loading classes and plugins process in depth.
Thanks a lot
Gisto
I am getting errors while running rapidminer with the rapidminer-text plugin. Here is a description of the current envrionment and what I have done...
First, rapidminer is installed in /opt/rapidminer without rapidminer-text. The CLASSPATH is set to rapidminer.jar.
/home/user/swe $ echo $CLASSPATH
/opt/rapidminer/lib/rapidminer.jar
This is my short test 'application'
import com.rapidminer.RapidMiner;/home/user/swe $ groovy test.groovy
RapidMiner.init(false, false, false, true);
G Nov 9, 2008 6:09:50 PM: Property rapidminer.home is not set. Guessing.
G Nov 9, 2008 6:09:50 PM: Trying base directory of classes (build) '/home/user'...gotcha!
G Nov 9, 2008 6:09:50 PM: ----------------------------------------------------
G Nov 9, 2008 6:09:50 PM: Initialization Settings
G Nov 9, 2008 6:09:50 PM: ----------------------------------------------------
...
===> Why is '/home/user' set as rapidminer.home ('/homer/user'...gotcha)??? There are no rapidminer libraries/files and it isn't the current directory.
Now, the test application sets rapidminer.home:
import com.rapidminer.RapidMiner;/home/user/swe $ groovy test.groovy
System.setProperty("rapidminer.home", "/opt/rapidminer");
RapidMiner.init(false, false, false, true);
G Nov 9, 2008 6:23:35 PM: rapidminer.home is '/opt/rapidminer'.
G Nov 9, 2008 6:23:35 PM: ----------------------------------------------------
G Nov 9, 2008 6:23:35 PM: Initialization Settings
G Nov 9, 2008 6:23:35 PM: ----------------------------------------------------
G Nov 9, 2008 6:23:35 PM: Default system encoding for IO: UTF-8
G Nov 9, 2008 6:23:35 PM: Load core operators...
G Nov 9, 2008 6:23:35 PM: Load Weka operators: false
G Nov 9, 2008 6:23:35 PM: Load JDBC drivers from lib directory: false
G Nov 9, 2008 6:23:35 PM: Load JDBC drivers from classpath: false
G Nov 9, 2008 6:23:35 PM: Load plugins: true
G Nov 9, 2008 6:23:35 PM: Load plugins from '/opt/rapidminer/lib/plugins'
G Nov 9, 2008 6:23:35 PM: ----------------------------------------------------
G Nov 9, 2008 6:23:35 PM: Read rcfile '/opt/rapidminer/etc/rapidminerrc'.
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/opt/rapidminer/etc/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/rapidminerrc'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rcfile '/home/user/swe/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:23:35 PM: Trying rapidminer.rcfile. Property not specified...skipped
G Nov 9, 2008 6:23:36 PM: Loading operators from 'operators.xml'.
G Nov 9, 2008 6:23:37 PM: Loading JDBC driver information from 'etc:jdbc_properties.xml'.
rapidminer.home points to /opt/rapidminer and test.groovy runs without errors. Ok, but my final application needs the rapidminer-text plugin...
/home/user/swe $ cp -a /tmp/rapidminer-text-4.2.jar /opt/rapidminer/lib/plugins/
/opt/rapidminer/lib $ ls /opt/rapidminer/lib/plugins
rapidminer-text-4.2.jar Readme.txt
/home/user/swe $ groovy test.groovy
G Nov 9, 2008 6:18:25 PM: rapidminer.home is '/opt/rapidminer'.
G Nov 9, 2008 6:18:25 PM: Loading operators from '/opt/rapidminer/lib/plugins/rapidminer-text-4.2.jar'.
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'TextInput': java.lang.NoClassDefFoundError: com/rapidminer/operator/OperatorChain
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'StringTextInput': java.lang.NoClassDefFoundError: com/rapidminer/operator/OperatorChain
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'SingleTextInput': java.lang.NoClassDefFoundError: com/rapidminer/operator/OperatorChain
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'FeatureExtraction': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'Crawler': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'MashUp': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'LogFileSource': java.lang.NoClassDefFoundError: com/rapidminer/operator/O
...
G Nov 9, 2008 6:18:25 PM: [Error] Cannot register 'TokenLengthFilter': java.lang.NoClassDefFoundError: com/rapidminer/operator/Operator
G Nov 9, 2008 6:18:25 PM: ----------------------------------------------------
G Nov 9, 2008 6:18:25 PM: Initialization Settings
G Nov 9, 2008 6:18:25 PM: ----------------------------------------------------
G Nov 9, 2008 6:18:25 PM: Default system encoding for IO: UTF-8
G Nov 9, 2008 6:18:25 PM: Load core operators...
G Nov 9, 2008 6:18:25 PM: Load Weka operators: false
G Nov 9, 2008 6:18:25 PM: Load JDBC drivers from lib directory: false
G Nov 9, 2008 6:18:25 PM: Load JDBC drivers from classpath: false
G Nov 9, 2008 6:18:25 PM: Load plugins: true
G Nov 9, 2008 6:18:25 PM: Load plugins from '/opt/rapidminer/lib/plugins'
G Nov 9, 2008 6:18:25 PM: ----------------------------------------------------
G Nov 9, 2008 6:18:25 PM: Read rcfile '/opt/rapidminer/etc/rapidminerrc'.
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/opt/rapidminer/etc/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/.rapidminer/4_2_0_rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/rapidminerrc'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rcfile '/home/user/swe/rapidminerrc.Linux'...skipped
G Nov 9, 2008 6:18:25 PM: Trying rapidminer.rcfile. Property not specified...skipped
G Nov 9, 2008 6:18:25 PM: Loading operators from 'operators.xml'.
G Nov 9, 2008 6:18:27 PM: Loading JDBC driver information from 'etc:jdbc_properties.xml'.
===> It seems that rapidminer extracts the rapidminer-text plugin and overwrites his own classes, because core and plugin use the same package names 'com/rapidminer/...'. I have tested different CLASSPATHs (/opt/rapidminer/lib/rapidminer.jar, /opt/rapidminer/lib/rapidminer.jar:/opt/rapidminer/lib/plugins/rapidminer-text-4.2.jar, ...) without success. Either rapidminer overwrites classes from rapidminer.jar or from rapidminer-text-4.2.jar. What am I doing wrong?
===> It would be very nice if someone could explain the rapidminer.home + loading classes and plugins process in depth.
Thanks a lot
Gisto
Tagged:
0
Answers
-
Anyone ???
Could someone explain the interaction between rapidminer.home, the loading classes process and plugins in depth at least?
Thanks again
0 -
Hi,
I could be wrong but it seems to me that simply adding the text plugin as well to your classpath should do the trick - at least this is what the NoClassDef-Exception suggests...
There was a thread here in the forum some time ago explaining how to integrate RM together with the plugins:
http://rapid-i.com/rapidforum/index.php/topic,30.0.html
The title is misleading so you might have missed this...
Best,
Martin0 -
Thanks for your reply and the links. I have read and tested all suggestions (different CLASSPATHS etc.) without success :-(
A "short" summary
- System: Linux
- Rapidminer installation directory: /opt/rapidminer
- Rapidminer-Core version: 4.2
- Rapidminer-Core JAR: /opt/rapidminer/lib/rapidminer.jar
- Rapidminer-Text Plugin version: 4.2
- Rapidminer-Text Plugin JAR: /opt/rapidminer/lib/plugin/rapidminer-text-4.2.jar
- CLASSPATH: "/opt/rapidminer/lib/rapidminer.jar:/opt/rapidminer/lib/plugin/rapidminer-text-4.2.jar:."
1.) rapidminer.home and PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION are not set by System.setProperty
- Rapidminer sets rapidminer.home to a "randomly chosen" directory. I don't understand how rapidminer choose this directory, It is not the current folder from the application.
- My test application exists with an error: com.rapidminer.operator.OperatorCreationException: No operator description object given for 'TextInput'
2.) Setting rapidminer.home and PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION with System.setProperty
- Rapidminer uses '/opt/rapidminer' as home.
- The test application exists with a lot of errors: Cannot register 'Text Input' etc.
=> Without setting rapidminer.home and PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION Rapidminer is able to load the text plugin, but ends with an "No operator" error. Setting rapidminer.home and plugin directory leads to a lot of "Cannot register" errors.
The workaround
Now, I have installed a very ugly workaround: I have combined rapidminer.jar and rapidminer-text-4.2.jar into one JAR file (rapidminer-core-and-text.jar). This task needs the following steps:
- Copying all files and directories from rapidminer-text-4.2.jar to rapidminer.jar.
- Adding all operators (resources/operators.xml) from text plugin to the operators.xml from rapidminer core.
- Setting CLASSPATH to /opt/rapidminer/libs/rapidminer-core-and-text.jar.
So, I finally got it to run without errors (and now it's possible to set rapidminer.home with System.setProperty too).
Conclusion
Again, this is a very dirty workaround, but it's notably, that it fixes all problems. It seems that Rapidminer isn't able to integrate plugins without further configuration... Of course, I would be truly grateful if you could give me a hint which configuration is necessary
0 -
Hello there,
i want to ask you.
I got the same problem with my rapidminer.
I am using rapidminer thru java code.
And by the time i wanted to run the code... I got an error: "property rapidminer.home is not set"
And then in my java code, i added some codes such as
String path="./data/";
System.setProperty("rapidminer.home",path );
RapidMiner.init();
And after that, it worked.
Does anyone know why should we set the rapidminer.home ????
thank u
0 -
Hi,
this was used during 4.x and earlier version for accessing some resource files and loading the plugins.
Greetings,
Sebastian0