• Null Pointer (workspace) in GWT Debug

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #22295  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
 #22306  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.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.