Error in admin tool

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Error in admin tool

Post 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.
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Post by grhwood »

It is solved.

It seems that sfs cannot read config file if there is any strange file in extensions folder.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Can you better explain? Which kind of "strange file in extensions folder"?
Paolo Bax
The SmartFoxServer Team
martian77
Posts: 7
Joined: 08 Apr 2011, 09:10
Location: UK - England
Contact:

Post 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!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

martian77, it should be a browser's cache issue.
Clear the cache and the AdminTool should work again as expected.
Paolo Bax
The SmartFoxServer Team
martian77
Posts: 7
Joined: 08 Apr 2011, 09:10
Location: UK - England
Contact:

Post by martian77 »

No go, we've tried that!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Any erro message on the server-side when the AdminTool gets stuck?
Paolo Bax
The SmartFoxServer Team
martian77
Posts: 7
Joined: 08 Apr 2011, 09:10
Location: UK - England
Contact:

Post 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
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post 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.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post 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.
Paolo Bax
The SmartFoxServer Team
Post Reply