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
Cannot resolve relative repository. Process is not associated with a repository
Hi, Im new in using RM integrating to java.
My java app got this error while trying to open the process that reads my naive bayes model file:
Both my Naive bayes file and TESTING_NB.rmp is both in the Local Directory.
Error prompt:
com.rapidminer.operator.UserError: Cannot resolve relative repository "MODEL_NB". Process is not associated with a repository
try {
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
RapidMiner.init();
String path = "C:\\Users\\MC\\.RapidMiner\\repositories\\Local Repository\\TESTING_NB.rmp";
Process process = new Process(new File(path));
Operator op = process.getOperator("Read Excel");
op.setParameter(ExcelExampleSource.PARAMETER_EXCEL_FILE, jTextField1.getText());
FileObject file = new SimpleFileObject(new File(path));
IOContainer input = new IOContainer(file);
IOContainer ioResult = process.run();
...................//and soo on
Your help is much appreciated.
My java app got this error while trying to open the process that reads my naive bayes model file:
Both my Naive bayes file and TESTING_NB.rmp is both in the Local Directory.
Error prompt:
com.rapidminer.operator.UserError: Cannot resolve relative repository "MODEL_NB". Process is not associated with a repository
try {
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
RapidMiner.init();
String path = "C:\\Users\\MC\\.RapidMiner\\repositories\\Local Repository\\TESTING_NB.rmp";
Process process = new Process(new File(path));
Operator op = process.getOperator("Read Excel");
op.setParameter(ExcelExampleSource.PARAMETER_EXCEL_FILE, jTextField1.getText());
FileObject file = new SimpleFileObject(new File(path));
IOContainer input = new IOContainer(file);
IOContainer ioResult = process.run();
...................//and soo on
Your help is much appreciated.
Tagged:
0
Answers
you are trying to execute a process which is saved in a repository and makes use of relative paths within said repository. So your created process must be associated to the repository in the code or it won't be able to resolve relative paths.
An example on how to do this can be found in question 5) of the FAQ: http://rapid-i.com/rapidforum/index.php/topic,5807.0.html
Regards,
Marco