Thought wrong! I have still the NullPointerException ERROR if I close the solution (debug smart client) when the ‘customer’ form is in front.
I have checked all the elements on the form, also the functions and calculations. Went through the debugger at onLoad, onShow and onSolutionClose. Cannot find any bug or error but get now two NullPointerException errors while closing the smart client!?
It would be helpful if I could detect what is causing this error, but the error message is too inexact and it can be everything…
Perhaps this tracelog gives you an answer:
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug location of Application_frame java.awt.Point[x=10,y=22]
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug WindowPlugin: solution closed
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug questiondata[1] = 801 ,type: java.lang.Integer
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug questiondata[0] = ‘’ ,type: java.lang.String
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug used sql select distinct country from bc_customer where country = ? order by country asc limit ? questiondata.length 2
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug QuerySet { updates = , select = select distinct country from bc_customer where country = ? order by country asc limit ? [[,801]] <0^801>, cleanups = }
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug SELECT DISTINCT public:bc_customer#bccustomer1366.1073742926=country<12,20,0> FROM public:bc_customer#bccustomer1366 SEARCH (((public:bc_customer#bccustomer1366.1073742926=country<12,20,0>)=())) ORDER BY public:bc_customer#bccustomer1366.1073742926=country<12,20,0> ASC FILTER null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Analysing filters null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug sql select SELECT DISTINCT public:bc_customer#bccustomer1366.1073742926=country<12,20,0> FROM public:bc_customer#bccustomer1366 SEARCH (((public:bc_customer#bccustomer1366.1073742926=country<12,20,0>)=())) ORDER BY public:bc_customer#bccustomer1366.1073742926=country<12,20,0> ASC
2011-07-06 09:47 AWT-EventQueue-0 ERROR com.servoy.j2db.util.Debug Throwable
java.lang.NullPointerException
at com.servoy.j2db.scripting.SelectedRecordScope.getSelectedRecord(SelectedRecordScope.java:44)
at com.servoy.j2db.scripting.SelectedRecordScope.get(SelectedRecordScope.java:105)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1740)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1679)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3752)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:382)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3977)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3865)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3787)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3642)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:272)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:242)
at com.servoy.j2db.ui.BaseEventExecutor.fireLeaveCommands(BaseEventExecutor.java:197)
at com.servoy.j2db.smart.dataui.DataField$1.fireLeaveCommands(DataField.java:703)
at com.servoy.j2db.smart.dataui.DataField.stopUIEditing(DataField.java:2254)
at com.servoy.j2db.dataprocessing.DataAdapterList.stopUIEditing(DataAdapterList.java:580)
at com.servoy.j2db.dataprocessing.DataAdapterList.setRecord(DataAdapterList.java:357)
at com.servoy.j2db.dataprocessing.DataAdapterList.destroy(DataAdapterList.java:693)
at com.servoy.j2db.smart.dataui.DataRenderer.destroy(DataRenderer.java:223)
at com.servoy.j2db.FormController.deleteRenderers(FormController.java:1873)
at com.servoy.j2db.FormController.destroy(FormController.java:1833)
at com.servoy.j2db.FormManager.removeAllFormPanels(FormManager.java:860)
at com.servoy.j2db.smart.SwingFormManager.removeAllFormPanels(SwingFormManager.java:205)
at com.servoy.j2db.FormManager.destroySolutionSettings(FormManager.java:432)
at com.servoy.j2db.smart.SwingFormManager.destroySolutionSettings(SwingFormManager.java:404)
at com.servoy.j2db.debug.DebugJ2DBClient$DebugSwingFormMananger.destroySolutionSettings(DebugJ2DBClient.java:211)
at com.servoy.j2db.FormManager.propertyChange(FormManager.java:155)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:75)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at com.servoy.j2db.J2DBGlobals.firePropertyChange(J2DBGlobals.java:90)
at com.servoy.j2db.ClientState.closeSolution(ClientState.java:1140)
at com.servoy.j2db.smart.J2DBClient.closeSolution(J2DBClient.java:1969)
at com.servoy.j2db.debug.DebugJ2DBClient.closeSolution(DebugJ2DBClient.java:722)
at com.servoy.j2db.debug.DebugJ2DBClient.shutDown(DebugJ2DBClient.java:681)
at com.servoy.j2db.smart.J2DBClient$13.windowClosing(J2DBClient.java:1056)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
at java.awt.Window.processWindowEvent(Window.java:1865)
at javax.swing.JFrame.processWindowEvent(JFrame.java:274)
at java.awt.Window.processEvent(Window.java:1823)
at java.awt.Component.dispatchEventImpl(Component.java:4735)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:652)
at java.awt.EventQueue$2.run(EventQueue.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2011-07-06 09:47 AWT-EventQueue-0 ERROR com.servoy.j2db.util.Debug Throwable
java.lang.NullPointerException
at com.servoy.j2db.scripting.SelectedRecordScope.getSelectedRecord(SelectedRecordScope.java:44)
at com.servoy.j2db.scripting.SelectedRecordScope.get(SelectedRecordScope.java:105)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1740)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1679)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3752)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:382)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3977)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3865)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3787)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3642)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:272)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:242)
at com.servoy.j2db.ui.BaseEventExecutor.fireLeaveCommands(BaseEventExecutor.java:197)
at com.servoy.j2db.smart.dataui.DataField$1.fireLeaveCommands(DataField.java:703)
at com.servoy.j2db.smart.dataui.DataField.stopUIEditing(DataField.java:2254)
at com.servoy.j2db.dataprocessing.DataAdapterList.stopUIEditing(DataAdapterList.java:580)
at com.servoy.j2db.dataprocessing.DataAdapterList.setRecord(DataAdapterList.java:357)
at com.servoy.j2db.dataprocessing.DataAdapterList.destroy(DataAdapterList.java:693)
at com.servoy.j2db.smart.dataui.DataRenderer.destroy(DataRenderer.java:223)
at com.servoy.j2db.FormController.deleteRenderers(FormController.java:1873)
at com.servoy.j2db.FormController.destroy(FormController.java:1833)
at com.servoy.j2db.FormManager.removeAllFormPanels(FormManager.java:860)
at com.servoy.j2db.smart.SwingFormManager.removeAllFormPanels(SwingFormManager.java:205)
at com.servoy.j2db.FormManager.destroySolutionSettings(FormManager.java:432)
at com.servoy.j2db.smart.SwingFormManager.destroySolutionSettings(SwingFormManager.java:404)
at com.servoy.j2db.debug.DebugJ2DBClient$DebugSwingFormMananger.destroySolutionSettings(DebugJ2DBClient.java:211)
at com.servoy.j2db.FormManager.propertyChange(FormManager.java:155)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:75)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at com.servoy.j2db.J2DBGlobals.firePropertyChange(J2DBGlobals.java:90)
at com.servoy.j2db.ClientState.closeSolution(ClientState.java:1140)
at com.servoy.j2db.smart.J2DBClient.closeSolution(J2DBClient.java:1969)
at com.servoy.j2db.debug.DebugJ2DBClient.closeSolution(DebugJ2DBClient.java:722)
at com.servoy.j2db.debug.DebugJ2DBClient.shutDown(DebugJ2DBClient.java:681)
at com.servoy.j2db.smart.J2DBClient$13.windowClosing(J2DBClient.java:1056)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
at java.awt.Window.processWindowEvent(Window.java:1865)
at javax.swing.JFrame.processWindowEvent(JFrame.java:274)
at java.awt.Window.processEvent(Window.java:1823)
at java.awt.Component.dispatchEventImpl(Component.java:4735)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:652)
at java.awt.EventQueue$2.run(EventQueue.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug FormPanel ‘frm_logout’ created, Loaded forms: 28 of 128 (max).
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug -->DisplaysAdapter null with 1 displays, hash 1669911196
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug CreationalPrototype:get frm_logout scope com.servoy.j2db.scripting.CreationalPrototype@5dd9cdc1
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Find executed, time: 1 thread: AWT-EventQueue-0, sql: SELECT public:bc_user#bcuser1270.1073742960=id_user<4,0,0> FROM public:bc_user#bcuser1270 SEARCH (((public:bc_user#bcuser1270.1073742985=user_name<12,50,0>)=([admin]))) ORDER BY public:bc_user#bcuser1270.1073742960=id_user<4,0,0> ASC
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug questiondata[1] = 201 ,type: java.lang.Integer
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug questiondata[0] = ‘admin’ ,type: java.lang.String
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug used sql select id_user from bc_user where user_name = ? order by id_user asc limit ? questiondata.length 2
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug QuerySet { updates = , select = select id_user from bc_user where user_name = ? order by id_user asc limit ? [[admin,201]] <0^201>, cleanups = }
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug SELECT public:bc_user#bcuser1270.1073742960=id_user<4,0,0> FROM public:bc_user#bcuser1270 SEARCH (((public:bc_user#bcuser1270.1073742985=user_name<12,50,0>)=([admin]))) ORDER BY public:bc_user#bcuser1270.1073742960=id_user<4,0,0> ASC FILTER null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Analysing filters null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug sql select SELECT public:bc_user#bcuser1270.1073742960=id_user<4,0,0> FROM public:bc_user#bcuser1270 SEARCH (((public:bc_user#bcuser1270.1073742985=user_name<12,50,0>)=([admin]))) ORDER BY public:bc_user#bcuser1270.1073742960=id_user<4,0,0> ASC
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Search called for form ‘frm_user’
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Find started for tab form: frm_user
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug AWT-EventQueue-0: RefreshFrom DB time: 1 pks: 4, SQL: SELECT public:bc_user#bcuser1270.1073742960=id_user<4,0,0> FROM public:bc_user#bcuser1270 ORDER BY public:bc_user#bcuser1270.1073742960=id_user<4,0,0> ASC
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug questiondata[0] = 201 ,type: java.lang.Integer
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug used sql select id_user from bc_user order by id_user asc limit ? questiondata.length 1
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug QuerySet { updates = , select = select id_user from bc_user order by id_user asc limit ? [[201]] <0^201>, cleanups = }
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug SELECT public:bc_user#bcuser1270.1073742960=id_user<4,0,0> FROM public:bc_user#bcuser1270 ORDER BY public:bc_user#bcuser1270.1073742960=id_user<4,0,0> ASC FILTER null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug Analysing filters null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug sql select SELECT public:bc_user#bcuser1270.1073742960=id_user<4,0,0> FROM public:bc_user#bcuser1270 ORDER BY public:bc_user#bcuser1270.1073742960=id_user<4,0,0> ASC
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug WindowPlugin: currentWindow changed to null
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug WindowPlugin: currentWindow changed to dlg_basic
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug FormPanel ‘dlg_basic’ created, Loaded forms: 27 of 128 (max).
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug -->DisplaysAdapter fv_icon_med with 1 displays, hash 266929864
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug -->DisplaysAdapter fv_text_txt with 1 displays, hash 1064621924
2011-07-06 09:47 AWT-EventQueue-0 INFO com.servoy.j2db.util.Debug CreationalPrototype:get dlg_basic scope com.servoy.j2db.scripting.CreationalPrototype@5dd9cdc1