Hi All,
I am using Servoy 8 ngclient .We have set the databasemanager.setAutoSave to false initially. We are creating a new record or changing a value in the related foundset . After that we are doing databasemanager.savedata(record ) . This is throwing a null pointer exception . We could not able to fix this issue. Please advise me. How to fix this issue ?.
What is the exception that you get?
Hi Andrei,
Thanks for your reply .( Wrapped java.lang.NullPointerException ) . This is the exception in the console we are getting . no more information . please help .
You should see more info in the application_server/servoy_log.txt file.
A full stack dump should be there when this NPE happens.
Hi Andrie ,
Please find the exception below .
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (D:\Servoy\TSM1\Workspace\customerPortalJobs\forms\jobs_detail.js#102)
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.onSaveAction(D:\Servoy\TSM1\Workspace\customerPortalJobs\forms\jobs_detail.js:102)
at script.onSaveDetailForm(D:\Servoy\TSM1\Workspace\TSM7CustomerPortal\forms\outerFrame.js:55)
at script.onActionButtonAction(D:\Servoy\TSM1\Workspace\TSM7CustomerPortal\forms\outerFrame.js:165)
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:654)
at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:393)
at com.servoy.j2db.server.ngclient.component.EventExecutor.executeEvent(EventExecutor.java:188)
at com.servoy.j2db.server.ngclient.DataAdapterList.executeEvent(DataAdapterList.java:106)
at com.servoy.j2db.server.ngclient.WebFormComponent$FormcomponentEventHandler.executeEvent(WebFormComponent.java:256)
at org.sablo.BaseWebObject.doExecuteEvent(BaseWebObject.java:140)
at org.sablo.BaseWebObject.executeEvent(BaseWebObject.java:129)
at org.sablo.services.server.FormServiceHandler.executeEvent(FormServiceHandler.java:140)
at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeEvent(NGFormServiceHandler.java:313)
at org.sablo.services.server.FormServiceHandler.executeMethod(FormServiceHandler.java:87)
at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeMethod(NGFormServiceHandler.java:301)
at org.sablo.websocket.WebsocketEndpoint$3.run(WebsocketEndpoint.java:278)
at org.sablo.eventthread.Event$1.run(Event.java:100)
at org.sablo.websocket.CurrentWindow.runForWindow(CurrentWindow.java:77)
at org.sablo.eventthread.Event.execute(Event.java:90)
at org.sablo.eventthread.EventDispatcher.dispatch(EventDispatcher.java:125)
at org.sablo.eventthread.EventDispatcher.run(EventDispatcher.java:89)
at com.servoy.j2db.server.ngclient.eventthread.NGEventDispatcher.run(NGEventDispatcher.java:55)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.servoy.j2db.server.ngclient.property.FoundsetTypeSabloValue.getDataAdapterList(FoundsetTypeSabloValue.java:831)
at com.servoy.j2db.server.ngclient.property.FoundsetTypeChangeMonitor.recordsUpdated(FoundsetTypeChangeMonitor.java:365)
at com.servoy.j2db.server.ngclient.property.FoundsetTypeViewport$1.foundSetChanged(FoundsetTypeViewport.java:185)
at com.servoy.j2db.dataprocessing.FoundSet$2.run(FoundSet.java:5127)
at com.servoy.j2db.dataprocessing.FoundSet.fireFoundSetEvent(FoundSet.java:5134)
at com.servoy.j2db.dataprocessing.FoundSet.fireFoundSetEvent(FoundSet.java:5105)
at com.servoy.j2db.dataprocessing.SwingFoundSet.fireFoundSetEvent(SwingFoundSet.java:140)
at com.servoy.j2db.dataprocessing.EditRecordList.fireEvents(EditRecordList.java:1265)
at com.servoy.j2db.dataprocessing.EditRecordList.stopEditing(EditRecordList.java:883)
at com.servoy.j2db.dataprocessing.EditRecordList.stopEditing(EditRecordList.java:246)
at com.servoy.j2db.dataprocessing.JSDatabaseManager.saveData(JSDatabaseManager.java:2698)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.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)
… 26 more
What build are you using exactly? 8.0.1 or 8.0.2? If < 8.0.2 can you try that one as well?
Do you use a custom component or custom service that uses foundset property types in it’s model?
Hi Andrie ,
Thanks for your reply . I am using servoy 8.0.2 . This is a normal servoy form in ngclient . This is only using Servoy bootstrap components text box and labels .
Ah, sry, I now see that the fix I thought was in 8.0.2 actually is not in. It was committed and then reverted right before the build due to some performance problems.
So I think it is already fixed. Are you using DBTreeView component? Cause that is what could be using foundset property types that are not linked to components (that could give this exception in 8.0.2).
If you are not using that and you are not using custom services either then it is weird and we might need to have another look.
Hi Andrei,
Thanks for your reply . I am not using the DB TreeView Component nor the Custom services .
Ok. Then please create a case with a sample solution.
Also put a link to this discussion in the case.
It might be something else that is triggering it.