Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tom Verhage
Reporter: Timon Veenstra
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

NullPointer exception when removing a cropfield using the action in the layer list

Created: 13/Jan/13 04:30 PM   Updated: 23/Jan/13 12:18 PM   Resolved: 22/Jan/13 10:03 AM
Component/s: Field, Geoviewer
Affects Version/s: 12.12
Fix Version/s: 13.01

Time Tracking:
Not Specified

Participants: Merijn Zengers, Timon Veenstra and Tom Verhage

 Description  « Hide
  • create a field
  • create a production unit
  • drag the field to the production unit.
  • put the cropfield on the map and split it.
  • remove one of the cropfields by choosing "remove cropfield" action in the layerlist context menu
    EXPECTED: cropfield is removed from the production unit and from the map
    ACTUAL: NullPointer Exception

note: cropfield is removed from the production unit and from the map, so the error seems mainly cosmetical

Timon Veenstra added a comment - 13/Jan/13 04:30 PM

at java.util.concurrent.ConcurrentHashMap.hash(
at java.util.concurrent.ConcurrentHashMap.get(
at nl.cloudfarming.client.model.EntityCache$DefaultImpl.get(
at nl.cloudfarming.client.model.AbstractEntityManager.find(
at nl.cloudfarming.client.productionunit.RemoveCropFieldAction.actionPerformed(
[catch] at org.openide.awt.InjectorAny.actionPerformed(
at org.openide.awt.ContextAction$Performer.actionPerformed(
at org.openide.awt.ContextManager.actionPerformed(
at org.openide.awt.ContextAction.actionPerformed(
at org.openide.util.actions.ActionInvoker$
at org.openide.util.actions.ActionInvoker.doPerformAction(
at org.openide.util.actions.ActionInvoker.invokeAction(
at org.openide.awt.GeneralAction$BaseDelAction.actionPerformed(
at javax.swing.AbstractButton.fireActionPerformed(
at javax.swing.AbstractButton$Handler.actionPerformed(
at javax.swing.DefaultButtonModel.fireActionPerformed(
at javax.swing.DefaultButtonModel.setPressed(
at javax.swing.AbstractButton.doClick(
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
at java.awt.Component.processMouseEvent(
at javax.swing.JComponent.processMouseEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.LightweightDispatcher.retargetMouseEvent(
at java.awt.LightweightDispatcher.processMouseEvent(
at java.awt.LightweightDispatcher.dispatchEvent(
at java.awt.Container.dispatchEventImpl(
at java.awt.Window.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$200(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at org.netbeans.core.TimableEventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

Merijn Zengers added a comment - 22/Jan/13 10:03 AM

Caused by the fact that the map has two nodes in the lookup which represent the same original node. The Layer list has a layer node and the map has a filternode. On remove the parent uri of the cropfield is set to null then another run occurs where the parent uri is needed.

Added review request under

Merijn Zengers added a comment - 23/Jan/13 11:05 AM

Pushed in

changeset: 2795:ccfa81278ace
tag: tip
user: Merijn Zenges <>
date: Wed Jan 23 12:04:54 2013 +0100
summary: AGROSENSE-1388

Tom Verhage added a comment - 23/Jan/13 12:18 PM

Tested 23-01-2013, works as expected now.