"Cannot find main operator description file OperatorsCore.xml"

sunshine
sunshine New Altair Community Member
edited November 5 in Community Q&A
Hi, I am a newbie to RapidMiner, and trying execute simple Java app.
I want to import "operators.xml" which I generated before but I get the followin error:
SEVERE: Cannot find main operator description file com/rapidminer/resources/ OperatorsCore.xml.
my source code is as follows: 

import com.rapidminer.RapidMiner;
import com.rapidminer.RapidMiner.ExecutionMode;
import com.rapidminer.RepositoryProcessLocation;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.IOObject;
import com.rapidminer.operator.Operator;
import com.rapidminer.repository.Entry;
import com.rapidminer.repository.ProcessEntry;
import com.rapidminer.repository.RepositoryLocation;
import com.rapidminer.Process;
import com.rapidminer.tools.OperatorService;

public class DBReader {

RepositoryLocation location;

public DBReader() {
System.setProperty("rapidminer.init.operators",".../operatros");
System.setProperty("rapidminer.home",".../rapidminer");
System.setProperty(RapidMiner.PROPERTY_RAPIDMINER_INIT_OPERATORS, ".../OperatorsCore.xml");
RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.EMBEDDED_WITH_UI);
RapidMiner.init();
Process process = new Process();
try {
location = new RepositoryLocation(".../operatros");
Entry entry = location.locateEntry();
System.out.println(OperatorService.getOperatorDescription("read_database").getName());
    Operator inputOperator = OperatorService.createOperator("Read Database");

}
catch(Exception e) {
}
}

public static void main(String[] args) {
new DBReader();
}

}

Can you please help me.

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    is there any particular reason why you are not using the suggested method as described here?

    Regards,
    Marco
  • sunshine
    sunshine New Altair Community Member
    Hi Marco,

    Thanks for the reply, I read it already.

    I was trying to follow the approach you described before in this forum.
    1. Design the processes in RapidMiner GUI. - created classification model.
    Now I want apply to new data from database in my app.
    2. Again, for this created process in GUI. Saved to my repository.
    3. Now trying to Execute it via process.run()

    But not sure how to load this process via java?
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    there are quite a few ways this can be done, for example like that.

    Regards,
    Marco