"RapidMiner integration to NetBeans: home not found / Text plugin load fails"

terminal6terminal6 Member Posts: 5 Contributor II
edited May 2019 in Help

I'm new to RapidMiner and trying to use RapidMiner 4.2 with the TextPlugin 4.2 in a NetBeans RC Application. I created a project file using the GUI and tested it with the GUI where it works fine.

The NetBeans setup is that I have my module RMClustering that is supposed to use RapidMiner and two library rapper modules RapidMiner4.2Wrapper (containing rapidminer.jar) and RapidMiner4.2TextWrapper (containing the text plugin jar) and declared the necessary dependencies.
The coding and compiling works fine, so I assume the sources are found and used properly by NetBeans.

But when trying to run the clustering process I get RapidMiner errors I cannot make sense of as it is supposed to run out of the jar. Instead it stops because it cannot locate rapidminer.home with given the code in ensureRapidMinerHomeSet() seems to be a full RapidMiner installation directory:

java.lang.IllegalStateException: You are trying to access file: . from the default package. Please see http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#default_package
        at org.netbeans.ProxyClassLoader.printDefaultPackageWarning(ProxyClassLoader.java:539)
        at org.netbeans.ProxyClassLoader.getResource(ProxyClassLoader.java:312)
        at com.rapidminer.tools.ParameterService.ensureRapidMinerHomeSet(ParameterService.java:95)
        at com.rapidminer.RapidMiner.init(RapidMiner.java:232)
        at com.rapidminer.RapidMiner.init(RapidMiner.java:205)
        at com.rapidminer.RapidMiner.init(RapidMiner.java:373)
        at de.uni_mannheim.informatik.ki.blogalyzer.analyse.rmclustering.RMClusterWorker.run(RMClusterWorker.java:67)
SEVERE [global]
java.lang.RuntimeException: Property 'rapidminer.home' not set!
        at com.rapidminer.tools.ParameterService.getProperty(ParameterService.java:498)
        at com.rapidminer.tools.ParameterService.ensureRapidMinerHomeSet(ParameterService.java:124)
        at com.rapidminer.RapidMiner.init(RapidMiner.java:232)
        at com.rapidminer.RapidMiner.init(RapidMiner.java:205)
        at com.rapidminer.RapidMiner.init(RapidMiner.java:373)
[catch] at de.uni_mannheim.informatik.ki.blogalyzer.analyse.rmclustering.RMClusterWorker.run(RMClusterWorker.java:67)
G Mar 2, 2009 8:01:39 AM: Property rapidminer.home is not set. Guessing.
G Mar 2, 2009 8:01:40 AM: Trying base directory of classes (build) 'failed

Because of the code in ensureRapidMinerHomeSet() I then tried to let it run against the installation directory I have on my machine using System.setProperty(...) and then it starts up but fails to load the text plugin. But I cannot see why as it works with the GUI-batch file.
As the error log is longer, I attached it instead of pasting it here.
From what I see, RapidMiner is somehow not able to load the plugins directory, no matter if I provide the text operators.xml or not.
G Feb 27, 2009 6:08:17 PM: [Error] Cannot read 'S:\Mannheim\WS08-09\Studienarbeit\rapidminer-4.2\lib\plugins'.

Interestingly the error messages are differ depending in providing the installation root 'S:\Mannheim\WS08-09\Studienarbeit\rapidminer-4.2' or the installation jar 'S:\Mannheim\WS08-09\Studienarbeit\rapidminer-4.2\lib\rapidminer.jar':
For the jar it only gives the above error line, for the installation root it additionally gives "Cannot register ... java.lang.NoClassDefFoundError" errors for each Text Plugin operator.

So if there's a fix for initial the rapidminer.home issue, I would prefer this as I would not need a full RapidMiner installation for my application to run.

Any help is highly appreciated.


[attachment deleted by admin]


  • Options
    terminal6terminal6 Member Posts: 5 Contributor II

    no one has an idea?  :(

    As I'm not even sure if I should look deeper into the NetBeans architecture or RapidMiner for finding the source of this error, any hint would help a lot.

  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Dietmar,
    RapidMiner needs some files from its ressource directory in order to initialize properly. Although I'm not familiar with NetBeans, I guess, that RM misses these files. If you still haven't fixed the problem, I will take closer look on monday on this problem.
    Currently we are under heavy workload, because half of the company is on the CeBit...

  • Options
    terminal6terminal6 Member Posts: 5 Contributor II
    Hi Sebastian,

    sure, during CeBit you had a lot of work I guess.  :)

    Unfortunately it's not solved.
    I tried it with a stand-alone test: Just a java class against my RapidMiner installation, and compiling works fine. But at runtime I get a java.lang.ClassNotFoundException: com.rapidminer.operator.OperatorException (calling it with the jar in the classpath). But this does not need to be solved.
    My goal is to get it to run within NetBeans.

  • Options
    terminal6terminal6 Member Posts: 5 Contributor II
    The standalone test works. So it's definitely a problem with the RapidMiner Startup Process in conjuntion with the NetBeans Class Loader.

    Hadn't worked with the command line for some time but wanted to make sure that it works in pure Java w/o any IDE help that I don't know of.

    At runtime the Text Operators have to be passed to RapidMiner using the -Drapidminer.operators.additional=<path_to_textinput>/resources/operators.xml parameter if you don't want to run it against the whole RapidMiner installation.

    So I could run it with either

    java -classpath <path_to_rapidminer-4.2.jar>;. -Drapidminer.home=<path_to_rapidminer> RMtest

    java -classpath <path_to_rapidminer.jar>;<path_to_rapidminer-text-4.2.jar>;. -Drapidminer.operators.additional=path_to_rapidminer-text operators.xml> RMtest
    But I prefer option 2 because I want to use the programm w/o a full RapidMiner installation finally.

    Any idea why this does not work out of NetBeans?
  • Options
    IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder

    I only have one idea right now (but maybe this is the right track): you can also specify the location of the plugins by a property with

    System.setProperty(RapidMiner.PROPERTY_RAPIDMINER_INIT_PLUGINS_LOCATION, "C:\\Dokumente und Einstellungen\\Mierswa\\Eigene Dateien\\workspace\\RMTextTest\\lib");
    Maybe this does the trick (at least if the exception refers to an operator from a plugin).

  • Options
    terminal6terminal6 Member Posts: 5 Contributor II
    Thanks for the hint. Unfortunately it doesn't help. The error is still the same as in the log I appended to my first post.

    But meanwhile I fixed at least an minor issue: The path to the operators.xml for rapidminer.operators.additional was not set properly. Now RapidMiner reads the operators.xml properly, but the ClassNotFoundExceptions are the same.

    Somehow I have the feeling that RapidMiner cannot access the files in the second library (rapidminer-text-4.2.jar) although I declared a dependency from the first library (rapidminer-4.2.jar) to it in NetBeans.

    Interestingly the error remains the same when I change the direction of the dependency (from rapidminer-text to rapidminer).
    But that makes me even more think that it has to do with the ClassLoader restrictions set by NetBeans that are somehow not obeyed by RapidMiner and therefore RapidMiner cannot load these files.
    The same seems to apply if I set rapidminer.home to the full RapidMiner installation directory, also as if NetBeans prevents RapidMiner from accessing it.

    Which brings me back to my first thought: Why is RapidMiner not recognizing that it runs out of the jar and not in a full installation environment?
    It does the same when run from the command line pure Java it tested. But there obviously no ClassLoader restrictions prevent it from loading whatever it wants from whereever (which is not a desirable behaviour).

    Any ideas in these directions (dependencies, rapidminer.home -> full installation)?
Sign In or Register to comment.