"Setting Extension Dependencies"

petar_rpetar_r Member Posts: 6 Contributor II
edited June 2019 in Help
Dear all,

I am trying to build a RapidMiner extension that relies on classes from another extension (the Linked Open Data extension). I followed the instructions for adding extension dependencies given in "How to Extend RapidMiner 5" and also this related thread: http://rapid-i.com/rapidforum/index.php/topic,6500.0.html. Basically, these are the changes I did inside the build.xml:

<fileset id="build.dependentExtensions" dir="..">
<include name="RapidMiner_Extension_LOD/build.xml" />
</fileset>
and:
<property name="extension.dependencies" value="rmx_lod[1.0]" />
Also, the whole LOD extension project is added as a dependency to my current project, not as a jar.

However, after running RapidMiner, the new extension is not present in the Operators view, even though there are no errors or exceptions in the log (says that the new extension was successfully registered). And also, the operators from the LOD extension are doubled (each LOD operator appears twice).

I have tested the extension without adding dependency to the LOD extension (and of course without the operators that rely on classes from the LOD extension) and everything works just fine.

I will be grateful for any help you can provide!

Best,

Petar

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    usually such errors occur because you are loading extension classes twice. Can you check the following folders for your extensions:

    1) USER_HOME/.RapidMiner5/managed (remove from the .xml file as well)
    2) IDE_WORKSPACE/RapidMiner/lib/plugins

    if you have duplicates, remove all of them except for one version of each extension in the 2) folder. Make sure that the versioning of the LOD extension matches your required extension. If that does not help, please post the full startup log of RapidMiner Studio.

    Regards,
    Marco
  • petar_rpetar_r Member Posts: 6 Contributor II
    Hi Marco,

    Thanks for your reply!

    I already took care of the duplicates, exactly as you described, before posting here.

    Here is the startup log of RapidMiner Studio (the name of the new extension is RMDI):

    Aug 05, 2014 12:13:19 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Property rapidminer.home is not set. Guessing.
    Aug 05, 2014 12:13:19 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Trying base directory of classes (build) 'C:\Users\petar\workspace1\RapidMiner_Unuk'...gotcha!
    Aug 05, 2014 12:13:19 AM com.rapid_i.Launcher main
    INFO: Launching RapidMiner, platform null
    Aug 05, 2014 12:13:22 AM com.rapidminer.tools.ParameterService init
    INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
    Aug 05, 2014 12:13:22 AM com.rapidminer.tools.I18N <clinit>
    INFO: Set locale to en.
    Aug 05, 2014 12:13:22 AM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: rapidminer.home is 'C:\Users\petar\workspace1\RapidMiner_Unuk'.
    Aug 05, 2014 12:13:23 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: LOD
    Aug 05, 2014 12:13:23 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: RMDI
    Aug 05, 2014 12:13:24 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Text Processing
    Aug 05, 2014 12:13:24 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: recommenders
    Aug 05, 2014 12:13:24 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Weka
    Aug 05, 2014 12:13:24 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: VISUALIZATIONS
    Aug 05, 2014 12:13:24 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Community
    Aug 05, 2014 12:13:24 AM com.rapidminer.tools.plugin.Plugin registerPlugins
    INFO: Register plugin: Anomaly Detection
    Aug 05, 2014 12:13:31 AM com.rapidminer.tools.config.ConfigurationManager register
    INFO: Registered configurator SPARQL Endpoint Connection.
    Aug 05, 2014 12:13:38 AM com.rapidminer.tools.expression.parser.ExpressionParserFactory <clinit>
    INFO: Default version of expression parser registered successfully
    Aug 05, 2014 12:13:41 AM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.plugin.Plugin registerOperators
    INFO: No operator descriptor specified for plugin Community. Trying plugin initializtation class com.rapidminer.community.CommunityPluginInit.
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.plugin.Plugin registerOperators
    WARNING: No operator descriptor defined for: Community
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.OperatorService init
    INFO: Number of registered operator classes: 561; number of registered operator descriptions: 703; number of replacements: 436
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.jdbc.JDBCProperties <init>
    WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed.
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.config.ConfigurationManager loadConfiguration
    INFO: Load configuration for SPARQL Endpoint Connection.
    Aug 05, 2014 12:13:52 AM com.rapidminer.tools.config.ConfigurationManager loadConfiguration
    INFO: Loaded configurations for 17 objects of type SPARQL Endpoint Connection.
    Aug 05, 2014 12:14:14 AM com.rapidminer.io.community.MyExperimentConnection connectTo
    INFO: Connecting to: http://www.myexperiment.org/search.xml?num=100&;query=kind%3A%28RapidMiner%29&type=workflow
    Aug 05, 2014 12:14:14 AM com.rapid_i.deployment.update.client.UpdateManager <clinit>
    WARNING: Using a development build. Assuming platform independent version.
    And here is the output when building the extension:

    Buildfile: C:\Users\petar\workspace1\RMDataIntegrationExtension\build.xml
    clean:
        [echo] Cleaning...
      [delete] Deleting directory C:\Users\petar\workspace1\RMDataIntegrationExtension\build
      [delete] Deleting directory C:\Users\petar\workspace1\RMDataIntegrationExtension\javadoc
        [mkdir] Created dir: C:\Users\petar\workspace1\RMDataIntegrationExtension\build
        [mkdir] Created dir: C:\Users\petar\workspace1\RMDataIntegrationExtension\javadoc
    version.get:
        [echo] Long version: 1.1.1; short version: 1.1
    init.setEncoding:
    init:
    Trying to override old definition of task get
    Trying to override old definition of task rpm
    Trying to override old definition of task post
    init.setEncoding:
    copy-resources:
        [echo] Copying resources...
        [copy] Copying 9 files to C:\Users\petar\workspace1\RMDataIntegrationExtension\build
    changes.testExistence:
    merge.changes:
    prepare_agpl:
    build:
        [echo] build.no_agpl=${build.no_agpl}
    clean:
    clean_agpl:
    build.rm:
    build.dependencies.prepare.set:
    build.dependencies.prepare.unset:
        [echo] No dependencies defined for RMDI.
    build.dependencies:
        [echo] Building plugin dependencies of RMDI...
        [echo] ...Finished
        [echo] RapidMiner Extension RMDI: Compile with Java from dir: C:\Program Files\Java\jdk1.7.0_40\jre
        [echo] RapidMiner Extension RMDI: using Java version: 1.7.0_40
        [javac] C:\Users\petar\workspace1\RapidMiner_Unuk\build_extension.xml:162: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 145 source files to C:\Users\petar\workspace1\RMDataIntegrationExtension\build
        [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    unzipLibs:
        [mkdir] Created dir: C:\Users\petar\workspace1\RapidMiner_Unuk\release\libfiles
        [unjar] Expanding: C:\Users\petar\workspace1\RMDataIntegrationExtension\lib\paris_0_3.jar into C:\Users\petar\workspace1\RapidMiner_Unuk\release\libfiles
    createJar:
        [echo] Creating jar...
        [echo] Manifest Classpath: paris_0_3.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/SassyReader-0.5.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/blas.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/collections-generic.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/colt.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/commons-codec-1.4.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/commons-collections.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/commons-httpclient-3.1.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/commons-lang-2.4.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/commons-logging-1.1.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/concurrent.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/dom4j-1.6.1.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/encog.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/groovy-all-1.7.7.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/itextpdf-5.3.3.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/ivy-2.2.0.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jama.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jcommon.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jep.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jfreechart.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jmathplot.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/joone-engine.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jugpreview.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jung-algorithms.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jung-api.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jung-graph-impl.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jung-visualization.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/junit.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jxl.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/kdb.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/launcher.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/looks.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/mail.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/microba.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/poi-3.8-20120326.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/poi-excelant-3.8-20120326.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/poi-ooxml-3.8-20120326.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/poi-ooxml-schemas-3.8-20120326.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/poi-scratchpad-3.8-20120326.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/rapidminer.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/rm_doc.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/rsyntaxtextarea.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/slf4j-api-1.6.4.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/slf4j-simple-1.6.4.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/swingx-all-1.6.4.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/vldocking.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/ws-commons-util-1.0.2.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/xmlbeans-2.3.0.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/xmlpull.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/xmlrpc-client-3.1.3.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/xmlrpc-common-3.1.3.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/xpp3.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/xstream.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-export.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphics2d.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-emf.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-pdf.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-ps.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-svg.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-swf.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-graphicsio.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-io.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-swing.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-util.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/freehep/freehep-xml.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jdbc/hsqldb.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jdbc/iijdbc-10.0-4.0.6.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jdbc/jtds-1.3.0.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jdbc/mysql-connector-java-5.1.24-bin.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/jdbc/postgresql-9.2-1002.jdbc4.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/plugins/rapidminer-RMDI-1.1.1.jar C:/Users/petar/workspace1/RapidMiner_Unuk/lib/plugins/rmx_lod-1.1.024.jar
          [jar] Building jar: C:\Users\petar\workspace1\RapidMiner_Unuk\release\rapidminer-RMDI-1.1.1.jar
      [delete] Deleting directory C:\Users\petar\workspace1\RapidMiner_Unuk\release\libfiles
    install:
        [move] Moving 1 file to C:\Users\petar\workspace1\RapidMiner_Unuk\lib\plugins
    BUILD SUCCESSFUL
    Total time: 12 seconds
    And here is the manifest of RMDI.jar:

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.8.4
    Created-By: 1.7.0_40-b43 (Oracle Corporation)
    Implementation-Title: RMDI
    Implementation-Version: 1.1.1
    Specification-Title: RMDI
    Specification-Version: 1.1.1
    RapidMiner-Version: 5.0
    RapidMiner-Type: RapidMiner_Extension
    Plugin-Dependencies: rmx_lod[1.0]
    Extension-ID: rmx_rmdi
    Namespace: rmdi
    Initialization-Class: com.rapidminer.PluginInitTemplate
    IOObject-Descriptor: /com/rapidminer/resources/ioobjectsTemplate.xml
    Operator-Descriptor: /com/rapidminer/resources/OperatorsTemplate.xml
    ParseRule-Descriptor: /com/rapidminer/resources/parserulesTemplate.xml
    Group-Descriptor: /com/rapidminer/resources/groupsTemplate.properties
    Error-Descriptor: /com/rapidminer/resources/i18n/ErrorsTemplate.proper
    ties
    UserError-Descriptor: /com/rapidminer/resources/i18n/UserErrorMessages
    Template.properties
    GUI-Descriptor: /com/rapidminer/resources/i18n/GUITemplate.properties
    Probably the duplicate LOD operators are loaded from the new RMDI.jar which has registered the LOD.jar as a dependency. But, I don't understand why the RMDI operators are not present in RapidMiner Studio.

    Thanks for your help!

    Cheers,

    Petar
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    this looks rather sensible, I cannot spot an obvious problem. Have you downloaded the web and text mining extension sources and closely compared the web extension to your own extension? Both depend on another extension while providing their own set of operators.

    Regards,
    Marco
  • petar_rpetar_r Member Posts: 6 Contributor II
    Hi Marco,

    The problem is simpler than it appears. The Operator[Template].xml file in both extension had the same name, therefore the operators of the LOD extension were doubled, and no operators of the new extension were registered.

    Thanks for the pointers!

    Regards,

    Petar
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    good job finding that! These errors are annoyingly hard to spot ;D

    Regards,
    Marco
Sign In or Register to comment.