Page 1 of 1

RC3 AdminTool not saving zones correctly

Posted: 29 Jun 2011, 09:04
by Alex
Hi

I have few problems saving zone files via admin tool.

First the zone name extentions are not loaded in the drop down "Name" under "Zone extension" tab.

The when I add the info manually in the zone file then reload it , then try to save it, I got this error:

Code: Select all

Exception: java.lang.IllegalArgumentException
Message: Can not set java.lang.String field com.smartfoxserver.v2.config.ZoneSettings$ExtensionSettings.name to java.util.ArrayList
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: zoneConfig.saveZoneConfig
+--- --- ---+
Stack Trace:
+--- --- ---+
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
java.lang.reflect.Field.set(Unknown Source)
com.smartfoxserver.v2.admin.configurator.SettingsUpdater.parseSettingData(SettingsUpdater.java:130)
com.smartfoxserver.v2.admin.configurator.SettingsUpdater.update(SettingsUpdater.java:32)
com.smartfoxserver.v2.admin.handlers.ZoneConfigModuleReqHandler.handleClientRequest(ZoneConfigModuleReqHandler.java:208)
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(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Posted: 29 Jun 2011, 14:15
by Bax
Please read the AdminTool documentation.
In order to make the extension to be listed in the dropdown, you have to adopt a naming convention for the jar file, like this anythingExtension.jar
In other words the file name must end with Extension.jar. In this way it will be visible in the AdminTool and its inner classes listed too.

Posted: 30 Jun 2011, 04:18
by Alex
I see. 10x