The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 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
"[SOLVED]My new Extension is simply white In GUI!"
siamak_want
Member Posts: 98 Contributor II
Hi forum,
I am about to write my own extension for RM according to the fantastic tutorial document of "How to extend RM 5.0". As the first step, I added the tutorial project ("Rapidminer_Extension_Tutorial") to eclipse and build the ant file. Every thing works fine and I can see the operator when I lunch RM. But when I add the operator to GUI, it's color is simply white! and I get "NULL Pointer Exception" when run a process including the new operator. What is wrong with my operator? Any help would be appreciated.
Thanks in advance.
I am about to write my own extension for RM according to the fantastic tutorial document of "How to extend RM 5.0". As the first step, I added the tutorial project ("Rapidminer_Extension_Tutorial") to eclipse and build the ant file. Every thing works fine and I can see the operator when I lunch RM. But when I add the operator to GUI, it's color is simply white! and I get "NULL Pointer Exception" when run a process including the new operator. What is wrong with my operator? Any help would be appreciated.
Thanks in advance.
Tagged:
0
Answers
can you please post your new operator's code and error message? Without it it is pretty hard to find the cause for this error;)
If you want to change the color of your operator you have to set a build file property Furthermore you have to create the referenced file where you can specify colors for Operator groups and even IO objects Best,
Nils
Thanks to your attension, According to your answer I found the problem in the operator code. so I could use the operator in the tutorial:). Now I want to extend my own operator. (cluster evaluator).
In order to do so. I wrote my operator class and its corresponding OPerators.XML file. When I build the ant file, the corresponding jar file is created in the "release" folder of RM source code. I simply copy the built jar file to the lib/plugins folder of RM. but I found something strange about my operator jar file. It just contains META_INf folder and it does not contain my operators classess at all!. I am new to ant. Is this problem related to ant building?
and here is my operator ant build file, I have just changed vega to Unuk: and here is the OperatorsTutorial.xml: Any help would be appreciated Nils.
Best,
Nils
Here is the console output of ant file when I run it:
Buildfile: E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\build.xml
version.get:
version.updateFiles:
init.setEncoding:
init:
[taskdef] Could not load definitions from resource antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource org/freecompany/redline/ant/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
init.setEncoding:
copy-resources:
[echo] Copying resources...
build.dependent:
version.get:
version.updateFiles:
init.setEncoding:
init:
copy-resources:
build:
build.rm:
build.dependent:
[echo] RapidMiner Extension: Compile with Java from dir: C:\Program Files\Java\jdk1.6.0_29\jre
[echo] RapidMiner Extension: using Java version: 1.6.0_29
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Unuk\build_extension.xml:130: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 8 source files to E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\build
[javac] warning: [path] bad path element "E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Unuk\lib\jdbc\jcifs.jar": no such file or directory
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:31: warning: com.sun.org.apache.bcel.internal.classfile.Attribute is Sun proprietary API and may be removed in a future release
[javac] import com.sun.org.apache.bcel.internal.classfile.Attribute;
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:98: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ExampleSet MyClusteredSet = ClusteredSetInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:106: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:107: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ExampleSet clusteredSet = ClusteredSetInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:110: warning: [deprecation] <T>getDataOrNull() in com.rapidminer.operator.ports.Port has been deprecated
[javac] PerformanceVector performance = performanceInput.getDataOrNull();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:211: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:237: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:265: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:289: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:333: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:361: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel Mymodel = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:389: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\FisherEvaluator.java:420: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ClusterModel model = clusterModelInput.getData();
[javac] ^
[javac] E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\src\com\rapidminer\operator\Numerical2DateOperator.java:77: warning: [deprecation] <T>getData() in com.rapidminer.operator.ports.Port has been deprecated
[javac] ExampleSet exampleSet = exampleSetInput.getData();
[javac] ^
[javac] 15 warnings
build.rm:
clean:
[echo] Cleaning...
[delete] Deleting directory E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\build
[delete] Deleting directory E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\javadoc
[mkdir] Created dir: E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\build
[mkdir] Created dir: E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Extension\javadoc
version.get:
version.updateFiles:
init.setEncoding:
init:
copy-resources:
build:
createJar:
[echo] Creating jar...
[echo] Manifest Classpath: E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/blas.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/collections-generic.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/colt.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/commons-codec-1.4.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/commons-collections.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/commons-httpclient-3.1.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/commons-lang-2.4.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/commons-logging-1.1.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/concurrent.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/encog.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/groovy-all-1.7.7.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/ivy-2.2.0.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jama.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jcommon.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jep.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jfreechart.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jmathplot.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/joone-engine.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jugpreview.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jung-algorithms.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jung-api.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jung-graph-impl.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jung-visualization.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/junit.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jxl.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/kdb.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/launcher.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/looks.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/mail.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/microba.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/rapidminer.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/rsyntaxtextarea.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/vldocking.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/ws-commons-util-1.0.2.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/xmlpull.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/xmlrpc-client-3.1.3.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/xmlrpc-common-3.1.3.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/xpp3.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/xstream.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-export.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphics2d.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-emf.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-pdf.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-ps.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-svg.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphicsio-swf.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-graphicsio.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-io.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-swing.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-util.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/freehep/freehep-xml.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jdbc/hsqldb.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jdbc/iijdbc.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jdbc/jtds-1.2.2.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jdbc/mysql-connector-java-5.1.17-bin.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/jdbc/postgresql-9.1-901.jdbc3.jar E:/Mine/Eclipse_After20-11-90/eclipse/WS/RapidMiner_Unuk/lib/plugins/rapidminer-Tutorial Extension-5.0.000.jar
[mkdir] Created dir: E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Unuk\release\libfiles
[jar] Building jar: E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Unuk\release\rapidminer-Tutorial Extension-5.0.000.jar
[delete] Deleting directory E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Unuk\release\libfiles
BUILD SUCCESSFUL
Total time: 2 seconds
Did you call the "install" ant target? If you are not sure which target you called please change the first line of your ant file to Best,
Nils
I added default="install" as you have mentioned, but again the generated jar file contains just a META_INF folder, LICENCE file and short_license.txt.
I am really confused about this. I haven't made any significant change in the ant file of tutorial project. I have just copied the tutorial project and write my own code for my operator in one of its packages. Any idea please?
By the way, Nils, I found something which may help: In eclipse, I copied and pasted the tutorial project. This was resulted to the creation of a duplicate project which was named: Copy of RapidMiner_Extension_Tutorial. Running the build file of this new project leads to the same problem. Would you explain what the problem might be?
Thanks in advance.
if you run the build.xml file again and look at the output, do you see something like at the end?
If I'm opening the resulting .jar file from the above directory it shows a 'META-INF' folder and a 'com' folder like it should be.
Well to be honest i have no clue what is wrong with your extension. If you haven't changed your 'build.xml' it should work..
Best,
Nils
Yes Nills, The build.xml file generate the following at the end of running:
Moving 1 file to E:\Mine\Eclipse_After20-11-90\eclipse\WS\RapidMiner_Unuk\lib\plugins
I am really confused, I think I should read the tutorial again and again:(
By the way thanks to your help.
I just tried the tutorial project myself again, and it worked like a charm. Please follow these instructions to the letter:
- Make sure your RapidMiner_Unuk project in Eclipse is up to date. I did my test with the latest development version from SVN.
- Rename the extension project you are working with to something else and then close it in Eclipse.
- In Eclipse, select "File" - "Import..." - select "Existing Projects into Workspace" - click "Next" - select "Select archive file" - choose the "RapidMiner_Extension_Tutorial.zip" file
- Now open the "build.xml" file in the base dir of the new project and replace '<property name="rm.dir" location="../RapidMiner_Vega" />' in line 4 with '<property name="rm.dir" location="../RapidMiner_Unuk" />'
- Change the first line in the same file from '<project name="RapidMiner_Plugin_Tutorial_Vega">' to '<project name="RapidMiner_Plugin_Tutorial_Unuk">'. Save the file.
- Drag the "build.xml" into the Eclipse Ant view. Expand the entry for "RapidMiner_Plugin_Tutorial_Unuk" and doubleclick "install".
- Now run RapidMiner_Unuk from your workspace. There should be a new menu item in the main menu (next to File, Edit, Process, Tools, View, Help) named "Tutorial".
After you have done this, you can re-add your existing code into this new project, and it should work just fine.Regards,
Marco
Sorry, for my long delay and thanks to your accurate answer. I will do as you explain and I will send you the feedback as soon as possible.
again thanks to your professional answer.
regards
I did exactly the same as you mentioned, but when I click the install in the ant view, I receive this error:
"Error reading project file E:\eclipse\WS_new\.metadata\.lock: The process cannot access the file because another process has locked a portion of the file"
here is the last lines of console output: Any help would be appreciated Marco.
please open the build.xml of your extension and look for this code: If you find these lines please add <exclude name="**/*" /> like this and try again to compile your extension.
Best,
Nils
YOU ARE THE ONE MAN...
Thanks a lot. I was hanged up for 1 month. You saved me. Also I should thank to Marco for his accurate answer.
Best regards,
Hi, I follow exactly the guide, however, when run the ant file, the following errors had occur:
BUILD FAILED
C:\Users\WHOamI\workspace\RapidMiner_Unuk\build_extension.xml:126: The following error occurred while executing this line:
C:\Users\WHOamI\workspace\RapidMiner_Unuk\build_extension.xml:194: The following error occurred while executing this line:
C:\Users\WHOamI\workspace\RapidMiner_Unuk\build.xml:98: Basedir C:\Users\WHOamI\workspace\RapidMinerReferenceManual_en does not exist
Where to find the RapidMinerReferenceManual_en ?
Best Regards,
Alan
for the time being, add <property name="skip.documentation" value="true" /> to your local build.xml file for RapidMiner. After you have done that it should work just fine.
Regards,
Marco
This is my errors after ant installing, and it can't be solved with your solution.
C:\Users\ZhangZhao\workspace\Unuk\build_extension.xml:139: The following error occurred while executing this line:
C:\Users\ZhangZhao\workspace\Unuk\build_extension.xml:204: The following error occurred while executing this line:
C:\Users\ZhangZhao\workspace\Unuk\build.xml:150: Compile failed; see the compiler error output for details.
What's the problem?
Regards,
Marco
a) you are not using the latest svn version
b) make sure you are using Java 7 U10 JDK, as we recently switched to Java 7
Regards,
Marco