"Bugfix for ProcessLog(Operator) with persistent=true"

oheeringoheering Member Posts: 3 Contributor I
edited May 23 in Help
Hi,

i was eager to try out the setting "persistent = true" with the ProcessLog Operator logging into a file. On Windows everything was fine but when I started the very same process on a Linux Server, it just crashed on first application with a NullPointerException. :-(

Luckily I was able to track down the problem: My "file" into which i wanted to log had no path. It was just a plain filename because I actually want the file in the current directory (which is my "experiments" directory). The code doesn't deal right with this situation:

File parent = result.getParentFile();
parent.mkdirs();
File: com\rapidminer\operator\Operator.java, Method: getParameterAsFile, Line: 1088, CVS HEAD

Here, "result" is the File object of the actual log file. On Windows somehow the filename gets converted to an absolute filename. On Linux it is not. Having no parent on Linux means, "parent" will become NULL, hence the Exception. The fix might be trivial: check if parent != NULL before making dirs. If parent == NULL we don't have to create any directories at all.

I didn't investigate why both setups behave differently, but I'm pretty sure it may be because on Linux my working-dir is not the RapidMiner directory as I call RM from another directory (my experiments directory). I'm using the commandline variant of RapidMiner on Linux, too (GUI on Windows).

Regards,
Oliver
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,525   Unicorn
    Hi Oliver,
    thank you for the hint. We will fix that in the upcoming 4.5er release.
    If you enter a filename without any directory, it normaly is interpreted relative to the directory of the process file. It seems to me, that this does not work correctly with the command line version.
    We will check that.

    Greetings,
      Sebastian
Sign In or Register to comment.