# Jasper Report NPE Error

**URL:** <https://forum.servoy.com/t/jasper-report-npe-error/19575>\
**Category:** Classic Servoy\
**Created:** [January 19, 2018, 1:34am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575 "2018-01-19T01:34:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 19, 2018, 1:34am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/1 "2018-01-19T01:34:37Z")

</div>

Servoy Developer Version: 8.2.1.3105  
JRE: 1.8.0\_121  
Jasper Studio: 6.4.3 final  
Jasper Report Plugin: Version 6.4.1

Our solution creates invoices based on Jasper Reports (and sub-reports). The last time these reports were compiled was on 01 October 2016 using Jasper Studio 6.2 and Jasper Report Plugin 6.0. Things have been working fine.

We recently upgraded to Jasper Report Plugin 6.4.1 and can still create invoices. No problems so far.

Now we want to modify the invoice. We can load and run the invoice.jrxml file in Studio preview mode with no problems. So, we compile the report (and sub-reports) to an invoice.jasper file with no errors. However, when we try to create invoices within our solution using invoice.jasper, we get a null exception pointer (NPE) error message in the console (see below). Neither our solution code nor the invoice.jrxml code has been modified. We cannot find what is causing the NPE problem and are looking for suggestions. Any help is appreciated.

Line number 1404 refers to the line of code that creates the invoice:

```auto
plugins.jasperPluginRMI.runReport( 'arm_data', 'ARM_Report_EOM_Invoice.jasper', false, plugins.jasperPluginRMI.OUTPUT_FORMAT.PDF, params )

```

Thanks in advance!

Console error message:

> ERROR com.servoy.j2db.util.Debug - Throwable  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1404 (EOM\_invoiceCreate)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1209 (EOM\_invoiceGenerate)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom\_invoice\_selector\_generate.js:93 (ACTION\_buttonRun)  
> at C:\Users\kim\servoy82\_workspace\ARM\_core\globals.js:2584 (showInModalWindow)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:929 (ACTION\_buttonGenerateInvoices)  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1404)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1404 (EOM\_invoiceCreate)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1209 (EOM\_invoiceGenerate)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom\_invoice\_selector\_generate.js:93 (ACTION\_buttonRun)  
> at C:\Users\kim\servoy82\_workspace\ARM\_core\globals.js:2584 (showInModalWindow)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:929 (ACTION\_buttonGenerateInvoices)

And, in the servoy\_log.txt file, we find the NPE as the cause:

> 2018-01-18 16:37:19,553 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1404)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1404 (EOM\_invoiceCreate)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1209 (EOM\_invoiceGenerate)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom\_invoice\_selector\_generate.js:93 (ACTION\_buttonRun)  
> at C:\Users\kim\servoy82\_workspace\ARM\_core\globals.js:2584 (showInModalWindow)  
> at C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:929 (ACTION\_buttonGenerateInvoices)  
> [F11CCF14-F698-4D83-B894-A1A17C9E4F90 ARM]  
> org.mozilla.javascript.WrappedException: Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1404)  
> at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1815)  
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:180)  
> at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)  
> at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1774)  
> at script.EOM\_invoiceCreate(C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1404)  
> at script.EOM\_invoiceGenerate(C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:1209)  
> at script.ACTION\_buttonRun(C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom\_invoice\_selector\_generate.js:93)  
> at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:837)  
> at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:158)  
> at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:665)  
> at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:394)  
> at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:1063)  
> at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:945)  
> at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:812)  
> at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:1041)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:299)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:265)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:233)  
> at com.servoy.j2db.smart.dataui.AbstractScriptLabel$5.mouseReleased(AbstractScriptLabel.java:929)  
> at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)  
> at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)  
> at java.awt.Component.processMouseEvent(Unknown Source)  
> at javax.swing.JComponent.processMouseEvent(Unknown Source)  
> at java.awt.Component.processEvent(Unknown Source)  
> at java.awt.Container.processEvent(Unknown Source)  
> at java.awt.Component.dispatchEventImpl(Unknown Source)  
> at java.awt.Container.dispatchEventImpl(Unknown Source)  
> at java.awt.Component.dispatchEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
> at java.awt.Container.dispatchEventImpl(Unknown Source)  
> at java.awt.Window.dispatchEventImpl(Unknown Source)  
> at java.awt.Component.dispatchEvent(Unknown Source)  
> at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
> at java.awt.EventQueue.access$500(Unknown Source)  
> at java.awt.EventQueue$3.run(Unknown Source)  
> at java.awt.EventQueue$3.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.awt.EventQueue$4.run(Unknown Source)  
> at java.awt.EventQueue$4.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.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.pumpEventsForFilter(Unknown Source)  
> at java.awt.WaitDispatchSupport$2.run(Unknown Source)  
> at java.awt.WaitDispatchSupport$4.run(Unknown Source)  
> at java.awt.WaitDispatchSupport$4.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.awt.WaitDispatchSupport.enter(Unknown Source)  
> at java.awt.Dialog.show(Unknown Source)  
> at java.awt.Component.show(Unknown Source)  
> at java.awt.Component.setVisible(Unknown Source)  
> at java.awt.Window.setVisible(Unknown Source)  
> at java.awt.Dialog.setVisible(Unknown Source)  
> at com.servoy.j2db.util.gui.JEscapeDialog.setVisible(JEscapeDialog.java:170)  
> at com.servoy.j2db.gui.FormDialog.setVisible(FormDialog.java:164)  
> at com.servoy.j2db.smart.SwingRuntimeWindow.finalizeShowWindow(SwingRuntimeWindow.java:875)  
> at com.servoy.j2db.smart.SwingRuntimeWindow.doOldShowInDialog(SwingRuntimeWindow.java:511)  
> at com.servoy.j2db.smart.SwingRuntimeWindow.doOldShow(SwingRuntimeWindow.java:420)  
> at com.servoy.j2db.scripting.RuntimeWindow.doShow(RuntimeWindow.java:304)  
> at com.servoy.j2db.scripting.RuntimeWindow.show(RuntimeWindow.java:298)  
> at com.servoy.j2db.scripting.RuntimeWindow.showObject(RuntimeWindow.java:285)  
> at com.servoy.j2db.scripting.JSWindow.js\_show(JSWindow.java:155)  
> at sun.reflect.GeneratedMethodAccessor389.invoke(Unknown Source)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
> at java.lang.reflect.Method.invoke(Unknown Source)  
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)  
> at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)  
> at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1774)  
> at script.showInModalWindow(C:\Users\kim\servoy82\_workspace\ARM\_core\globals.js:2584)  
> at script.ACTION\_buttonGenerateInvoices(C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js:929)  
> at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:837)  
> at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:158)  
> at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)  
> at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204)  
> at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:156)  
> at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:665)  
> at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:394)  
> at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:1063)  
> at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:945)  
> at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:812)  
> at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:1041)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:299)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:265)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:233)  
> at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:228)  
> at com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:660)  
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)  
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)  
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)  
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)  
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)  
> at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)  
> at java.awt.Component.processMouseEvent(Unknown Source)  
> at javax.swing.JComponent.processMouseEvent(Unknown Source)  
> at java.awt.Component.processEvent(Unknown Source)  
> at java.awt.Container.processEvent(Unknown Source)  
> at java.awt.Component.dispatchEventImpl(Unknown Source)  
> at java.awt.Container.dispatchEventImpl(Unknown Source)  
> at java.awt.Component.dispatchEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
> at java.awt.Container.dispatchEventImpl(Unknown Source)  
> at java.awt.Window.dispatchEventImpl(Unknown Source)  
> at java.awt.Component.dispatchEvent(Unknown Source)  
> at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
> at java.awt.EventQueue.access$500(Unknown Source)  
> at java.awt.EventQueue$3.run(Unknown Source)  
> at java.awt.EventQueue$3.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.awt.EventQueue$4.run(Unknown Source)  
> at java.awt.EventQueue$4.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.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)  
> Caused by: java.lang.Exception: java.lang.NullPointerException  
> at com.servoy.plugins.jasperreports.JasperReportsProvider.runReport(JasperReportsProvider.java:527)  
> at com.servoy.plugins.jasperreports.JasperReportsProvider.js\_runReport(JasperReportsProvider.java:372)  
> at com.servoy.plugins.jasperreports.JasperReportsProvider.js\_runReport(JasperReportsProvider.java:251)  
> at com.servoy.plugins.jasperreports.JasperReportsProvider.js\_runReport(JasperReportsProvider.java:194)  
> at sun.reflect.GeneratedMethodAccessor365.invoke(Unknown Source)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
> at java.lang.reflect.Method.invoke(Unknown Source)  
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)  
> … 122 more  
> Caused by: java.lang.NullPointerException  
> at net.sf.jasperreports.engine.fill.JRHorizontalFiller.fillReport(JRHorizontalFiller.java:141)  
> at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:558)  
> at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)  
> at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:742)  
> at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:58)  
> at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:216)  
> at com.servoy.plugins.jasperreports.ServoyThreadSubreportRunnerFactory$1.run(ServoyThreadSubreportRunnerFactory.java:77)  
> at java.lang.Thread.run(Unknown Source)

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 20, 2018, 12:40am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/2 "2018-01-20T00:40:49Z")

</div>

More info…

We can alter and compile the main invoice report, and it will run in our solution. The problem occurs when we compile any of the sub-reports…none of the compiled sub-reports will run in our solution (that is, they produce the NPE error). Has something changed in the plugin in regards to how sub-reports are handled? Again, the report runs perfectly in Jasper Studio.

---

<div class="post-metadata">

**Author:** ![mnaeimi](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mnaeimi/32/5027_2.png) [@mnaeimi](https://forum.servoy.com/u/mnaeimi)\
**Post date:** [January 22, 2018, 9:02am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/3 "2018-01-22T09:02:33Z")

</div>

Hi Kim,

How “connection expression” (for subreports) is defined?

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 22, 2018, 10:22pm UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/4 "2018-01-22T22:22:24Z")

</div>

Hi, Mina.

Thank you for responding.

On the main report, for each subreport callout, the subreport properties are set as follows:

> **Conntection Expression:** $P{REPORT\_CONNECTION}
> 
> **Expression:** $P{SUBREPORT\_DIR} + “theSubReportName”

where $P{SUBREPORT\_DIR} is a parameter created in the main report as follows:

> **$P{SUBREPORT\_DIR}:** “C:/Servoy/application\_server/reports/arm/”

No foundset is passed to the main report, only the database name (along with three parameters). The main report and subreports each have their own unique SQL statements and use the three parameters to extract data accordingly.

---

<div class="post-metadata">

**Author:** ![mnaeimi](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mnaeimi/32/5027_2.png) [@mnaeimi](https://forum.servoy.com/u/mnaeimi)\
**Post date:** [January 24, 2018, 11:18am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/5 "2018-01-24T11:18:41Z")

</div>

Hi Kim,

Never use the static path for SUBREPORT\_DIR. If reports and subreports both are in the same folder,

in JRXML:  
set default value expression for SUBREPORT\_DIR = “”

Servoy code:  
var params = new java.util.HashMap()  
params.put(‘SUBREPORT\_DIR’, “\”);  
plugins.jasperPluginRMI.runReport(“example\_data”, “example.jrxml”, null, plugins.jasperPluginRMI.OUTPUT\_FORMAT.VIEW, params);

in Servoy admin page ([http://localhost:8080/servoy-admin/plugin-settings](http://localhost:8080/servoy-admin/plugin-settings))  
set directory.jasper.report to report directory (here you can set static path).

Hope it helps.Let me know how it works.

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 25, 2018, 1:21am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/6 "2018-01-25T01:21:35Z")

</div>

Hi, Mina.

Thank you, again, for responding.

> Never use the static path for SUBREPORT\_DIR.

If I recall, I had to do the above to make the report work.

Here is some additional information:

All reports and subreports are in the same folder and are of type **.jasper**  
The report folder pathname is **C:/Servoy/application\_server/reports/arm**  
The Servoy admin page, plugins, Jasper, directory.jasper.report is set to **C:/Servoy/application\_server/reports**  
In the application, we set the relative path as follows: **plugins.jasperPluginRMI.relativeReportsDirectory = ‘arm’**

I made the changes you suggested:

Set default value expression for SUBREPORT\_DIR = “” in main report:  
  
  
  
Pass parameter SUBREPORT\_DIR in params using Javascript notation, var params = {SUBREPORT\_DIR: ‘\’, …}  
In runReport(), replaced **false** with **null** for outputOptions  
[/list:u]

The report still will not run. I have tried many combinations of the SUBREPORT\_DIR parameter (e.g. ‘\’, ‘.\’, ‘’ (empty), ‘C:/Servoy/application\_server/reports/arm’, etc.) and get either a NPE or subreport not found error message.

I have not before seen the ‘\’ used in the SUBREPORT\_DIR expression…what is the purpose? In researching the Jasper forum today, I saw a posting where it was ‘.\’ (note the period).

Thanks!

---

<div class="post-metadata">

**Author:** ![lwjwillemsen](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lwjwillemsen/32/4987_2.png) [@lwjwillemsen](https://forum.servoy.com/u/lwjwillemsen)\
**Post date:** [January 25, 2018, 8:03am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/7 "2018-01-25T08:03:01Z")

</div>

We use value “.\” for SUBREPORT\_DIR and that works ok for the sub reports placed in the Jasperreports report directory.  
That is a relative directory notation starting from the Jasperreports report directory.

---

<div class="post-metadata">

**Author:** ![mnaeimi](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mnaeimi/32/5027_2.png) [@mnaeimi](https://forum.servoy.com/u/mnaeimi)\
**Post date:** [January 25, 2018, 9:55am UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/8 "2018-01-25T09:55:19Z")

</div>

Good day Kim,

As Lambert said (\ or .\) is a relative path to the jasperreport directory.

Please set ‘SUBREPORT\_DIR’ to “arm//”.

var params = new java.util.HashMap()  
params.put(‘SUBREPORT\_DIR’, “arm//”);  
plugins.jasperPluginRMI.runReport(“example\_data”, “example.jrxml”, null, plugins.jasperPluginRMI.OUTPUT\_FORMAT.VIEW, params);

I assume the plugin doesn’t look at this property plugins.jasperPluginRMI.relativeReportsDirectory.

Let me how it works.

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 25, 2018, 10:42pm UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/9 "2018-01-25T22:42:05Z")

</div>

Thank you both for the explanation regarding the ‘.\’ and ‘\’ notation. I found that this notation does include the relative folder (in this case ‘arm’) gleaned from the results below.

Below are the results for various SUBREPORT\_DIR values (for brevity, showing only the ERROR lines from the stack).

**Using ‘arm’**

> ERROR com.servoy.j2db.util.Debug - Resource not found at: C:/Servoy/application\_server/reports/arm/armARM\_Report\_EOM\_Invoice\_Group\_2.jasper.  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: Resource not found at: C:/Servoy/application\_server/reports/arm/armARM\_Report\_EOM\_Invoice\_Group\_2.jasper. (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘arm//’**

> ERROR com.servoy.j2db.util.Debug - Resource not found at: C:/Servoy/application\_server/reports/arm/arm//ARM\_Report\_EOM\_Invoice\_Group\_2.jasper.  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: Resource not found at: C:/Servoy/application\_server/reports/arm/arm//ARM\_Report\_EOM\_Invoice\_Group\_2.jasper. (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘arm/’**

> ERROR com.servoy.j2db.util.Debug - Resource not found at: C:/Servoy/application\_server/reports/arm/arm/ARM\_Report\_EOM\_Invoice\_Group\_2.jasper.  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: Resource not found at: C:/Servoy/application\_server/reports/arm/arm/ARM\_Report\_EOM\_Invoice\_Group\_2.jasper. (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘//’**

> ERROR com.servoy.j2db.util.Debug - SUBREPORT\_DIR cannot be specified as an absolute location; please use a location relative to the reports directory  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: SUBREPORT\_DIR cannot be specified as an absolute location; please use a location relative to the reports directory (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘//arm’**

> ERROR com.servoy.j2db.util.Debug - SUBREPORT\_DIR cannot be specified as an absolute location; please use a location relative to the reports directory  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: SUBREPORT\_DIR cannot be specified as an absolute location; please use a location relative to the reports directory (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘.//’**

> ERROR com.servoy.j2db.util.Debug - Throwable  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘.//arm’**

> ERROR com.servoy.j2db.util.Debug - Resource not found at: C:/Servoy/application\_server/reports/arm/.//armARM\_Report\_EOM\_Invoice\_Group\_2.jasper.  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: Resource not found at: C:/Servoy/application\_server/reports/arm/.//armARM\_Report\_EOM\_Invoice\_Group\_2.jasper. (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘/’**

> ERROR com.servoy.j2db.util.Debug - Throwable  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘\’**

> ERROR com.servoy.j2db.util.Debug - Throwable  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘.\’**

> ERROR com.servoy.j2db.util.Debug - Throwable  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: java.lang.NullPointerException (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘.\arm’**

> ERROR com.servoy.j2db.util.Debug - Resource not found at: C:/Servoy/application\_server/reports/arm/./armARM\_Report\_EOM\_Invoice\_Group\_2.jasper.  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: Resource not found at: C:/Servoy/application\_server/reports/arm/./armARM\_Report\_EOM\_Invoice\_Group\_2.jasper. (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

**Using ‘’ (empty string)**

> ERROR com.servoy.j2db.util.Debug - Resource not found at: ARM\_Report\_EOM\_Invoice\_Group\_2.jasper.  
> ERROR com.servoy.j2db.util.Debug - Wrapped java.lang.Exception: net.sf.jasperreports.engine.JRException: Resource not found at: ARM\_Report\_EOM\_Invoice\_Group\_2.jasper. (C:\Users\kim\servoy82\_workspace\ARM\_eom\forms\eom.js#1405)

---

<div class="post-metadata">

**Author:** ![mnaeimi](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mnaeimi/32/5027_2.png) [@mnaeimi](https://forum.servoy.com/u/mnaeimi)\
**Post date:** [January 26, 2018, 1:55pm UTC](https://forum.servoy.com/t/jasper-report-npe-error/19575/10 "2018-01-26T13:55:16Z")

</div>

please send me jrxml files (main report and subreports). Also I would like to know which jasper plugin you are using (basic, advanced, barcode or chart plugin).
