Page 1 of 1

Error in admin tool

Posted: 06 Apr 2011, 10:31
by grhwood
Hi,

When i use admin to config a zone, this error pops up in console and i cannot config zone anymore.

Code: Select all

Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: zoneConfig.getZoneConfig
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.admin.helper.ExtensionsHelper.loadExtensionsData(ExtensionsHelper.java:95)
com.smartfoxserver.v2.admin.handlers.ZoneConfigModuleReqHandler.handleClientRequest(ZoneConfigModuleReqHandler.java:147)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:192)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:137)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)
Thank you.

Posted: 06 Apr 2011, 11:02
by grhwood
It is solved.

It seems that sfs cannot read config file if there is any strange file in extensions folder.

Posted: 07 Apr 2011, 08:06
by Bax
Can you better explain? Which kind of "strange file in extensions folder"?

Posted: 08 Apr 2011, 09:20
by martian77
It would be nice if you could explain which file you found was causing you the problems.

We've just upgraded to RC2a, and we're finding we are unable to edit the zones using the admin tool if we have the hibernate3.jar in any of the extension folders (so SFS2x/extensions/extension1/hibernate3.jar for example). If we take that jar out the admin tool loads as normal. Otherwise it gets stuck at the "Requesting data..." screen.

What we do: Start the server (no bugs reported), log in to the admin tool, go to the zone configurator, highlight the zone we wish to change, then click the edit button. The admin tool then hangs. We've tried this on two machines now (one mac, one PC). It doesn't matter which zone, even the default ones which don't have the hibernate3.jar file in their extension folder. We don't get any bug reported in the log.

Smart Fox Server is still running, and we can use the Flash app we've written to connect to the server and use the functionality written in the custom extension. If we take the hibernate3.jar file out, we can use the admin tool zone configurator without any problems (but our application won't work!).

This wasn't happening before we used the new patch, we could use the admin tool with hibernate3.jar in the extensions folders.

As the application is still working we can carry on development, but it is a bit of a worry!

Posted: 08 Apr 2011, 09:32
by Bax
martian77, it should be a browser's cache issue.
Clear the cache and the AdminTool should work again as expected.

Posted: 08 Apr 2011, 15:31
by martian77
No go, we've tried that!

Posted: 11 Apr 2011, 12:32
by Bax
Any erro message on the server-side when the AdminTool gets stuck?

Posted: 12 Apr 2011, 10:14
by martian77
No, as I said in my original message, no error message in the server log. In fact, this is what I get from logging in to the admin tool, clicking through to the Zone Configurator, clicking the right zone, then clicking edit:

Code: Select all

11:14:12,306 INFO  [SocketReader] core.SocketAcceptor     - Session created: { Id: 1, Type: DEFAULT, Logged: No, IP: 127.0.0.1:51189 } on Server port: 9933 <---> 51189
11:14:12,338 INFO  [SocketReader] sessions.DefaultSessionManager     - Session removed: { Id: 1, Type: DEFAULT, Logged: No, IP: 127.0.0.1:51189 }
11:14:12,372 INFO  [SocketReader] core.SocketAcceptor     - Session created: { Id: 2, Type: DEFAULT, Logged: No, IP: 127.0.0.1:51190 } on Server port: 9933 <---> 51190
11:14:12,413 INFO  [com.smartfoxserver.v2.controllers.SystemController-1] controllers.SystemController     - {IN}: Handshake
11:14:12,430 INFO  [com.smartfoxserver.v2.controllers.SystemController-1] controllers.SystemController     - {IN}: Login
11:14:12,447 INFO  [pool-1-thread-2] api.SFSApi     - Login in, { Zone: --=={{{ AdminZone }}}==-- }, ( User Name: sfsadmin, Id: 0, Priv: 0, Sess: 127.0.0.1:51190 ) 
11:14:12,803 INFO  [com.smartfoxserver.v2.controllers.SystemController-1] controllers.SystemController     - {IN}: SetUserVariables
11:14:34,589 INFO  [com.smartfoxserver.v2.controllers.SystemController-1] controllers.SystemController     - {IN}: SetUserVariables

Posted: 15 Apr 2011, 13:57
by Bax
martian77, we have been able to reproduce the issue by just placing the hibernate3 jar in an extension folder.
Using the Debug Flash Player, the following error is thrown as soon as the Zone configuration is loaded:

Code: Select all

Error: Unknow SFSDataType ID: 103
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:312]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:148]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:297]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSArray()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:206]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:287]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:148]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:297]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSArray()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:206]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:287]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:148]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:297]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:148]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:297]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/decodeSFSObject()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:148]
	at com.smartfoxserver.v2.protocol.serialization::DefaultSFSDataSerializer/binary2object()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/protocol/serialization/DefaultSFSDataSerializer.as:114]
	at com.smartfoxserver.v2.entities.data::SFSObject$/newFromBinaryData()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/entities/data/SFSObject.as:62]
	at com.smartfoxserver.v2.core::SFSProtocolCodec/onPacketRead()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/core/SFSProtocolCodec.as:45]
	at com.smartfoxserver.v2.core::SFSIOHandler/handlePacketData()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/core/SFSIOHandler.as:243]
	at com.smartfoxserver.v2.core::SFSIOHandler/onDataRead()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/core/SFSIOHandler.as:99]
	at com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketData()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/API/AS3/src/com/smartfoxserver/v2/bitswarm/BitSwarmClient.as:410]
We will further investigate and let you know. Thanks for reporting.

Posted: 18 Apr 2011, 08:53
by Bax
martian77, as a workaround you should put the hibernate jar in the __lib__ folder, instead of your extension folder.
We will improve this in the next release.