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

"Error on drop of custom operator"

jz87jz87 Member Posts: 5 Contributor II
edited May 2019 in Help
I'm learning to write custom operators. I followed the steps in the manual and customized some code from reading the source of existing operators. I wrote an ExampleSetWriter following the manual, called it ExSetWriter. Here's the screenshot of the error I get when I drag and drop my custom operator onto the canvas. What does this mean? What is null? Does it have anything to do with specifying a factory in the xml file?

image
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    it seems to me, there's some error in your code, causing the creation of your operator to crash.
    But without more information, I can't say something about it. If you switch on the debug mode by Tools/Preferences menu of rapidMiner and selecting rapidminer.general.debugmode, you will get a stack trace of the exception. This might point you to your mistake.

    Greetings,
      Sebastian
  • jz87jz87 Member Posts: 5 Contributor II
    This is the stack trace, none of it is my code.

    Nov 6, 2009 6:07:48 PM com.rapidminer.gui.flow.ProcessRenderer$6 dropNow
    WARNING: During drop: java.lang.NullPointerException
    java.lang.NullPointerException
            at com.rapidminer.gui.OperatorDocViewer.showHelptext(OperatorDocViewer.j
    ava:131)
            at com.rapidminer.gui.OperatorDocViewer.setDisplayedOperator(OperatorDoc
    Viewer.java:112)
            at com.rapidminer.gui.OperatorDocViewer.setSelection(OperatorDocViewer.j
    ava:250)
            at com.rapidminer.gui.MainFrame.fireSelectedOperatorChanged(MainFrame.ja
    va:1385)
            at com.rapidminer.gui.MainFrame.selectOperators(MainFrame.java:1379)
            at com.rapidminer.gui.flow.ProcessRenderer.selectOperator(ProcessRendere
    r.java:1851)
            at com.rapidminer.gui.flow.ProcessRenderer.selectOperator(ProcessRendere
    r.java:1788)
            at com.rapidminer.gui.flow.ProcessRenderer.access$26(ProcessRenderer.jav
    a:1787)
            at com.rapidminer.gui.flow.ProcessRenderer$6.dropNow(ProcessRenderer.jav
    a:407)
            at com.rapidminer.gui.dnd.ReceivingOperatorTransferHandler.importData(Re
    ceivingOperatorTransferHandler.java:290)
            at javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:146
    8)
            at java.awt.dnd.DropTarget.drop(DropTarget.java:434)
            at javax.swing.TransferHandler$SwingDropTarget.drop(TransferHandler.java
    :1193)
            at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTarget
    ContextPeer.java:500)
            at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEven
    t(SunDropTargetContextPeer.java:812)
            at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Su
    nDropTargetContextPeer.java:736)
            at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:30)
            at java.awt.Component.dispatchEventImpl(Component.java:4487)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574
    )
            at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:
    4309)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4163)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Nov 6, 2009 6:07:48 PM com.rapidminer.gui.dnd.ReceivingOperatorTransferHandler i
    mportData
    WARNING: Error in drop: java.lang.NullPointerException
    java.lang.NullPointerException
            at com.rapidminer.gui.OperatorDocViewer.showHelptext(OperatorDocViewer.j
    ava:131)
            at com.rapidminer.gui.OperatorDocViewer.setDisplayedOperator(OperatorDoc
    Viewer.java:112)
            at com.rapidminer.gui.OperatorDocViewer.setSelection(OperatorDocViewer.j
    ava:250)
            at com.rapidminer.gui.MainFrame.fireSelectedOperatorChanged(MainFrame.ja
    va:1385)
            at com.rapidminer.gui.MainFrame.selectOperators(MainFrame.java:1379)
            at com.rapidminer.gui.flow.ProcessRenderer.selectOperator(ProcessRendere
    r.java:1851)
            at com.rapidminer.gui.flow.ProcessRenderer.selectOperator(ProcessRendere
    r.java:1788)
            at com.rapidminer.gui.flow.ProcessRenderer.access$26(ProcessRenderer.jav
    a:1787)
            at com.rapidminer.gui.flow.ProcessRenderer$6.dropNow(ProcessRenderer.jav
    a:407)
            at com.rapidminer.gui.dnd.ReceivingOperatorTransferHandler.importData(Re
    ceivingOperatorTransferHandler.java:290)
            at javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:146
    8)
            at java.awt.dnd.DropTarget.drop(DropTarget.java:434)
            at javax.swing.TransferHandler$SwingDropTarget.drop(TransferHandler.java
    :1193)
            at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTarget
    ContextPeer.java:500)
            at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEven
    t(SunDropTargetContextPeer.java:812)
            at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Su
    nDropTargetContextPeer.java:736)
            at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:30)
            at java.awt.Component.dispatchEventImpl(Component.java:4487)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574
    )
            at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:
    4309)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4163)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
  • steffensteffen Member Posts: 347 Maven
    jz87,

    if you would also post your code here or send sebastian the plugin via pm you will increase the probability of getting help. Remember, the help is free and it is quite hard to motivate oneself to infer errors from stacktrace if more information is available. If this is a general error (as you suggest),  you can improve the quality of rm 5.0 by providing more information.

    just a remark

    Steffen

    PS: There is a formatter available ("#") to post code and other preformatted text.
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    sorry that I overlooked the screenshot in the first place, but at least now I noticed, that you are using RapidMiner 5.0. Since we haven't published anything about the new extension mechanism, I doubt, that your plugin works at all. In fact the extension mechanism hasn't been finished yet in the beta.
    I think you will have to wait until we publish the white paper how to develop own extensions for RapidMinern 5.

    Greetings,
      Sebastian
  • jz87jz87 Member Posts: 5 Contributor II
    Ok, that clears some things up. So the extension mechanism is totally different in v5 than v4? If I develop plugins for v4 now will I have to rewrite everything for v5?
  • cherokeecherokee Member Posts: 82 Maven
    Hi!

    I have already writen some operators for v4 and v5. For what I have done it seams that mainly the communication between operators has changed. So the way your operator can recieve Example Sets and send Attribute Weights for example. And don't forget the new Meta Data. But the actual work your operator does is still coded the same way. So I think you can write your operators for RM4 now and change only the "communication parts" after switchíng to RM5.

    Please be aware that (1) I have never worked with custom operator chains, so they might be completely another thing and (2) I'm writing for the beta right now. If the API changes for the final version the previous paragraph might be complete nonsense!!!

    Best regards,
    Michael

    P.S.: If you're really asking yourself what null is you might want to read a basic book about Java.

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi again,
    Michael is right, basically the communication is changed. This applies to the OperatorChains, too, which are now much more explicit.
    The api change between beta and final release won't be very great, but the extension mechanism is different. It now offers much more flexibility for specifying documentation to your operators, the color and icons of the operators. Even international error messages and gui element names can be added.
    As I already said a few times in this forum, we will add a white paper how to adapt your plugins. It's not that much work. As you might imagine, we had to port all 650 operators to Vega, too. And together with adding the meta data transformations it didn't take more than two month.

    Greetings,
      Sebastian
Sign In or Register to comment.