Unknwon operator Class
Maha
New Altair Community Member
Hi all,
Do anybody know whay I am getting Unknown operator class Error? Iam trying to test my own extended operators using RapidMiner 4.5. Below is the error messege:
Exception in thread "main" com.rapidminer.tools.XMLException: Unknown operator class: 'CustomWApriori'!
at com.rapidminer.operator.Operator.createFromXML(Operator.java:1503)
at com.rapidminer.operator.Operator.setOperatorParameters(Operator.java:1600)
at com.rapidminer.operator.Operator.createFromXML(Operator.java:1513)
at com.rapidminer.Process.readProcess(Process.java:890)
at com.rapidminer.Process.<init>(Process.java:167)
at rapidminer.embedded.MyPipelineTest.runProcess(MyPipelineTest.java:14)
at rapidminer.embedded.MyPipelineTest.main(MyPipelineTest.java:21)
Thank you,
Maha
Do anybody know whay I am getting Unknown operator class Error? Iam trying to test my own extended operators using RapidMiner 4.5. Below is the error messege:
Exception in thread "main" com.rapidminer.tools.XMLException: Unknown operator class: 'CustomWApriori'!
at com.rapidminer.operator.Operator.createFromXML(Operator.java:1503)
at com.rapidminer.operator.Operator.setOperatorParameters(Operator.java:1600)
at com.rapidminer.operator.Operator.createFromXML(Operator.java:1513)
at com.rapidminer.Process.readProcess(Process.java:890)
at com.rapidminer.Process.<init>(Process.java:167)
at rapidminer.embedded.MyPipelineTest.runProcess(MyPipelineTest.java:14)
at rapidminer.embedded.MyPipelineTest.main(MyPipelineTest.java:21)
Thank you,
Maha
0
Answers
-
Hi,
I still have 4.6 installed, and can't find any operator of that name either. Try W-Apriori or W-PredictiveApriori ?0 -
Hello Maha
Seems like you are trying to extend rapidminer with your own operator. As far as I can see from over here, you somehow messed up the operators file (asssuming that you have created a plugin as described in the tutorial.pdf (also available on rapidminers download page on sourceforge)). You operators.xml file should look something like this ...
where class has to be the full qualified class name (i.e. including the complete package-name).
<operators>
<operator
name = "OperatorChain"
class = "com.rapidminer.operator.SimpleOperatorChain"
description = "A chain of operators that is subsequently applied."
icon = "chain"/>
</operators>
If this did not help you, please provide more information about the previous steps you have taken, otherwise we are restrained to guessing.
on a side note: I understand that you do not want to switch to rapidminer5.0 yet (a lot of things have changed), but please upgrade to version 4.6. Several bugs have fixed in this version you will hardly find anyone in this forum using an older version than this.
greetings,
steffen
0 -
Hi,haddock wrote:
Hi,
I still have 4.6 installed, and can't find any operator of that name either. Try W-Apriori or W-PredictiveApriori ?
CustomWAprior is my own operator, which I try to see whether is working as required or not. Thank you for responding my message.
Thank you so much,steffen wrote:
Hello Maha
Hello Steffen,
Seems like you are trying to extend rapidminer with your own operator. As far as I can see from over here, you somehow messed up the operators file (asssuming that you have created a plugin as described in the tutorial.pdf (also available on rapidminers download page on sourceforge)). You operators.xml file should look something like this ...
where class has to be the full qualified class name (i.e. including the complete package-name).
<operators>
<operator
name = "OperatorChain"
class = "com.rapidminer.operator.SimpleOperatorChain"
description = "A chain of operators that is subsequently applied."
icon = "chain"/>
</operators>
Yes, you are right. CustomWAprior is an extended oprator. All steps in tutorial.pdf (chapter 6) are followed but no plugins are created because this will be necessary in case that I want to make my own operators available for download or do I have to create a plugin?
My description file "operators.xml" :
<operators>
rapidminer.customOperator.CustomWApriori is the package, where the operator is located.
<operator
name = "CustomWApriori"
class = "rapidminer.customOperator.CustomWApriori"
description = "Generates association rules"
group = "Learner.Unsupervised.Itemsets.Weka" />
</operators>
If this did not help you, please provide more information about the previous steps you have taken, otherwise we are restrained to guessing.
Probably the problem is in declaring my operator to RapidMiner. I do not know how to add the new operator to my CLASSPATH variable. I am eclipse user.
on a side note: I understand that you do not want to switch to rapidminer5.0 yet (a lot of things have changed), but please upgrade to version 4.6. Several bugs have fixed in this version you will hardly find anyone in this forum using an older version than this.
This will be the next step
greetings,
steffen
Maha0 -
Hello Maha
Ok, I understand. To make rapidminer recognize your plugin you have to options (see also chapter 6 in the mentioned tutorial - pdf (version 4.5)).
1. You create a jar file, where the operators.xml is located in the directory META-INF, and put this jar into this path <your-rapidminer-installation>/lib/plugins (see section 6.9).
2. Assuming that you have both your plugin project and rapidminer available in eclipse and start rapidminer from within eclipse (for the basics see this link, except that you unpack the zip-file in your eclipse workspace instead of checking out the code from svn): Then select Run (from the menu) -> Run Configurations -> your-rapidminer-starrt-configuration and ...- add "-Drapidminer.operators.additional=path/to/your/operators.xml" to the arguments tab, i.e. the vm-arguments
- add your plugin-project to the classpath tab
The second strategy has the advantage that you can debug your plugin code easily. The first strategy is fine if your plugin is ready and you want to share it with others.
greetings,
steffen0 -
Hi Maha,
has this issue been solved?
Greetings,
Sebastian0 -
Hi Sebastian,
I don't know how to put operators.xml in directory MET-INF of the jar file, do you have any Idea?
I have used this comand " jar cfm MyJar.jar Manifest.txt input-files" in comand line to create the jar file.The content of the created jar file looks like this:
META-INF/
META-INF/ MANIFEST.MF
operators.xml
foo.java
....
thanks for supporting,
Maha0 -
Hi,
the problem is solved!!
A new META-INF directory have been created and I put the operators.xml as in normal caste (copy-paste), then the entring this comoand "jar cfm MyJar.jar Manifest.txt META-INF" will create a jar file as desired above.
I have followed the steps of Steffen. I have just changed " / " to " \ " becuase I am windows user.
I have got a new type ot errors, which need to work on it. We are trying to write filters for the assosiation rules of RapidMiner using Weka operators:
eption in thread "main" com.rapidminer.operator.UserError: CustomWApriori caused an error: weka.core.UnsupportedAttributeTypeException: weka.associations.Apriori: Cannot handle numeric attributes!
at rapidminer.customOperator.CustomWApriori.apply(CustomWApriori.java:104)
at com.rapidminer.operator.Operator.apply(Operator.java:671)
at com.rapidminer.operator.OperatorChain.apply(OperatorChain.java:424)
at com.rapidminer.operator.Operator.apply(Operator.java:671)
at com.rapidminer.Process.run(Process.java:735)
at com.rapidminer.Process.run(Process.java:704)
at com.rapidminer.Process.run(Process.java:694)
at rapidminer.embedded.MyPipelineTest.runProcess(MyPipelineTest.java:14)
at rapidminer.embedded.MyPipelineTest.main(MyPipelineTest.java:20)
Caused by: weka.core.UnsupportedAttributeTypeException: weka.associations.Apriori: Cannot handle numeric attributes!
at weka.core.Capabilities.test(Capabilities.java:942)
at weka.core.Capabilities.test(Capabilities.java:857)
at weka.core.Capabilities.test(Capabilities.java:1073)
at weka.core.Capabilities.test(Capabilities.java:1011)
at weka.core.Capabilities.testWithFail(Capabilities.java:1290)
at weka.associations.Apriori.buildAssociations(Apriori.java:407)
at rapidminer.customOperator.CustomWApriori.apply(CustomWApriori.java:101)
... 8 more
Thanks,
Maha0 -
Hello Maha ...
and congratulations !
Regarding the error:
The W-Apriori algorithmn cannot handle numerical attributes. Hence you have to discretize these features first. Check out the operators under RapidMinerGUI -> Preprocessing->Data->Discretization.
hope this was helpful
steffen0 -
Hi Maha,
just a short note: If you would switch to RapidMiner 5.0, there would be some extra effort for converting your operators, but every other thing will work better, especially the new way of building extensions is much more guided. No need for building jar files by hand. Everything is documented in the How to Extend Rapidminer 5.0 Tutorial in our shop. And it comes with eclipse project templates for building your own extensions.
But this is just a note. Just ignore it, if you want to stick to 4.5.
Greetings,
Sebastian0