"Problems with extension rapidminer in Java"

anonimoper
anonimoper New Altair Community Member
edited November 5 in Community Q&A
Hi, i have a problem, i can't to execute a plugin of rapidminer. The plugins is /RapidMiner/lib/plugins/rapidminer-Text Processing-5.1.001.jar

This is the code:

import com.rapidminer.RapidMiner;
import com.rapidminer.Process;
import com.rapidminer.example.Attribute;
import com.rapidminer.example.Example;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.IOObject;
import com.rapidminer.operator.Operator;
import com.rapidminer.operator.OperatorException;



import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import com.rapidminer.operator.io.ExcelExampleSource;
import com.rapidminer.repository.IOObjectEntry;
import com.rapidminer.repository.ProcessEntry;
import com.rapidminer.repository.RepositoryLocation;
import com.rapidminer.tools.XMLException;

public class Prueba {

public static void main(String args[]) throws OperatorException, IOException, XMLException {

    RapidMiner.setExecutionMode(RapidMiner.ExecutionMode.COMMAND_LINE);
   
    RapidMiner.init();
   
    Process location = new Process(new File("C:\\Users\\lDanny\\.RapidMiner5\\repositories\\Local Repository\\PrimeraVez.rmp"));
    IOContainer resultExample = location.run();
    System.out.println(resultExample.toString());
System.out.println("am here");
}
}
and this is error:

Exception in thread "main" com.rapidminer.operator.UserError: The dummy operator Process Documents from Data (replacing text:process_document_from_data) cannot be executed.
at com.rapidminer.operator.DummyOperator.doWork(DummyOperator.java:88)
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 fdf.Prueba.main(Prueba.java:34)
I tryn to add  <property name="extension.dependencies" value="lib/plugins/rapidminer-Text Processing-5.1.001.jar" /> in build.xml but i have the same error.

Thanks.

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    1) That extension looks mighty old. Please use the 5.3.x version of it.
    2) If it still does nto work, please post the full log when you execute your application.

    Regards,
    Marco
  • anonimoper
    anonimoper New Altair Community Member
    Hi, ok noew i use the 5.3.0001 version. But i have the same error.

    Log:

    abr 08, 2014 7:20:44 PM com.rapidminer.tools.ParameterService init
    Información: Reading configuration resource com/rapidminer/resources/rapidminerrc.
    Apr 08, 2014 7:20:44 PM com.rapidminer.tools.I18N <clinit>
    Información: Set locale to en.
    Apr 08, 2014 7:20:44 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    Información: Property rapidminer.home is not set. Guessing.
    Apr 08, 2014 7:20:44 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    Información: Trying base directory of classes (build) 'C:\Users\lDanny\workspace\fdf'...gotcha!
    Apr 08, 2014 7:20:44 PM com.rapidminer.tools.plugin.Plugin registerPlugins
    Información: Register plugin: recommenders
    Apr 08, 2014 7:20:44 PM com.rapidminer.tools.plugin.Plugin registerPlugins
    Información: Register plugin: Series
    Apr 08, 2014 7:20:46 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory <clinit>
    Información: Could not register the default version of expression parser
    Apr 08, 2014 7:20:46 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory getExpressionParser
    WARNING: A valid expression Parser is not registered with the factory
    Apr 08, 2014 7:20:47 PM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Apr 08, 2014 7:20:47 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory getExpressionParser
    WARNING: A valid expression Parser is not registered with the factory
    Apr 08, 2014 7:20:47 PM com.rapidminer.tools.expression.parser.ExpressionParserFactory getExpressionParser
    WARNING: A valid expression Parser is not registered with the factory
    Apr 08, 2014 7:20:47 PM com.rapidminer.tools.OperatorService parseOperators
    WARNING: Failed to register operator: RapidMiner Core : declare_missing_value
    com.rapidminer.operator.OperatorCreationException: Operator cannot be constructed: 'declare_missing_value(com.rapidminer.operator.preprocessing.filter.DeclareMissingValueOperator)': null
    at com.rapidminer.operator.OperatorDescription.createOperatorInstance(OperatorDescription.java:354)
    at com.rapidminer.tools.OperatorService.registerOperator(OperatorService.java:519)
    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 fdf.Prueba.main(Prueba.java:30)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.rapidminer.operator.OperatorDescription.createOperatorInstanceByDescription(OperatorDescription.java:369)
    at com.rapidminer.operator.OperatorDescription.createOperatorInstance(OperatorDescription.java:346)
    ... 11 more
    Caused by: java.lang.NullPointerException
    at com.rapidminer.operator.preprocessing.filter.DeclareMissingValueOperator.<init>(DeclareMissingValueOperator.java:103)
    ... 17 more

    Apr 08, 2014 7:20:48 PM com.rapidminer.tools.OperatorService init
    Información: Number of registered operator classes: 556; number of registered operator descriptions: 557; number of replacements: 489
    Apr 08, 2014 7:20:48 PM com.rapidminer.tools.jdbc.JDBCProperties <init>
    WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
    Apr 08, 2014 7:20:48 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    Información: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    Apr 08, 2014 7:20:48 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    Información: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed.
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter addMessage
    Información: <em class="error">The operator class 'text:process_document_from_data' is unknown. Possibly you must install a plugin for operators of group 'text'.</em>
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'create_word_vector' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'vector_creation' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'add_meta_information' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'keep_text' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prune_method' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prunde_below_percent' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prune_above_percent' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prune_below_absolute' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prune_above_absolute' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prune_below_rank' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'prune_above_rank' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'datamanagement' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'select_attributes_and_weights' is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter parseOperator
    Información: The parameter 'specify_weights' of type list is unknown for operator 'Process Documents from Data' (" dummy ")."
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter addMessage
    Información: <em class="error">Operator '<class>dummy</class>' may not have children. Ignoring.
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter addMessage
    Información: <em class="error">The input port <var>example set</var> is unknown at operator <var>Process Documents from Data</var>.</em>
    Apr 08, 2014 7:20:49 PM com.rapidminer.io.process.XMLImporter addMessage
    Información: <em class="error">The output port <var>example set</var> is unknown at operator <var>Process Documents from Data</var>.</em>
    Apr 08, 2014 7:20:49 PM com.rapidminer.tools.WrapperLoggingHandler log
    Información: No filename given for result file, using stdout for logging results!
    Apr 08, 2014 7:20:49 PM com.rapidminer.Process run
    Información: Process C:\Users\lDanny\.RapidMiner5\repositories\Local Repository\PrimeraVez.rmp starts
    Apr 08, 2014 7:20:49 PM com.rapidminer.tools.jdbc.DatabaseHandler executeStatement
    Información: Executing query: 'SELECT "categoria", "textoPaper"
    FROM "dbo"."PAPER"
    WHERE "categoria" in ('H.3.3','H.1.2')
    order by "categoria"'
    Exception in thread "main" com.rapidminer.operator.UserError: The dummy operator Process Documents from Data (replacing text:process_document_from_data) cannot be executed.
    at com.rapidminer.operator.DummyOperator.doWork(DummyOperator.java:88)
    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 fdf.Prueba.main(Prueba.java:33)

    Thanks.

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    to get the extension to load from a development environment, it either has to be a managed extension (USER_HOME/.RapidMiner/managed) defined in the managed.xml, or it has to be in the WORKSPACE/RAPIDMINER_PROJECTNAME/lib/plugins folder.

    Regards,
    Marco
  • anonimoper
    anonimoper New Altair Community Member
    Hi, i have the rapidminer text processing in worspace/rapidminer/lib/plugins

    look:

    http://www.subirimagenes.net/i/140409040107567861.png
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    then it fails to use the correct home folder. See the following log part:

    Información: Property rapidminer.home is not set. Guessing.
    Apr 08, 2014 7:20:44 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    Información: Trying base directory of classes (build) 'C:\Users\lDanny\workspace\fdf'...gotcha!
    RapidMiner Home is the root folder of the RapidMiner Studio installation. In that folder it will try to locate /lib/plugins to load extensions. You can set rapidminer.home via system property before calling RapidMiner.init() to the correct folder, e.g.

    System.setProperty("rapidminer.home", "C:\Users\lDanny\workspace\rapidminer");
    Regards,
    Marco
  • anonimoper
    anonimoper New Altair Community Member
    Thanks very much.