The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

[SOLVED] Rapidminer\scripts not working in 5.3?

srt19170srt19170 Member Posts: 44 Contributor II
Am I the only one seeing errors with the scripts in 5.3?  If I try to execute any of the files in the scripts directory on 5.3, I get the error:
RAPIDMINER_HOME is not set. Trying the directory 'C:\Program Files\Rapid-I\Rapid Miner5\scripts\..'...
Using local jre: C:\Program Files\Rapid-I\RapidMiner5\scripts\..\jre\bin\java.exe...
Starting RapidMiner from 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..' using classes from 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..\lib\rapidminer.jar'...
Creating file "\\check_rm_java_version"
The filename, directory name, or volume label syntax is incorrect.
The problem seems to be the line in the .bat files that says:

set CHECK_VERSION_FILE="%HOMEPATH%\check_rm_java_version"
At least on my machine, HOMEPATH=\, so this ends up putting doubled slashes in the file create, which fails.  Correcting that problem leads to this:
Usage: com.rapidminer.RapidMinerCommandLine [-f] PROCESS [-Mname=value]
 PROCESS       a repository location containing a process
 -f            interpret PROCESS as a file rather than a repository location (deprecated)
 -Mname=value  sets the macro 'name' with the value 'value'
It appears that the new build of CommandLine insists on getting a PROCESS passed in.   Without thoroughly testing it, it does appear that the script will work if you pass in a valid process path.

Answers

  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi,

    which script have you started? The rapidminer.bat or the RapidMinerGUI.bat script? The rapidminer.bat script should be used to run RapidMiner as a command line tool. Run the RapidMinerGUI.bat script if you want to run RapidMiner in GUI mode.

    We assumed that %HOMEPATH% would reference to the users folder. Please replace %HOMEPATH% by some directory you may write to. This is needed to determine which Java
    version you are running to select the correct garbage collector.

    Best,
    Nils
  • srt19170srt19170 Member Posts: 44 Contributor II
    which script have you started? The rapidminer.bat or the RapidMinerGUI.bat script?
    Both scripts are broken.
    We assumed that %HOMEPATH% would reference to the users folder.
    That assumption is correct.  But on Windows, %HOMEPATH% ends in a backslash, e.g.,
    HOMEPATH=\
    So the way you use %HOMEPATH% in the scripts will cause an error.  You should instead write this:
    set CHECK_VERSION_FILE="%HOMEPATH%check_rm_java_version"
    without the backslash between %HOMEPATH% and check_rm_java_version.

    Any comment on the problem with com.rapidminer.RapidMinerCommandLine requiring a process file?  Have you tried running either of the scripts on a Windows machine under 5.3?  Do they work for you?

  • srt19170srt19170 Member Posts: 44 Contributor II
    Another script problem:  If you try to start RapidMinerGUI.exe with a process argument on Windows, it hangs with the splash screen showing "Creating Frame" and the following error in the command window:

    Exception in thread "main" java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.rapid_i.Launcher.main(Launcher.java:334)
    Caused by: java.lang.reflect.InvocationTargetException
            at java.awt.EventQueue.invokeAndWait(Unknown Source)
            at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
            at com.rapidminer.gui.RapidMinerGUI.run(RapidMinerGUI.java:251)
            at com.rapidminer.gui.RapidMinerGUI.launch(RapidMinerGUI.java:550)
            at com.rapidminer.gui.RapidMinerGUI.main(RapidMinerGUI.java:531)
            ... 5 more
    Caused by: java.lang.NullPointerException
            at com.rapidminer.gui.ApplicationPerspectives.showPerspective(ApplicationPerspectives.java:128)
            at com.rapidminer.gui.ApplicationPerspectives.showPerspective(ApplicationPerspectives.java:274)
            at com.rapidminer.gui.MainFrame.<init>(MainFrame.java:902)
            at com.rapidminer.gui.RapidMinerGUI$1.run(RapidMinerGUI.java:255)
            at java.awt.event.InvocationEvent.dispatch(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$200(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi,
    srt19170 wrote:


    That assumption is correct.  But on Windows, %HOMEPATH% ends in a backslash, e.g.,
    HOMEPATH=\
    So the way you use %HOMEPATH% in the scripts will cause an error.  You should instead write this:
    set CHECK_VERSION_FILE="%HOMEPATH%check_rm_java_version"
    Strange, my %HOMEPATH% variable does not end with a backslash. For me 'echo %HOMEPATH%' outputs '\User\NAME'.
    Wikipedia and other pages also  state that the %HOMEPATH% variable does not  end with a backslash (http://en.wikipedia.org/wiki/Environment_variable, http://environmentvariables.org/HomePath).
    Because this will be the case most of the time we won't change the script here. If it is not working for you, please remove the backslash and it should work afterwards.
    srt19170 wrote:

    Any comment on the problem with com.rapidminer.RapidMinerCommandLine requiring a process file?  Have you tried running either of the scripts on a Windows machine under 5.3?  Do they work for you?
    Yes the scripts work for me. To start the RapidMiner GUI just call RapidMinerGUI.bat from within the scirpts folder without any more parameters.
    If you want to run a process without the GUI, run rapidminer.bat and provide the correct paramters.

    Best,
    Nils
  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Also fixed the error when starting RapidMinerGUI.bat with a process argument. With the next release 5.3.1 you can run the RapidMinerGUI.bat script like this:

    RapidMinerGUI.bat //Repository/path/to/object
    Best,
    Nils
  • srt19170srt19170 Member Posts: 44 Contributor II
    Nils wrote:

    Strange, my %HOMEPATH% variable does not end with a backslash. For me 'echo %HOMEPATH%' outputs '\User\NAME'.
    Wikipedia and other pages also  state that the %HOMEPATH% variable does not  end with a backslash (http://en.wikipedia.org/wiki/Environment_variable, http://environmentvariables.org/HomePath).
    Because this will be the case most of the time we won't change the script here. If it is not working for you, please remove the backslash and it should work afterwards.
    Fair enough.  It looks like our Windows machines here are set up incorrectly wrt HOMEPATH. 

    In another thread, Marius pointed out that starting the scripts in the scripts directory without setting RAPIDMINER_HOME wouldn't work, and that might also be the source of some of my problems.  My suggestion would be that the RapidMiner installation on Windows set the RAPIDMINER_HOME environment variable.

    Otherwise, I think you've addressed all my issues, so I'll mark this solved.  Thanks for your patience!
  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    On Windows you can start RapidMiner without setting RAPIDMINER_HOME if you start it from within the scripts folder. But setting RAPIDMINER_HOME when installing the .exe is a good idea.
    I've opened an internal issue for that.

    Thanks,
    Nils
  • srt19170srt19170 Member Posts: 44 Contributor II
    Let me re-open this topic momentarily.

    Some investigation suggests that %HOMEPATH% can be legitimately set to "\" (or something similar) in Windows.  For example, see this discussion:

    http://serverfault.com/questions/85713/when-would-the-windows-environment-variable-be-homepath

    I can't find any direct discussion of it on Microsoft's tech support, but it's at least mentioned in this discussion:

    http://support.microsoft.com/kb/236813

    under the Windows 2000 section.  It seems that when a user's home directory is on a shared server, you can end up with HOMEPATH=\.

    I believe the correct solution is to use %USERPROFILE% instead of %HOMEPATH%.  So in the script files you would say:

    set CHECK_VERSION_FILE="%USERPROFILE%\check_rm_java_version"

    This should be more reliable than what you're currently doing.

    If you do continue to use %HOMEPATH% you should really use %HOMEDRIVE% as well, since your scripts will likely fail for someone whose HOMEDRIVE is not the current drive of the shell running the script.
  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi again,

    thanks for these valuable information. With this findings we probably should change the environment variable.
    And having a closer look I think %APPDATA% is the best and savest choice to make.
    Would you be so kind to test if it also works on your environment?

    Best,
    Nils
  • srt19170srt19170 Member Posts: 44 Contributor II
    %APPDATA% would work on my machine.  %TEMP% or %TMP% would probably be reasonable choices as well.
  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    You're right, this would also make sense. But I think we will stick with %APPDATA% for now.

    Best,
    Nils
Sign In or Register to comment.