Page 1 of 1

Null Pointer (workspace) in GWT Debug

PostPosted:Fri Apr 05, 2013 9:11 am
by raffan
hi,

I configured the environment for the development by following the GWT documentation.

Unfortunately when I load the taxonomy returns null pointer on this object
Code: Select all
Main.get().workspaceUserProperties.getWorkspace().isStackTaxonomy()
I attach stacktrace
Code: Select all
00:03:32,500 [ERROR] 2013-04-05 10:55:18,093 [FATAL] Uncaught Exception: 
java.lang.NullPointerException: null 	at com.openkm.frontend.client.widget.startup.StartUp.nextStatus(StartUp.java:511) 	at com.openkm.frontend.client.widget.startup.StartUp.recoverFromError(StartUp.java:710) 	at com.openkm.frontend.client.Main.showError(Main.java:589) 	at com.openkm.frontend.client.util.WorkspaceUserProperties$1.onFailure(WorkspaceUserProperties.java:352) 	at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:237) 	at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) 	at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) 	at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 	at java.lang.reflect.Method.invoke(Unknown Source) 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) 	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) 	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) 	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) 	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) 	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) 	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) 	at com.google.gwt.core.client.impl.Impl.apply(Impl.java) 	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) 	at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 	at java.lang.reflect.Method.invoke(Unknown Source) 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) 	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) 	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) 	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) 	at java.lang.Thread.run(Unknown Source)
Could someone please give me some suggestions

thank you very much

Re: Null Pointer (workspace) in GWT Debug

PostPosted:Sat Apr 06, 2013 10:38 am
by jllort
You have made some changes in original source code, isn't it?

Take in mind in loading process can not be made some calls to some objects still have not been created in that case seems Main.get().workspaceUserProperties.getWorkspace() is still not initializated and have null value. The loading logic is sequential to take control on initialization objects etc...

I suggest you debug some lines:

In line 507 of Statup.java-> Main.get().workspaceUserProperties.init(); is made the call to load workspace and when is loaded at line 344 of WorkspaceUserProperties.java is called Main.get().startUp.nextStatus(StartUp.STARTUP_GET_TAXONOMY_ROOT);

You have made any change or see the server log if there's some problem on RPC.