Plugin writing

ManitouManitou Member Posts: 4 Contributor I
edited November 2018 in Help
Hi all,

I purchased the white paper:


At the first glance it looks very helpful. However I got stuck at the very beginning. In the first section the document explains how to start RapidMiner from ecplise by downloading everthing via a checkout (SVN) first. This is what I did and it worked very well.

My problem now is that I keep getting a terrible message

Buildfile: D:\Workspace\RapidMiner_Vega\build_extension.xml
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
Total time: 297 milliseconds

while executing the ant-file from the RapidMiner_Extension_Tutorial-Project.

Does anybody now what that message from above means and how to fix my problem?

Thank you.



  • Options
    haddockhaddock Member Posts: 849 Maven
    Greetings Manitou,

    It seems we are sailing the same uncharted waters, so you have my sympathies; well done on spotting the missing Trinity, more than I did, but here's the good news - I've managed to get the whole contraption working, so what is missing can't be that important ( perhaps that's why it isn't there  ;D ).

    By "working" I mean that I can run enough of a modified copy of the template build file to produce a jar in lib/plugins, and that I can build Vega in order to see my magnificent rubbish working.

    Sadly you are in a more annoying place where the ants are non-constructive, if I google your error I can see that there are several possible causes for this. One suggestion would be to change the properties of the plugin build.xml to add diagnostics etc., here is a link to the various options.


    Another thing to bear in mind is that lining up your plugin directories correctly with your Vega directories is important - until I put them under the same parent I couldn't build either ( I'd love to be able say what the error messages were, but that is all lost in the fog ).

    Good luck! No doubt we shall bump into similar uncharted rocks, so posting them up is good.

    Pip pip
  • Options
    radoneradone RapidMiner Certified Expert, Member Posts: 74 Guru
    I were dealing wit the same problem.

    You have to:

    1)  download ant-contrib-1.0b3-bin.tar.gz and place ant-contrib-1.0b3.jar e.g. to "RapidMiner_Vega/lib/ant/" folder.

    2) In each occurence of taskdef replace it by:
    <taskdef resource="net/sf/antcontrib/antlib.xml">
    <pathelement location="c:/workspaceRM5/RapidMiner_Vega/lib/ant/ant-contrib-1.0b3.jar" />
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    I excuse any inconvenience arisen from this issue, but after the white paper has been written, we have made some changes to the build process in order to make releases and updates more simpler for us. That's why I had to add some libraries to ant. In fact they are only needed to deploy updates to our Updateserver and so missing libraries could be simply ignored. I changed the onerror property of the taskdef tags to "report", so that it should not bother you anymore.

  • Options
    Pascal_WelkePascal_Welke Member Posts: 10 Contributor II
    Sadly the problem described by Manitou bothers me right now.
    I have checked out the latest version of Vega via SVN and organized my eclipse ws just as described.
    Still, I get

    Buildfile: Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Template\build.xml
     [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
    Total time: 344 milliseconds

    Do you have any idea how to fix this?
  • Options
    haddockhaddock Member Posts: 849 Maven
    Hi there,

    Try the second "Run as -> 2. Ant build" option; you'll see a list of the build commands. I got mine running by selecting all the options up to and including "install", and deselecting those after "install".

    Hope that works for you too  ;D

  • Options
    Pascal_WelkePascal_Welke Member Posts: 10 Contributor II
    Thanks for your reply, but that didn't work for me. Now I get:

    Buildfile: Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\build.xml
      [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
        [echo] Cleaning...
      [delete] Deleting directory Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\build
      [delete] Deleting directory Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\javadoc
        [mkdir] Created dir: Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\build
        [mkdir] Created dir: Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\javadoc
      [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
    Trying to override old definition of task get
        [echo] Copying resources...
        [copy] Copying 10 files to Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\build
      [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
      [delete] Deleting: Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\src\com\rapidminer\Version.java
        [echo] Updating to version 5.0.006
        [copy] Copying 1 file to Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\src\com\rapidminer
        [echo] Copying resources...
        [echo] RapidMiner: Compile with Java from dir: C:\Programme\Java\jre1.6.0_05
        [echo] RapidMiner: using Java version: 1.6.0_05
        [javac] Compiling 13 source files to Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\build

    Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\build_extension.xml:108: The following error occurred while executing this line:
    Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\build_extension.xml:142: The following error occurred while executing this line:
    Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\build.xml:96: Error running javac.exe compiler

    Total time: 35 seconds
    While trying to pack all necessary files together by hand, and using the MANIFEST.MF shown in the Paper on page 35, i get this error
    at startup:

    2010-06-03 16:30:48 WARNING: Cannot load plugin 'Y:\eclipse\Rapidminer5_dev\RapidMiner_Vega\lib\plugins\igg.jar': invalid header field (Plugin.findPlugins())
      java.io.IOException: invalid header field
          java.util.jar.Attributes.read(Unknown Source)
          java.util.jar.Manifest.read(Unknown Source)
          java.util.jar.Manifest.<init>(Unknown Source)
          java.util.jar.JarFile.getManifestFromReference(Unknown Source)
          java.util.jar.JarFile.getManifest(Unknown Source)
    I used exactly the code on page 35 (whithout line numbers of course ;) ) and the Files from the Extension_Tutorial in the exact same folders.

    Is there any possibility, to get a more specific warning, like which entry is corrupt?

  • Options
    Pascal_WelkePascal_Welke Member Posts: 10 Contributor II
    I have solved my problem by finding another plugins and copying the manifest.mf from there.
    There seemed to be a problem with the initialization class. Whith this knowledge, I can decipher the error message.

    Greetings from Bonn
  • Options
    fischerfischer Member Posts: 439 Maven
    Hi again,

    it looks like you have solved your problem. However, you should not have to generate the manifest manually and compile and package everything yourself. That's what we have ant for :-) The weird thing is the error message about executing "javac.exe". Can you build other projects using ant? Is JAVA_HOME and everything configured correctly?

  • Options
    GhostriderGhostrider Member Posts: 60 Contributor II
    I was able to compile the tutorial in both Windows and Linux.  I had to add the ant-contrib classpath as a previous poster mentioned. 

    In the future, could we put in the required .jar files in the lib directory of RapidMiner -- don't assume that the user has ant installed on their systems?  I know it would make the downloads slightly bigger, but I think a lot of the people who use RapidMiner just want to solve a problem and might not be experienced programmers.  RapidMiner is a great project and I think it's success is directly linked to its capability.  Encourage users to extend that capability by allowing them to develop plug-ins as easily as possible.  A few extra MBs of download is definitely worth the 1+ hours spent troubleshooting the build setup.
  • Options
    fischerfischer Member Posts: 439 Maven

    You are right. We will take care of this issue in the next release. Probably we will not include the jar files since these are only for uploading to sourceforge etc. which is irrelevant for downloaders. But we will fix the build file so everything still works when the jar is missing. I hope you did not waste too much of your time :-)

Sign In or Register to comment.