• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NullPoniter Exception while Adding in JComboBox

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All, My application is a Applet - EJB based and Server is sending Serialized Objects to add in to the JCOMBOBOX object.

I have the following Exception coming up after a few iteratons ( 100 - 200 ) of poping up the screen again & again after closing which I am doing at a normal speed.

-----------------------------------------------------------------
List lstSeverities = (List)e.getReturnValue();
if(lstSeverities!=null){
Iterator oIterator = lstSeverities.iterator();
while (oIterator.hasNext())
{
CaseSeverity oCaseSeverity = (CaseSeverity)oIterator.next();
if(oCaseSeverity != null && oCaseSeverity.getSeverityName() != null)
m_cbxSeverity.addItem(oCaseSeverity); /* This Statement is throwing exception.*/
}
}

java.lang.NullPointerException
at javax.swing.plaf.basic.BasicComboBoxUI$ListDataHandler.contentsChanged(Unknown Source)
at javax.swing.plaf.basic.BasicComboBoxUI$ListDataHandler.intervalAdded(Unknown Source)
at javax.swing.AbstractListModel.fireIntervalAdded(Unknown Source)
at javax.swing.DefaultComboBoxModel.addElement(Unknown Source)
at javax.swing.JComboBox.addItem(Unknown Source)
at sync.client.contactmgmt.activity.CaseGeneral.handleResponse(CaseGeneral.java:1382)
at sync.client.gateway.ServerProxy.handleResponse(ServerProxy.java:96)
at sync.client.gateway.UniversalGateway$1.run(UniversalGateway.java:142)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Note - 1. This Exception is coming only once in some 200 repetitions.
2. The issue is with only this ComboBox , I have another 10 ComboBox.
3. This ComboBox is populated with sealirized objects.

Please help to identify the cause and to resolve this.

Thanks.
 
sonu arora
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please suggest to debug this.
 
reply
    Bookmark Topic Watch Topic
  • New Topic