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:
- Code: Select all
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)