# Ignition Reporting java.lang.NullPointerException

**URL:** <https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241>\
**Category:** Ignition\
**Tags:** reporting\
**Created:** [February 5, 2024, 4:20pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241 "2024-02-05T16:20:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Guindon\_Duroc](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nathan\_Guindon\_Duroc](https://forum.inductiveautomation.com/u/Nathan_Guindon_Duroc)\
**Post date:** [February 5, 2024, 4:20pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/1 "2024-02-05T16:20:23Z")

</div>

Hi,

I tried adding new data from a script to an existing report. But i always get this error:

 ![Capture d’écran 2024-02-05 111349](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/4/94d73894074c899411b102ca73b920b1720a94c2.png)

I tried a bunch of things but cannot figure out why it does this. As in an other report i have the same code but no error.

Here is the code causing the error:

```
dsAnnotationsJDB = system.db.runNamedQuery(
	path = 'Notes/Annotations/Get-NotesbyCodeLot',
	parameters = {'CodeLot': data['LotName']})

data['AnnotationsJDB'] = dsAnnotationsJDB

```

We are currently running igintion version 8.1.25 if it helps

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [February 6, 2024, 3:58pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/2 "2024-02-06T15:58:08Z")

</div>

There will be a stack trace in the logs with more details about the NPE. It would be helpful if you can copy that text and post it here (not a screenshot, please).

---

<div class="post-metadata">

**Author:** ![Nathan\_Guindon\_Duroc](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nathan\_Guindon\_Duroc](https://forum.inductiveautomation.com/u/Nathan_Guindon_Duroc)\
**Post date:** [February 12, 2024, 1:29pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/3 "2024-02-12T13:29:55Z")

</div>

Hi,

Here is the stack trace:

```auto
java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
	at java.desktop/javax.swing.SwingWorker.get(Unknown Source)
	at com.inductiveautomation.reporting.designer.workspace.design.PreviewPanel$PreviewGenerator.done(PreviewPanel.java:154)
	at java.desktop/javax.swing.SwingWorker$5.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
	at java.desktop/sun.swing.AccumulativeRunnable.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.Timer.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at com.inductiveautomation.snap.swing.RibsEventQueue.dispatchEvent(RibsEventQueue.java:99)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: null
	at com.inductiveautomation.rm.shape.RMTableRPG.rpgWithScaling(RMTableRPG.java:113)
	at com.inductiveautomation.rm.shape.RMTableGroupRPG.rpgAll(RMTableGroupRPG.java:66)
	at com.inductiveautomation.rm.shape.RMTableGroup.rpgAll(RMTableGroup.java:339)
	at com.inductiveautomation.rm.shape.ReportOwner.rpg(ReportOwner.java:178)
	at com.inductiveautomation.rm.shape.RMParentShape.rpgChildren(RMParentShape.java:597)
	at com.inductiveautomation.rm.shape.RMPage.rpgChildren(RMPage.java:696)
	at com.inductiveautomation.rm.shape.RMParentShape.rpgAll(RMParentShape.java:584)
	at com.inductiveautomation.rm.shape.RMPage.rpgAll(RMPage.java:659)
	at com.inductiveautomation.rm.shape.ReportOwner.rpg(ReportOwner.java:178)
	at com.inductiveautomation.rm.shape.RMDocument.rpgChildren(RMDocument.java:1125)
	at com.inductiveautomation.rm.shape.RMParentShape.rpgAll(RMParentShape.java:584)
	at com.inductiveautomation.rm.shape.ReportOwner.rpg(ReportOwner.java:178)
	at com.inductiveautomation.rm.shape.ReportOwner.generateReport(ReportOwner.java:169)
	at com.inductiveautomation.rm.shape.RMDocument.generateReport(RMDocument.java:1101)
	at com.inductiveautomation.rm.shape.RMDocument.generateReport(RMDocument.java:1069)
	at com.inductiveautomation.reporting.designer.workspace.design.PreviewPanel$PreviewGenerator.doInBackground(PreviewPanel.java:147)
	at com.inductiveautomation.reporting.designer.workspace.design.PreviewPanel$PreviewGenerator.doInBackground(PreviewPanel.java:126)
	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

```

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [February 12, 2024, 3:13pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/4 "2024-02-12T15:13:38Z")

</div>

Thanks, that's really helpful.

I'm not sure what in your project is making you hit this, but I can see what we need to fix in our code and I've opened ticket IGN-9246 for it.

Because I'm not sure what's causing this, I'd recommend you work with our support team on this for a workaround. Reference the above ticket number when you call or email in.

---

<div class="post-metadata">

**Author:** ![LCao](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lcao/32/35341_2.png) [@LCao](https://forum.inductiveautomation.com/u/LCao)\
**Post date:** [February 12, 2024, 8:00pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/5 "2024-02-12T20:00:21Z")

</div>

Hi Nathan,

We are investigating the issue and trying to replicate the bug in house. We were wondering do you happen to have any replication steps to trigger the bug?

Thank you!

---

<div class="post-metadata">

**Author:** ![Nathan\_Guindon\_Duroc](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nathan\_Guindon\_Duroc](https://forum.inductiveautomation.com/u/Nathan_Guindon_Duroc)\
**Post date:** [February 12, 2024, 8:36pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/6 "2024-02-12T20:36:44Z")

</div>

Hi,

I haven't told everything in my first post.  
The error comes when i create a table group and assign the data key to the data coming from the code i first submitted.

So in my case, the datakey is AnnotationsJDB.

The error occurs when i have the header/summary row activated or if the detail row is activated and i have actual data in the datakey.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/e/ee162e929c5f0b8a18bae5194eb6d68d377675a1.png)

Furthermore, the data coming from the script is a 1x2 dataset.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 12, 2024, 8:44pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/7 "2024-02-12T20:44:26Z")

</div>

> [@Nathan\_Guindon\_Duroc](#):
>
> tested the exact same code in the script console

This kind of statement pops up often. The script console's scope is **Vision** , not Reporting, nor Perspective. Lot's of scripting functions behave differently in different scopes. "Tested in the script console" is **not** sufficient.

Consider providing support with your actual project file, so they can replicate your actual problem.

---

<div class="post-metadata">

**Author:** ![LCao](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lcao/32/35341_2.png) [@LCao](https://forum.inductiveautomation.com/u/LCao)\
**Post date:** [February 14, 2024, 11:22pm UTC](https://forum.inductiveautomation.com/t/ignition-reporting-java-lang-nullpointerexception/85241/8 "2024-02-14T23:22:00Z")

</div>

Hi Nathan,

Thank you so much for the additional info, would it be possible to send over a project export to Support (you can email [support@inductiveautomation.com](mailto:support@inductiveautomation.com) or use [https://support.inductiveautomation.com/hc/en-us](https://support.inductiveautomation.com/hc/en-us)) to help us replicate the issue? You can reference IGN-9246 in the ticket.  
Thank you in advance!
