The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.
Options

Plugin writing

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

I purchased the white paper:

http://rapid-i.com/component/page,shop.product_details/flypage,flypage.tpl/product_id,52/category_id,5/option,com_virtuemart/Itemid,180/vmcchk,1/

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.
BUILD SUCCESSFUL
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.



Tagged:

Answers

  • 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.

    http://ant.apache.org/manual/running.html

    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">
    <classpath>
    <pathelement location="c:/workspaceRM5/RapidMiner_Vega/lib/ant/ant-contrib-1.0b3.jar" />
    </classpath>
    </taskdef>
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    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.

    Greetings,
      Sebastian
  • 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.
    BUILD SUCCESSFUL
    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.
    clean:
        [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
    version.get:
      [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
    version.updateFiles:
    init:
    Trying to override old definition of task get
    copy-resources:
        [echo] Copying resources...
        [copy] Copying 10 files to Y:\eclipse\Rapidminer5_dev\RapidMiner_Extension_Tutorial\build
    build:
      [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
    build.rm:
    version.get:
    version.updateFiles:
      [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
    init:
    copy-resources:
        [echo] Copying resources...
    build:
        [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

    BUILD FAILED
    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)
          com.rapidminer.tools.plugin.Plugin.findPlugins(Plugin.java:547)
          com.rapidminer.tools.plugin.Plugin.registerAllPluginDescriptions(Plugin.java:570)
          com.rapidminer.tools.plugin.Plugin.initAll(Plugin.java:755)
          com.rapidminer.RapidMiner.init(RapidMiner.java:387)
          com.rapidminer.gui.RapidMinerGUI.run(RapidMinerGUI.java:208)
          com.rapidminer.gui.RapidMinerGUI.main(RapidMinerGUI.java:527)
    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
    Pascal
  • 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?

    Cheers,
    SImon
  • 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
    Hi,

    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 :-)

    Cheers,
    Simon
Sign In or Register to comment.