"[SOLVED]:RapidMiner Integration with Java"

keshr3106keshr3106 MemberPosts:12Contributor I
edited June 2019 inHelp
Hello,

I need to run a RapidMiner process in Java. Like explained in this link :http://stackoverflow.com/questions/15834182/integration-of-rapidminer-in-java-application,

import com.rapidminer.Process;
import com.rapidminer.RapidMiner;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.io.ExcelExampleSource;
import com.rapidminer.tools.XMLException;
import java.io.File;
import java.io.IOException;
import java.lang.Object;

public class ReadRapidminerProcess {
public static void main(String[] args) {
try {

RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
RapidMiner.init();

Process process = new Process(new File("C:\\Users\\Keshav\\.RapidMiner5\\repositories\\Local Repository\\lsvmtest.rmp"));
process.run();

} catch (IOException | XMLException | OperatorException ex) {
ex.printStackTrace();
}
}
}

I run the above code. The code compiled but gave following error during its run:


Mar 28, 2014 3:05:23 AM com.rapidminer.tools.ParameterService init
INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
Mar 28, 2014 3:05:23 AM com.rapidminer.tools.I18N
INFO: Set locale to en.
Mar 28, 2014 3:05:23 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Property rapidminer.home is not set. Guessing.
Mar 28, 2014 3:05:23 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying base directory of classes (build) 'null'...failed
Mar 28, 2014 3:05:23 AM com.rapid_i.deployment.update.client.ManagedExtension readConfiguration
WARNING: Failed to read global extension state: java.io.IOException: Property rapidminer.home is not set
java.io.IOException: Property rapidminer.home is not set
at com.rapidminer.tools.FileSystemService.getRapidMinerHome(FileSystemService.java:93)
at com.rapidminer.tools.FileSystemService.getLibraryFile(FileSystemService.java:99)
at com.rapidminer.tools.plugin.Plugin.getPluginLocation(Plugin.java:1113)
at com.rapid_i.deployment.update.client.ManagedExtension.getGlobalExtensionsDir(ManagedExtension.java:172)
at com.rapid_i.deployment.update.client.ManagedExtension.readConfiguration(ManagedExtension.java:257)
at com.rapid_i.deployment.update.client.ManagedExtension.init(ManagedExtension.java:349)
at com.rapidminer.tools.plugin.Plugin.initAll(Plugin.java:941)
at com.rapidminer.RapidMiner.init(RapidMiner.java:550)
at ReadRapidminerProcess.main(ReadRapidminerProcess.java:16)
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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 28, 2014 3:05:23 AM com.rapidminer.tools.plugin.Plugin initAll
WARNING: None of the properties rapidminer.init.plugins and rapidminer.home is set. No globally installed plugins will be loaded.
Mar 28, 2014 3:05:23 AM com.rapid_i.deployment.update.client.ManagedExtension getManagedExtensionsDirectories
WARNING: None of the properties rapidminer.init.plugins and rapidminer.home is set. No globally installed extensions will be loaded.
Mar 28, 2014 3:05:23 AM com.rapid_i.deployment.update.client.ManagedExtension getManagedExtensionsDirectories
WARNING: None of the properties rapidminer.init.plugins and rapidminer.home is set. No globally installed extensions will be loaded.
Mar 28, 2014 3:05:23 AM com.rapidminer.tools.plugin.Plugin registerPlugins
INFO: Register plugin: Text Processing
Mar 28, 2014 3:05:23 AM com.rapidminer.tools.plugin.Plugin registerPlugins
INFO: Register plugin: Web Mining
Mar 28, 2014 3:05:25 AM com.rapidminer.tools.OperatorService parseOperators
严重:注册失败接线员:RapidMiner有限公司re : hierarchical_classification
java.lang.AssertionError
at com.rapidminer.operator.ports.impl.AbstractInputPort.receiveMD(AbstractInputPort.java:80)
at com.rapidminer.operator.ports.metadata.ExampleSetPrecondition.assumeSatisfied(ExampleSetPrecondition.java:86)
at com.rapidminer.operator.Operator.assumePreconditionsSatisfied(Operator.java:2130)
at com.rapidminer.operator.OperatorChain.assumePreconditionsSatisfied(OperatorChain.java:502)
at com.rapidminer.tools.OperatorService.registerOperator(OperatorService.java:520)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:301)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:269)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:231)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:204)
at com.rapidminer.tools.OperatorService.init(OperatorService.java:133)
at com.rapidminer.RapidMiner.init(RapidMiner.java:559)
at ReadRapidminerProcess.main(ReadRapidminerProcess.java:16)
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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 28, 2014 3:05:25 AM com.rapidminer.tools.OperatorService parseOperators
严重:注册失败接线员:RapidMiner有限公司re : fixedsplitvalidation
java.lang.AssertionError
at com.rapidminer.operator.ports.impl.AbstractInputPort.receiveMD(AbstractInputPort.java:80)
at com.rapidminer.operator.ports.metadata.SimplePrecondition.assumeSatisfied(SimplePrecondition.java:90)
at com.rapidminer.operator.Operator.assumePreconditionsSatisfied(Operator.java:2130)
at com.rapidminer.operator.OperatorChain.assumePreconditionsSatisfied(OperatorChain.java:502)
at com.rapidminer.tools.OperatorService.registerOperator(OperatorService.java:520)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:301)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:269)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:231)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:204)
at com.rapidminer.tools.OperatorService.init(OperatorService.java:133)
at com.rapidminer.RapidMiner.init(RapidMiner.java:559)
at ReadRapidminerProcess.main(ReadRapidminerProcess.java:16)
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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 28, 2014 3:05:25 AM com.rapidminer.tools.OperatorService parseOperators
严重:注册失败接线员:RapidMiner有限公司re : conditionedfeaturegeneration
java.lang.AssertionError
at com.rapidminer.operator.ports.impl.AbstractInputPort.receiveMD(AbstractInputPort.java:80)
at com.rapidminer.operator.ports.metadata.SimplePrecondition.assumeSatisfied(SimplePrecondition.java:90)
at com.rapidminer.operator.Operator.assumePreconditionsSatisfied(Operator.java:2130)
at com.rapidminer.tools.OperatorService.registerOperator(OperatorService.java:520)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:301)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:293)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:269)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:231)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:204)
at com.rapidminer.tools.OperatorService.init(OperatorService.java:133)
at com.rapidminer.RapidMiner.init(RapidMiner.java:559)
at ReadRapidminerProcess.main(ReadRapidminerProcess.java:16)
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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Can someone please help out with the code?

Regards,
Keshav
PS: The amount of errors displayed was very large - due to the space constraint of 20,000 characters,I pasted only a part of the error message.
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University ProfessorPosts:1,984RM Engineering
    Hi,

    disable assertions, they are not being maintained and will cause useless errors.

    Regards,
    Marco
  • keshr3106keshr3106 MemberPosts:12Contributor I
    Hello,

    I disabled assertions and I still get some errors though it has reduced.

    Mar 28, 2014 10:19:52 PM com.rapidminer.tools.ParameterService init
    INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
    Mar 28, 2014 10:19:52 PM com.rapidminer.tools.I18N
    INFO: Set locale to en.
    Mar 28, 2014 10:19:52 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Property rapidminer.home is not set. Guessing.
    Mar 28, 2014 10:19:52 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Trying base directory of classes (build) 'null'...failed
    Mar 28, 2014 10:19:52 PM com.rapid_i.deployment.update.client.ManagedExtension readConfiguration
    WARNING: Failed to read global extension state: java.io.IOException: Property rapidminer.home is not set
    java.io.IOException: Property rapidminer.home is not set
    at com.rapidminer.tools.FileSystemService.getRapidMinerHome(FileSystemService.java:93)
    at com.rapidminer.tools.FileSystemService.getLibraryFile(FileSystemService.java:99)
    at com.rapidminer.tools.plugin.Plugin.getPluginLocation(Plugin.java:1113)
    at com.rapid_i.deployment.update.client.ManagedExtension.getGlobalExtensionsDir(ManagedExtension.java:172)
    at com.rapid_i.deployment.update.client.ManagedExtension.readConfiguration(ManagedExtension.java:257)
    at com.rapid_i.deployment.update.client.ManagedExtension.init(ManagedExtension.java:349)
    at com.rapidminer.tools.plugin.Plugin.initAll(Plugin.java:941)
    at com.rapidminer.RapidMiner.init(RapidMiner.java:550)
    at ReadRapidminerProcess.main(ReadRapidminerProcess.java:16)
    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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
    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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
    at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
    at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
    at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
    at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
    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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Mar 28, 2014 10:19:52 PM com.rapidminer.tools.plugin.Plugin initAll
    WARNING: None of the properties rapidminer.init.plugins and rapidminer.home is set. No globally installed plugins will be loaded.
    Mar 28, 2014 10:19:52 PM com.rapid_i.deployment.update.client.ManagedExtension getManagedExtensionsDirectories
    WARNING: None of the properties rapidminer.init.plugins and rapidminer.home is set. No globally installed extensions will be loaded.
    Mar 28, 2014 10:19:52 PM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Text Processing
    Mar 28, 2014 10:19:55 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory
    INFO: Default version of expression parser registered successfully
    Mar 28, 2014 10:19:56 PM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Mar 28, 2014 10:19:57 PM com.rapidminer.tools.OperatorService init
    INFO: Number of registered operator classes: 494; number of registered operator descriptions: 495; number of replacements: 432
    Mar 28, 2014 10:19:58 PM com.rapidminer.tools.jdbc.JDBCProperties
    WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
    Mar 28, 2014 10:19:58 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    [Fatal Error] :1:1: Premature end of file.
    Mar 28, 2014 10:19:58 PM com.rapidminer.tools.WrapperLoggingHandler log
    INFO: No filename given for result file, using stdout for logging results!
    Mar 28, 2014 10:19:58 PM com.rapidminer.Process run
    INFO: Process C:\Users\Keshav\.RapidMiner5\repositories\Local Repository\linsvmtest.rmp starts
    com.rapidminer.operator.UserError: Cannot resolve relative repository location 'lsvmword'. Process is not associated with a repository.
    at com.rapidminer.Process.resolveRepositoryLocation(Process.java:1248)
    at com.rapidminer.operator.Operator.getParameterAsRepositoryLocation(Operator.java:1456)
    at com.rapidminer.operator.io.RepositorySource.getRepositoryEntry(RepositorySource.java:91)
    at com.rapidminer.operator.io.RepositorySource.read(RepositorySource.java:105)
    at com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:126)
    at com.rapidminer.operator.Operator.execute(Operator.java:867)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:375)
    at com.rapidminer.operator.Operator.execute(Operator.java:867)
    at com.rapidminer.Process.run(Process.java:949)
    at com.rapidminer.Process.run(Process.java:873)
    at com.rapidminer.Process.run(Process.java:832)
    at com.rapidminer.Process.run(Process.java:827)
    at com.rapidminer.Process.run(Process.java:817)
    at ReadRapidminerProcess.main(ReadRapidminerProcess.java:19)
    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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
    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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
    at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
    at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
    at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
    at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
    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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    >
    What changes must I make to the code? Where am I going wrong? Please help.

    From,

    Keshav
  • keshr3106keshr3106 MemberPosts:12Contributor I
    Update:
    After disabling assertions, I set right the rapidminer.home error by adding this line of code:

    System.setProperty(“rapidminer。家”、“C: \\Program Files (x86)\\Rapid-I\\RapidMiner5");
    Now, the following error alone exists:


    Welcome to DrJava. Working directory is C:\Users\Keshav\Documents
    > run ReadRapidminerProcess
    Mar 29, 2014 10:08:16 AM com.rapidminer.tools.ParameterService init
    INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
    Mar 29, 2014 10:08:16 AM com.rapidminer.tools.I18N
    INFO: Set locale to en.
    Mar 29, 2014 10:08:16 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: rapidminer.home is 'C:\Program Files (x86)\Rapid-I\RapidMiner5'.
    Mar 29, 2014 10:08:16 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Text Processing
    Mar 29, 2014 10:08:20 AM com.rapidminer.tools.expression.parser.ExpressionParserFactory
    INFO: Default version of expression parser registered successfully
    Mar 29, 2014 10:08:21 AM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Mar 29, 2014 10:08:23 AM com.rapidminer.tools.OperatorService init
    INFO: Number of registered operator classes: 494; number of registered operator descriptions: 495; number of replacements: 432
    Mar 29, 2014 10:08:24 AM com.rapidminer.tools.jdbc.JDBCProperties
    WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
    Mar 29, 2014 10:08:24 AM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    [Fatal Error] :1:1: Premature end of file.
    Mar 29, 2014 10:08:24 AM com.rapidminer.tools.WrapperLoggingHandler log
    INFO: No filename given for result file, using stdout for logging results!
    Mar 29, 2014 10:08:24 AM com.rapidminer.Process run
    INFO: Process C:\Users\Keshav\.RapidMiner5\repositories\Local Repository\linsvmtest.rmp starts
    com.rapidminer.operator.UserError: Cannot resolve relative repository location 'lsvmword'. Process is not associated with a repository.
    at com.rapidminer.Process.resolveRepositoryLocation(Process.java:1248)
    at com.rapidminer.operator.Operator.getParameterAsRepositoryLocation(Operator.java:1456)
    at com.rapidminer.operator.io.RepositorySource.getRepositoryEntry(RepositorySource.java:91)
    at com.rapidminer.operator.io.RepositorySource.read(RepositorySource.java:105)
    at com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:126)
    at com.rapidminer.operator.Operator.execute(Operator.java:867)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:375)
    at com.rapidminer.operator.Operator.execute(Operator.java:867)
    at com.rapidminer.Process.run(Process.java:949)
    at com.rapidminer.Process.run(Process.java:873)
    at com.rapidminer.Process.run(Process.java:832)
    at com.rapidminer.Process.run(Process.java:827)
    at com.rapidminer.Process.run(Process.java:817)
    at ReadRapidminerProcess.main(ReadRapidminerProcess.java:21)
    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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
    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 edu.rice.cs.dynamicjava.symbol.JavaClass$JavaMethod.evaluate(JavaClass.java:362)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.handleMethodCall(ExpressionEvaluator.java:92)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.visit(ExpressionEvaluator.java:84)
    at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:121)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:38)
    at edu.rice.cs.dynamicjava.interpreter.ExpressionEvaluator.value(ExpressionEvaluator.java:37)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:106)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.visit(StatementEvaluator.java:29)
    at koala.dynamicjava.tree.ExpressionStatement.acceptVisitor(ExpressionStatement.java:101)
    at edu.rice.cs.dynamicjava.interpreter.StatementEvaluator.evaluateSequence(StatementEvaluator.java:66)
    at edu.rice.cs.dynamicjava.interpreter.Interpreter.evaluate(Interpreter.java:77)
    at edu.rice.cs.dynamicjava.interpreter.Interpreter.interpret(Interpreter.java:47)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:246)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM.interpret(InterpreterJVM.java:220)
    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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    How to deal with this error?

    Regards,

    Keshav
  • keshr3106keshr3106 MemberPosts:12Contributor I
    UPDATE:
    Made some modifications to the code.

    public class ReadRapidminerProcess {
    public static void main(String[] args) {
    try {

    RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
    System.setProperty(“rapidminer。家”、“C: \\Program Files (x86)\\Rapid-I\\RapidMiner5");
    RapidMiner.init();
    RepositoryLocation loc = new RepositoryLocation("//Local Repository/linsvmtest");
    IOObjectEntry entry = (IOObjectEntry) loc.locateEntry();
    Process process = new Process(new File("C:\\Users\\Keshav\\.RapidMiner5\\repositories\\Local Repository\\linsvmtest.rmp"));
    process.run();

    }
    catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (XMLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (OperatorException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    catch (RepositoryException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }
    }
    The previous 'Process is not associated with a repository.' error is set right but I get the following error:



    Mar 30, 2014 3:04:04 AM com.rapidminer.tools.ParameterService init
    INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
    Mar 30, 2014 3:04:04 AM com.rapidminer.tools.I18N
    INFO: Set locale to en.
    Mar 30, 2014 3:04:04 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: rapidminer.home is 'C:\Program Files (x86)\Rapid-I\RapidMiner5'.
    Mar 30, 2014 3:04:04 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Text Processing
    Mar 30, 2014 3:04:07 AM com.rapidminer.tools.expression.parser.ExpressionParserFactory
    INFO: Default version of expression parser registered successfully
    Mar 30, 2014 3:04:08 AM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Mar 30, 2014 3:04:10 AM com.rapidminer.tools.OperatorService init
    INFO: Number of registered operator classes: 494; number of registered operator descriptions: 495; number of replacements: 432
    Mar 30, 2014 3:04:11 AM com.rapidminer.tools.jdbc.JDBCProperties
    WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
    Mar 30, 2014 3:04:11 AM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    [Fatal Error] :1:1: Premature end of file.
    java.lang.ClassCastException: com.rapidminer.repository.local.SimpleProcessEntry cannot be cast to com.rapidminer.repository.IOObjectEntry
    at ReadRapidminerProcess.main(ReadRapidminerProcess.java:28)
    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 edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)

    XML Code:





    < output/>


    < operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">

    < operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">


    < operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve (2)" width="90" x="179" y="30">


    < operator activated="true" class="text:process_document_from_file" compatibility="5.3.002" expanded="true" height="76" name="Process Documents from Files" width="90" x="45" y="120">





    < operator activated="true" class="text:tokenize" compatibility="5.3.002" expanded="true" height="60" name="Tokenize" width="90" x="45" y="30"/>
    < operator activated="true" class="text:filter_by_length" compatibility="5.3.002" expanded="true" height="60" name="Filter Tokens (by Length)" width="90" x="179" y="120"/>
    < operator activated="true" class="text:stem_porter" compatibility="5.3.002" expanded="true" height="60" name="Stem (Porter)" width="90" x="313" y="210"/>
    < operator activated="true" class="text:filter_stopwords_english" compatibility="5.3.002" expanded="true" height="60" name="Filter Stopwords (English)" width="90" x="447" y="300"/>








    < /公关ocess>

    <运营商激活= " true " class = " apply_model“compatibility="5.3.013" expanded="true" height="76" name="Apply Model" width="90" x="179" y="120">


    < operator activated="true" class="select_attributes" compatibility="5.3.013" expanded="true" height="76" name="Select Attributes" width="90" x="313" y="75">



    < operator activated="true" class="write_csv" compatibility="5.3.013" expanded="true" height="76" name="Write CSV" width="90" x="447" y="75">



    < operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve (3)" width="90" x="45" y="210">


    < operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve (4)" width="90" x="179" y="210">


    < operator activated="true" class="text:process_document_from_file" compatibility="5.3.002" expanded="true" height="76" name="Process Documents from Files (2)" width="90" x="45" y="300">





    < operator activated="true" class="text:tokenize" compatibility="5.3.002" expanded="true" name="Tokenize (2)"/>
    < operator activated="true" class="text:filter_by_length" compatibility="5.3.002" expanded="true" name="Filter Tokens (2)"/>
    < operator activated="true" class="text:stem_porter" compatibility="5.3.002" expanded="true" name="Stem (2)"/>
    < operator activated="true" class="text:filter_stopwords_english" compatibility="5.3.002" expanded="true" name="Filter Stopwords (2)"/>








    < /公关ocess>

    <运营商激活= " true " class = " apply_model“compatibility="5.3.013" expanded="true" height="76" name="Apply Model (2)" width="90" x="179" y="300">


    < operator activated="true" class="select_attributes" compatibility="5.3.013" expanded="true" height="76" name="Select Attributes (2)" width="90" x="313" y="255">



    < operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve (5)" width="90" x="45" y="390">


    < operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve (6)" width="90" x="179" y="390">


    < operator activated="true" class="text:process_document_from_file" compatibility="5.3.002" expanded="true" height="76" name="Process Documents from Files (3)" width="90" x="45" y="480">





    < operator activated="true" class="text:tokenize" compatibility="5.3.002" expanded="true" name="Tokenize (3)"/>
    < operator activated="true" class="text:filter_by_length" compatibility="5.3.002" expanded="true" name="Filter Tokens (3)"/>
    < operator activated="true" class="text:stem_porter" compatibility="5.3.002" expanded="true" name="Stem (3)"/>
    < operator activated="true" class="text:filter_stopwords_english" compatibility="5.3.002" expanded="true" name="Filter Stopwords (3)"/>



    <连接from_op = "杆(3)“from_port t =“文档”o_op="Filter Stopwords (3)" to_port="document"/>




    < /公关ocess>

    <运营商激活= " true " class = " apply_model“compatibility="5.3.013" expanded="true" height="76" name="Apply Model (3)" width="90" x="179" y="480">


    < operator activated="true" class="select_attributes" compatibility="5.3.013" expanded="true" height="76" name="Select Attributes (3)" width="90" x="313" y="435">



    < operator activated="true" class="write_csv" compatibility="5.3.013" expanded="true" height="76" name="Write CSV (2)" width="90" x="447" y="255">



    < operator activated="true" class="write_csv" compatibility="5.3.013" expanded="true" height="76" name="Write CSV (3)" width="90" x="447" y="435">
























    < portSpacing端口= " sink_result 3”间隔= " 0 " / >

    < /公关ocess>

    < /公关ocess>
    Any help on how to deal with this?

    Regards,
    Keshav
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University ProfessorPosts:1,984RM Engineering
    Hi,

    you are doing the following:

    IOObjectEntry entry = (IOObjectEntry) loc.locateEntry();
    however when you call locateEntry() on a repository location where a process lies, you will recieve a SimpleProcessEntry instead. This is why you are getting the ClassCastException.

    Regards,
    Marco
  • keshr3106keshr3106 MemberPosts:12Contributor I
    Okay...can you please tell what change in the code should I make ?

    from,
    Keshav
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University ProfessorPosts:1,984RM Engineering
    Hi,

    you can use the following snippet to load a process from a known repository and location:

    Repository repo = RepositoryManager.getInstance(null).getRepository("Local Repository");
    RepositoryProcessLocation processLocation = new RepositoryProcessLocation(new RepositoryLocation(repo.getLocation(), "nameOfMyProcess"));
    Process process = processLocation.load(null);
    process.run();
    Note that you can load processes from other sources as well, e.g. a File or the XML string representation.

    Regards,
    Marco
  • keshr3106keshr3106 MemberPosts:12Contributor I
    Hello,

    I implemented the code as directed:


    import com.rapidminer.Process;
    import com.rapidminer.RapidMiner;
    import com.rapidminer.operator.Operator;
    import com.rapidminer.operator.OperatorException;
    import com.rapidminer.operator.io.ExcelExampleSource;
    import com.rapidminer.tools.XMLException;
    import java.io.File;
    import java.io.IOException;
    import java.lang.Object;
    import com.rapidminer.repository.RepositoryLocation;
    import com.rapidminer.repository.RepositoryException;
    import com.rapidminer.repository.IOObjectEntry;
    import com.rapidminer.repository.RepositoryManager;
    import com.rapidminer.RepositoryProcessLocation;


    public class ReadRapidminerProcess {
    public static void main(String[] args) {
    try {

    RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
    System.setProperty(“rapidminer。家”、“C: \\Program Files (x86)\\Rapid-I\\RapidMiner5");
    RapidMiner.init();
    /*
    RepositoryLocation loc = new RepositoryLocation("//Local Repository/linsvmtest");
    IOObjectEntry entry = (IOObjectEntry) loc.locateEntry();
    Process process = new Process(new File("C:\\Users\\Goutham\\.RapidMiner5\\repositories\\Local Repository\\linsvmtest.rmp"));
    process.run();
    */
    Repository repo = RepositoryManager.getInstance(null).getRepository("Local Repository");
    RepositoryProcessLocation processLocation = new RepositoryProcessLocation(new RepositoryLocation(repo.getLocation(), "linsvmtest"));
    Process process = processLocation.load(null);
    process.run();

    }
    catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (XMLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (OperatorException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    catch (RepositoryException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }
    }
    然而,我无法编译它。(drjava)

    Compiler Output:

    Error: cannot find symbol
    symbol: class Repository
    location: class ReadRapidminerProcess
    Can you please tell me what should I import to remove this error? Where is the class Repository found?

    Thank you very much for your prompt replies!

    Regards,

    Keshav
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University ProfessorPosts:1,984RM Engineering
    Hi,

    Repository is an interface in the package com.rapidminer.repository in the main RapidMiner Studio project.

    Regards,
    Marco
  • keshr3106keshr3106 MemberPosts:12Contributor I
    Hello,

    It works properly now.I am now able to successfully integrate RapidMiner and Java!

    Thank you very much for your help!

    Regards,

    Keshav
  • skywlkrskywlkr MemberPosts:1Contributor I

    Is there any way to get the JAR? I am already scouring the net and could not obtain it.

Sign InorRegisterto comment.