Can I change rapidminer5's code for extension project?
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
-
jczogalla Employee-RapidMiner, Member Posts: 144 RM Engineering
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.
Cheers
Jan
0
Answers
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
to create your Attribute. That's the usual way to do it.
Cheers
Jan
That works, thank you a lot!:smileyvery-happy:
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'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?
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().
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.
@jczogalla
Thank you soooooo much!
The problem solved.