Please help: RMI and Swing/AWT issue

Hi guys, I've been having a lot of trouble trying to get a GUI application to work with RMI. I'd appreciate any help. Here's the story:
I wrote a Java application and its GUI using Netbeans. In a nutshell, the application is about performing searches. I am now at the point where I need exterior programs to use my application's search capabilities, thus needing RMI. Such exterior programs are to call methods currently implemented in my application.
I implemented RMI, and got the client --> server communication working. However, the GUI just breaks. It starts outputting exceptions, gets delayed, doesn't update properly, some parts of it stop working.... basically hysterical behavior.
Now take a look at this line within my server class:
Naming.rebind("SearchProgram", mySearchProgram);
If I take it out, RMI obviously does not work... but the application and its GUI work flawlessly. If I put it in, the RMI calls work, but the GUI's above symptoms occur again. Among the symptoms are null pointer exceptions which all look similar, are related to "AWT-EventQueue-0", and keep ocurring. Here's just snippet of the errors outputted:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize(MetalScrollBarUI.java:102)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.JScrollBar.getMinimumSize(JScrollBar.java:704)
at javax.swing.ScrollPaneLayout.minimumLayoutSize(ScrollPaneLayout.java:624)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:433)
at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:375)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:400)
at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:310)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:434)
at javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:251)
at javax.swing.plaf.basic.DefaultMenuLayout.preferredLayoutSize(DefaultMenuLayout.java:38)
at java.awt.Container.preferredSize(Container.java:1558)
at java.awt.Container.getPreferredSize(Container.java:1543)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
at javax.swing.JRootPane$RootLayout.layoutContainer(JRootPane.java:910)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
There are no complaints about anything within my code, it's all GUI related whenever I make a bind() or rebind() call.
Again, any help here would be great... cause this one's just beating me.
Thanks!

Maybe you want to change that worker thread to
not do RMI but anything else (dummy data) to see if it really is RMI, I doubt it, I think you are updating some structures that have to do with swing GUI and hence you will hang.
Just check this out.

Similar Messages

Maybe you are looking for

  • Aggregation level not getting deleted.

    Hi All , We have deleted the aggregation levels from our development system and captured them in one change request. On transporting this request to quality (the transport is going successful) ,the objects are not getting deleted and getting displaye

  • DELETE TASK STATUS in TABLE

    Hi Gurus,               If I delete notification task those tasks status is not showing delete status in jest table.Due to thiswhen we want to execut the transaction( client Development) for all notification having open task then these delete notific

  • How do I transfer Keynote '09 from one eMac to another eMac?

    How do I transfer Keynote '09 from one eMac to another eMac?

  • How data in transferred to data nodes from Azure Blob?

    I started a HDInsight cluster which was using a Azure blob storage. After looking at the jobs counters I noticed that there are some 'local' and 'rack-local' mappers for the job. I wonder to know what this local mappers mean? as far as I understood t

  • Kernel panics mbp mid 2010

    i got kernel panics on a regular basis, now i reinstalled lion hoping it would fix the problem but i was wrong. could anyone help me please? thanks in advance Tue Oct 25 19:18:54 2011 panic(cpu 2 caller 0xffffff80002aa48e): "pmap_page_protect() " "pm