# NullPointerException when running Find/Replace

**URL:** <https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434>\
**Category:** Ignition\
**Created:** [November 15, 2012, 11:17pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434 "2012-11-15T23:17:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forum.inductiveautomation.com/u/Ron)\
**Post date:** [November 15, 2012, 11:17pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/1 "2012-11-15T23:17:04Z")

</div>

I am running Find/Replace on a window and get a “Uncaught NullPointerException” Error when I do. Any ideas on why? I can run Find/Replace on other windows without any issues. I assume I have an issue with one of my components, but there are many nested in this window. I don’t get any errors or have any issues with this window otherwise.  
This is the detailed error message:

java.lang.NullPointerException  
at javax.swing.ImageIcon.(Unknown Source)  
at com.inductiveautomation.factorypmi.designer.search.searchobjects.DynamicPropertyNameSearchObject.getIcon(DynamicPropertyNameSearchObject.java:43)  
at com.inductiveautomation.ignition.designer.findreplace.SearchReplaceDialog$ResultsTableModel$Renderer.getTableCellRendererComponent(SearchReplaceDialog.java:872)  
at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)  
at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)  
at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)  
at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.a(Unknown Source)  
at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paint(Unknown Source)  
at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.paint(Unknown Source)  
at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)  
at javax.swing.plaf.ComponentUI.update(Unknown Source)  
at javax.swing.JComponent.paintComponent(Unknown Source)  
at com.jidesoft.grid.CellStyleTable.paintComponent(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JViewport.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at javax.swing.JLayeredPane.paint(Unknown Source)  
at javax.swing.JComponent.paintChildren(Unknown Source)  
at javax.swing.JComponent.paintToOffscreen(Unknown Source)  
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)  
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)  
at javax.swing.RepaintManager.paint(Unknown Source)  
at javax.swing.JComponent.paint(Unknown Source)  
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)  
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)  
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)  
at java.awt.Container.paint(Unknown Source)  
at java.awt.Window.paint(Unknown Source)  
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)  
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)  
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)  
at javax.swing.RepaintManager.access$700(Unknown Source)  
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)  
at java.awt.event.InvocationEvent.dispatch(Unknown Source)  
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.awt.EventQueue.access$000(Unknown Source)  
at java.awt.EventQueue$1.run(Unknown Source)  
at java.awt.EventQueue$1.run(Unknown Source)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)  
at java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.awt.EventDispatchThread.pumpEventsForFilter(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)

Ignition v7.5.3 (b1163)  
Java: Sun Microsystems Inc. 1.6.0\_31

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 15, 2012, 11:40pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/2 "2012-11-15T23:40:36Z")

</div>

One of the component’s icons is missing. Either you have a 3rd party component with no icon, or more likely, the container component’s icon has mysteriously disappeared. This has been happening, and we’re not quite sure why. Does restarting the designer make the issue go away?

---

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forum.inductiveautomation.com/u/Ron)\
**Post date:** [November 15, 2012, 11:50pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/3 "2012-11-15T23:50:22Z")

</div>

Thanks Carl. After restarting the designer, the Find/Replace ran to completion without any errors.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 15, 2012, 11:57pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/4 "2012-11-15T23:57:23Z")

</div>

I’ve fixed the NPE, but it’s still a mystery as to where that icon is going…

---

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [November 16, 2012, 3:17pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/5 "2012-11-16T15:17:49Z")

</div>

I have encountered NullPointerException when running Search/Replace (just searching with no replace). In one particular instance, I was adding a sql tag and a custom property to a root container. The property was then bound to the new tag. I noticed that if I searched after adding a property-tag binding the error could occur. However, if I saved/updated the project after adding the binding, the error seemed to go away.

I have not taken the time to track down the cause of the issue as the error does happen that often. If I do encounter the NullPointerException error, I save/update the project and all runs as expected.

---

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [November 16, 2012, 3:20pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/6 "2012-11-16T15:20:50Z")

</div>

Whoops.

“I have not taken the time to track down the cause of the issue as the error does happen that often.” should read  
I have not taken the time to track down the cause of the issue as the error does NOT happen that often.

TGIF

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 16, 2012, 3:35pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/7 "2012-11-16T15:35:44Z")

</div>

Next time you see it can you post the full stack trace here so we can see if it’s the same issue or a different one please?

---

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forum.inductiveautomation.com/u/Ron)\
**Post date:** [November 16, 2012, 3:49pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/8 "2012-11-16T15:49:54Z")

</div>

Will Do.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 16, 2012, 4:13pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/9 "2012-11-16T16:13:15Z")

</div>

Ron: You did post the full stack trace 🙂 I meant markdobtech

---

<div class="post-metadata">

**Author:** ![markdobtech](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@markdobtech](https://forum.inductiveautomation.com/u/markdobtech)\
**Post date:** [November 16, 2012, 10:25pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/10 "2012-11-16T22:25:31Z")

</div>

Will do.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [November 16, 2012, 11:51pm UTC](https://forum.inductiveautomation.com/t/nullpointerexception-when-running-find-replace/5434/11 "2012-11-16T23:51:20Z")

</div>

thanks 🙂
