Exception in thread "main" com.rapidminer.operator.UserError

Fireholder
Fireholder New Altair Community Member
edited November 5 in Community Q&A
I have following Eclipse program:
import com.rapidminer.tools.OperatorService;
import com.rapidminer.RapidMiner;
import com.rapidminer.Process;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.IOContainer;
import java.io.IOException;
import java.io.File;
public class FirstClass {
static File x=new File ("/home/prakt/workspace-rapidminer/Project/FirstProcess.rmp");
public static void main(String[] argv) throws Exception {
 
  RapidMiner.init();
 
 
  Process process = new Process(x);
    process.run();
}

}
I have tried to run the code but encountered several  errors like:

Exception in thread "main" com.rapidminer.operator.UserError: Cannot retrieve repository data from entry '//NewLocalRepository/Project/Golf'. Reason: Requested repository NewLocalRepository does not exist..
at com.rapidminer.Process.loadInitialData(Process.java:726)
at com.rapidminer.Process.run(Process.java:878)
at com.rapidminer.Process.run(Process.java:797)
at com.rapidminer.Process.run(Process.java:792)
at com.rapidminer.Process.run(Process.java:782)
at FirstClass.main(FirstClass.java:22)
Caused by: com.rapidminer.repository.RepositoryException: Requested repository NewLocalRepository does not exist.
at com.rapidminer.repository.RepositoryManager.getRepository(RepositoryManager.java:180)
at com.rapidminer.repository.RepositoryLocation.getRepository(RepositoryLocation.java:143)
at com.rapidminer.repository.RepositoryLocation.locateEntry(RepositoryLocation.java:163)
at com.rapidminer.Process.loadInitialData(Process.java:714)
... 5 more
Tagged:

Answers

  • colo
    colo New Altair Community Member
    Hi Fireholder,

    since I've been doing some integration testing for a few days I should be able to help you with that.
    It seems that repositories are not available but looking for the reason could have been easy if I had really payed more attention to all of the initialitzation messages before.

    One line said:
    Apr 19, 2011 10:54:26 AM com.rapidminer.repository.RepositoryManager load
    INFO: Cannot access file system in execution mode UNKNOWN. Not loading repositories.
    So you just have to set the ExecutionMode before you call RapidMiner.init() like this:
    RapidMiner.setExecutionMode(ExecutionMode.EMBEDDED_WITHOUT_UI);
    But don't ask how the available modes differ or which one really makes sense. Didn't notice any relevant difference between the EMBEDDED ones or COMMAND_LINE so far. But I am still doing the first steps, so this doesn't have to mean anything...

    Regards
    Matthias
  • Fireholder
    Fireholder New Altair Community Member
    Thank u a lot, program runs now at least.:)U made my day.



    Regards,Fireholder
  • Fireholder
    Fireholder New Altair Community Member
    And 1 more thing, how to run my program not in a command line mode but with RM GUI?



    rgrds, Fire
  • colo
    colo New Altair Community Member
    By starting the GUI directly and load the process!?  ;)

    ExecutionMode.UI should do this:
    UI
    RM is executed using RapidMinerGUI.main(String[]).
    Regards
    Matthias