history.removeForm() works in developer, not on Server

The Statement history.removeForm(cFormName) produces a

Wrapped java.lang.NullPointerException , during Runtime (on the Server),

but this works fine, while I run it in the Developer.

(I tested to switch the Server-Installation into developer-mode and there is no error
at this line, until I switch it back again as a Server-runtime)

Thank you for any Ideas what could be the reason ?

When do you see this error ? I.e. when is this called and errors?

ROCLASI:
When do you see this error ? I.e. when is this called and errors?

I do the following (more or less):

  • application.showFormInDialog(cFrmName)

  • In the onShow() function, at firstShow, I get the Form with solutionModel.getForm() and add some tabs with tabPanel.newTab()

  • Then I do controller.recreateUI()

  • after working with the form and pressing the closebutton, I do the application.closeForm()

  • So I’m landing at he next statement, after calling the form ( application.showFormInDialog(cFrmName) ) and at this point, I do
    the history.removeForm(cFrmName) and get the exception (only on Server-smartclient-runtime, but no error during running in developer-smartclient).

I hope this simplified description is clear enough.

do you have an exception in the webstart console?
It would be nice to see a full stack of that null pointer.

jcompagner:
do you have an exception in the webstart console?
It would be nice to see a full stack of that null pointer.

Hope this (servoy_log.txt) is what you mean with “a full stack of that null pointer”. Pleas let me know if not !

java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPConnection.close(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:17:49,804 WARN [RMI TCP Connection(1)-192.168.1.57] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPTransport.closeSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.access$200(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:17:50,074 INFO [RMI TCP Connection(2)-192.168.1.57] com.servoy.j2db.util.Debug - Got -1, compressing socket is closed
2011-01-25 17:17:50,074 WARN [RMI TCP Connection(2)-192.168.1.57] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPConnection.close(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:17:50,074 WARN [RMI TCP Connection(2)-192.168.1.57] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPTransport.closeSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.access$200(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:17:50,525 WARN [RMI Scheduler(0)] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPConnection.close(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.freeCachedConnections(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.access$000(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel$1.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:18:50,100 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - RMI RenewClean-[192.168.1.57:3000]-COS: Written 12 bytes, compressed: 0%
2011-01-25 17:18:50,100 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - A request is written for a callback socket for endpoint: 192.168.1.57:3000
2011-01-25 17:18:50,531 INFO [SocketAccepter[0]] com.servoy.j2db.util.Debug - SocketAccepter[0]-CIS: Read 16 bytes, compressed: 0%
2011-01-25 17:18:50,531 INFO [SocketAccepter[0]] com.servoy.j2db.util.Debug - call back socket returned for port: 3000 socket: 12dd1b8[SSL_RSA_WITH_RC4_128_MD5: Socket[addr=/192.168.1.57,port=3374,localport=1099]] adding it to the pool
2011-01-25 17:18:50,531 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - returning the socket that is in the pool 12dd1b8[SSL_RSA_WITH_RC4_128_MD5: Socket[addr=/192.168.1.57,port=3374,localport=1099]] for endpoint 192.168.1.57:3000
2011-01-25 17:18:50,531 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - RMI RenewClean-[192.168.1.57:3000]-COS: Written 7 bytes, compressed: 0%
2011-01-25 17:18:50,531 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - RMI RenewClean-[192.168.1.57:3000]-CIS: Read 19 bytes, compressed: 0%
2011-01-25 17:18:50,531 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - RMI RenewClean-[192.168.1.57:3000]-COS: Written 15 bytes, compressed: 0%
2011-01-25 17:18:50,531 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - RMI RenewClean-[192.168.1.57:3000]-COS: Written 279 bytes, compressed: 22%
2011-01-25 17:18:50,541 INFO [RMI RenewClean-[192.168.1.57:3000]] com.servoy.j2db.util.Debug - RMI RenewClean-[192.168.1.57:3000]-CIS: Read 249 bytes, compressed: 13%
2011-01-25 17:18:50,641 INFO [TaskExecuter[0]] com.servoy.j2db.util.Debug - Ignoring RMI ping
2011-01-25 17:18:50,651 INFO [TaskExecuter[0]] com.servoy.j2db.util.Debug - TaskExecuter[0]-COS: Written 41 bytes, compressed: 0%
2011-01-25 17:18:50,651 INFO [TaskExecuter[0]] com.servoy.j2db.util.Debug - TaskExecuter[0]-CIS: Read 23 bytes, compressed: 0%
2011-01-25 17:18:51,793 INFO [SocketAccepter[0]] com.servoy.j2db.util.Debug - SocketAccepter[0]-CIS: Read 7 bytes, compressed: 0%
2011-01-25 17:18:51,793 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 19 bytes, compressed: 0%
2011-01-25 17:18:51,793 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 18 bytes, compressed: 0%
2011-01-25 17:18:51,793 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 280 bytes, compressed: 22%
2011-01-25 17:18:51,793 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 249 bytes, compressed: 13%
2011-01-25 17:20:32,688 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 1 bytes, compressed: 0%
2011-01-25 17:20:32,688 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 1 bytes, compressed: 0%
2011-01-25 17:20:32,688 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 66 bytes, compressed: 0%
2011-01-25 17:20:32,698 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 202 bytes, compressed: 35%
2011-01-25 17:20:32,698 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 15 bytes, compressed: 0%
2011-01-25 17:20:32,698 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 48 bytes, compressed: 0%
2011-01-25 17:20:32,698 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 837 bytes, compressed: 55%
2011-01-25 17:20:32,698 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 48 bytes, compressed: 0%
2011-01-25 17:20:32,708 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 608 bytes, compressed: 91%
2011-01-25 17:20:32,718 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 1475 bytes, compressed: 34%
2011-01-25 17:20:32,718 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 22 bytes, compressed: 0%
2011-01-25 17:20:32,718 INFO [http-8080-1] com.servoy.j2db.util.Debug - Loading messages on server for a client, modified change: -1, language: de_CH, solution: null
2011-01-25 17:20:32,718 INFO [http-8080-1] com.servoy.j2db.util.Debug - Loading messages from server: null table: null
2011-01-25 17:20:32,728 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 82 bytes, compressed: 0%
2011-01-25 17:20:32,728 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 22 bytes, compressed: 0%
2011-01-25 17:20:32,738 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-CIS: Read 80 bytes, compressed: 0%
2011-01-25 17:20:32,738 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - Unregistering client: D0ADD02F-77F2-4ADE-A464-A59151F2FD50
2011-01-25 17:20:32,738 INFO [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - RMI TCP Connection(3)-192.168.1.57-COS: Written 22 bytes, compressed: 0%
2011-01-25 17:20:32,738 INFO [ClientExportNotifyListner[0]] com.servoy.j2db.util.Debug - ClientExportNotifyListner[0]-CIS: Read 4 bytes, compressed: 0%
2011-01-25 17:20:32,738 INFO [ClientExportNotifyListner[0]] com.servoy.j2db.util.Debug - a -2 recieved from the client with endpoint: 192.168.1.57:-2, shutting it down
2011-01-25 17:20:32,738 WARN [ClientExportNotifyListner[0]] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at com.servoy.j2db.rmi.ServerTwoWaySocketFactory$1.cleanUp(ServerTwoWaySocketFactory.java:171)
at com.servoy.j2db.rmi.ServerTwoWaySocketFactory$1.run(ServerTwoWaySocketFactory.java:118)
2011-01-25 17:20:33,309 WARN [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPConnection.close(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:20:33,309 WARN [RMI TCP Connection(3)-192.168.1.57] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPTransport.closeSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.access$200(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2011-01-25 17:20:50,654 WARN [RMI Scheduler(0)] com.servoy.j2db.util.Debug - Compressing socket closed
java.lang.RuntimeException
at com.servoy.j2db.rmi.compressing.CompressingSocket.close(CompressingSocket.java:55)
at sun.rmi.transport.tcp.TCPConnection.close(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.freeCachedConnections(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.access$000(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel$1.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Thank you for help.

no this stackdump doesn’t have that nullpointer listed.
You seem to have enabled tracing which gives way to much information for this. A real error should go into the console without tracing.

But i guess this is the servoy log file on the server or developer?

You have the error in the smart client so you have to get the dump of the java/webstart console on your smart client. So the client logging not the server logging.

The java console can be enabled in the java preference control panel.

jcompagner:
You have the error in the smart client so you have to get the dump of the java/webstart console on your smart client. So the client logging not the server logging.
The java console can be enabled in the java preference control panel.

Thank your hint:

history.removeForm(cLastFrmNam)
Wrapped java.lang.NullPointerException (doShowForm#544)

27.01.2011 09:31:33 com.servoy.j2db.util.Debug error
SCHWERWIEGEND: null
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (doShowForm#557)
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1828)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:199)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:65)
	at org.mozilla.javascript.gen.c21._c0(doShowForm:557)
	at org.mozilla.javascript.gen.c21.call(doShowForm)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
	at org.mozilla.javascript.gen.c21.call(doShowForm)
	at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:458)
	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.fireActionCommand(BaseEventExecutor.java:217)
	at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:212)
	at com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:826)
	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.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.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.NullPointerException
	at com.servoy.j2db.FormManager.hasReferenceInScriptable(FormManager.java:1028)
	at com.servoy.j2db.FormManager.canBeDeleted(FormManager.java:998)
	at com.servoy.j2db.FormManager.destroyFormInstance(FormManager.java:1857)
	at com.servoy.j2db.FormManager$History.removeForm(FormManager.java:1376)
	at com.servoy.j2db.FormManager$HistoryProvider.js_removeForm(FormManager.java:1339)
	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:179)
	... 41 more

Hope this values more useful informations

hi,

in the next release we added extra checks to avoid this error;
if you can have this issue reproducible in a sample solution,
please upload here, so we can see what caused it.

regards

After a view test: This problem is solved in Servoy 6
Thank You