Can I change rapidminer5's code for extension project?

2131012221310122 Member Posts: 40 Guru
edited December 2018 in Help

I am using RapidMiner5 and want to develop the extension project with RapidMiner5.



In order to develop the extension project, I changed some code in RapidMiner. Because some method in RapidMiner5 is private or protected. 





I tested the code just in extension project and get the successful result, but when I built it to generate plugin in RapidMiner5, it got error.

From the error message, the modified code is not recognized correctly.


But I checked the class file in RapidMiner5, it's the lastest code. The method is "public" now.


So why I got these error message?


Best Answer

  • jczogallajczogalla Employee, Member Posts: 144 RM Engineering
    Solution Accepted

    Hi @21310122!


    I think I see the solution now... I guess you have the RapidMiner5 project on your extension's classpath, correct? Then of course it can see the changes that you made. But when the extension is built, it will not use the classes built by eclipse, but instead it will use the rapidminer.jar library. Of course this is still the unmodified version. To rebuild the rapidminer.jar library, simply execute the createJar task from within the RapidMiner5 project. That should solve your problem.





  • jczogallajczogalla Employee, Member Posts: 144 RM Engineering

    I'm not sure why exactly you get that error. But there is a much easier way to circumvent it without changing the core code. You can use

    AttributeFactory.create(h20Node.getColname(), Ontology.POLYNOMINAL)

    to create your Attribute. That's the usual way to do it.



  • 2131012221310122 Member Posts: 40 Guru

    That works, thank you a lot!:smileyvery-happy:


    Although I still don't know why I can't do in this way.
    If I can't get correct result in this way, if that means any changes in the RapidMiner source level can not be effective?

    I wish someone can find out the cause of the mistake.


  • jczogallajczogalla Employee, Member Posts: 144 RM Engineering

    I'm not completely sure what the problem there is. This is still using the (now old) ant build mechanism. Can you maybe translate the java compiler error? That would definitely help. :)
    Also, how do you build the extension? Are you sure the ant file is correctly configured, i.e. the rm.dir variable points to your modified RapidMiner5 project?

  • 2131012221310122 Member Posts: 40 Guru

    Sorry, It was my fault that I didn't notice that the error message is in Chinese. It's said that there is no such method( use String parameter to create a PolynominalAttribute).




    I used the way you told me and built it, the error of creating PolynominalAttribute is fixed.

    But I still have other changed code in RapidMiner which cannot be recoginized in extension-project.

    The error message means no such method setLabel() and new Tree().



     publicmethod.png     publicmethod2.png


    That's so weird because the IDEA didn't prompt me that there is a problem with the code. And I created a test class to call this method in extension-project, I got the success result.

    But when I built it with RapidMiner5, the error message comes. 


    This is the project location and the configuration file in extension-project. 



    I got the **.jar in RapidMiner5 after build extension-project in the situation that I didn't use changed RapidMiner5's code in extension-project. So I think there is no problem with the location configuration. 



    Can you help me to find out the reason and solve it? Thanks a lot.


  • 2131012221310122 Member Posts: 40 Guru

    Thank you soooooo much!

    The problem solved.

Sign In or Register to comment.