serverside warning

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
totem_nee
Posts: 21
Joined: 27 Sep 2007, 07:14

serverside warning

Post by totem_nee »

when we test DB Example Advanced, connected with mySQL.we can read data from mySQL by datamanager. but when we want to add some data into mySQL,we get following msg in serverside.

Code: Select all

16:48:39.890 - [ WARNING ] > Exception in ExtensionHandler: java.lang.ClassCastException: java.lang.String cannot be cast to it.gotoandplay.smartfoxserver.lib.ActionscriptObject
Exception type: java.lang.ClassCastException
java.lang.ClassCastException: java.lang.String cannot be cast to it.gotoandplay.
smartfoxserver.lib.ActionscriptObject
        at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEve
nt(ExtensionHandler.java:433)
        at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(Extens
ionHandler.java:344)
        at java.lang.Thread.run(Unknown Source)
what's wrong? somebody help, thanks!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hello,
I am sorry but we can't reproduce the issue. Maybe you have modified the code and introduced a bug.
If you need it I can send the original FLA file to start over.
Lapo
--
gotoAndPlay()
...addicted to flash games
Zak
Posts: 13
Joined: 04 Mar 2008, 07:41
Location: Las Vegas
Contact:

Re: serverside warning

Post by Zak »

totem_nee wrote:when we test DB Example Advanced, connected with mySQL.we can read data from mySQL by datamanager. but when we want to add some data into mySQL,we get following msg in serverside.

Code: Select all

16:48:39.890 - [ WARNING ] > Exception in ExtensionHandler: java.lang.ClassCastException: java.lang.String cannot be cast to it.gotoandplay.smartfoxserver.lib.ActionscriptObject
Exception type: java.lang.ClassCastException
java.lang.ClassCastException: java.lang.String cannot be cast to it.gotoandplay.
smartfoxserver.lib.ActionscriptObject
        at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEve
nt(ExtensionHandler.java:433)
        at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(Extens
ionHandler.java:344)
        at java.lang.Thread.run(Unknown Source)
what's wrong? somebody help, thanks!



I had a sort of similar error, saying can't cast to string. It was when I was trying to send an extension response back in xml, from within a python class... I ended up having to use JSON instead for some strange reason.

Maybe its related, maybe its not.
AlecMcE
Posts: 11
Joined: 24 Nov 2008, 16:03

Post by AlecMcE »

We're getting this error as well; there's no possibility to send over an FLA to debug as it's a multi-FLA environment... which means we have to debug through guess-work. It would be helpful if at least some more information is posted when an extension error occurs - the event type at least.

One working theory we have is that in certain cases we might have been passing a null object into a sendResponse method because we're getting a JSONException.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

What server version is this?
The error is not related with JSON, because the exception indicates an ActionscriptObject which relates to XML protocol.
It is likely that you are sending a null param object to the server. It should be easy to double check your client code that the param argument is not null.

Hint:
Always create an empty object first, add parameters to it (even none, where appropriate) and then send that object.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply