Exception in thread "main" com.rapidminer.operator.UserError
Fireholder
New Altair Community Member
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
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:
0
Answers
-
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
So you just have to set the ExecutionMode before you call RapidMiner.init() like this:
INFO: Cannot access file system in execution mode UNKNOWN. Not loading repositories.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
Matthias0 -
Thank u a lot, program runs now at least.:)U made my day.
Regards,Fireholder0 -
And 1 more thing, how to run my program not in a command line mode but with RM GUI?
rgrds, Fire0 -
By starting the GUI directly and load the process!?
ExecutionMode.UI should do this:UI
Regards
RM is executed using RapidMinerGUI.main(String[]).
Matthias0