# Null pointer exception

**URL:** <https://forum.servoy.com/t/null-pointer-exception/18740>\
**Category:** Classic Servoy\
**Created:** [February 16, 2016, 7:16am UTC](https://forum.servoy.com/t/null-pointer-exception/18740 "2016-02-16T07:16:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashutoslenka426](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@ashutoslenka426](https://forum.servoy.com/u/ashutoslenka426)\
**Post date:** [February 16, 2016, 7:16am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/1 "2016-02-16T07:16:20Z")

</div>

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 ?.

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 16, 2016, 8:21am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/2 "2016-02-16T08:21:54Z")

</div>

What is the exception that you get?

---

<div class="post-metadata">

**Author:** ![ashutoslenka426](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@ashutoslenka426](https://forum.servoy.com/u/ashutoslenka426)\
**Post date:** [February 16, 2016, 8:41am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/3 "2016-02-16T08:41:12Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 16, 2016, 9:28am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/4 "2016-02-16T09:28:42Z")

</div>

You should see more info in the application\_server/servoy\_log.txt file.  
A full stack dump should be there when this NPE happens.

---

<div class="post-metadata">

**Author:** ![ashutoslenka426](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@ashutoslenka426](https://forum.servoy.com/u/ashutoslenka426)\
**Post date:** [February 16, 2016, 9:40am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/5 "2016-02-16T09:40:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 17, 2016, 2:11pm UTC](https://forum.servoy.com/t/null-pointer-exception/18740/6 "2016-02-17T14:11:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ashutoslenka426](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@ashutoslenka426](https://forum.servoy.com/u/ashutoslenka426)\
**Post date:** [February 22, 2016, 11:21am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/7 "2016-02-22T11:21:33Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 22, 2016, 1:45pm UTC](https://forum.servoy.com/t/null-pointer-exception/18740/8 "2016-02-22T13:45:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ashutoslenka426](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@ashutoslenka426](https://forum.servoy.com/u/ashutoslenka426)\
**Post date:** [February 23, 2016, 3:24am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/9 "2016-02-23T03:24:33Z")

</div>

Hi Andrei,

Thanks for your reply . I am not using the DB TreeView Component nor the Custom services .

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [February 23, 2016, 8:10am UTC](https://forum.servoy.com/t/null-pointer-exception/18740/10 "2016-02-23T08:10:12Z")

</div>

Ok. Then please [create a case](https://support.servoy.com) with a sample solution.  
Also put a link to this discussion in the case.

It might be something else that is triggering it.
