Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Error #2004: One of the parameters is invalid


Level 1
I'm trying to send an object from Java to Flex using BlazeDS
and the following code:


var remoteObject:RemoteObject = new RemoteObject();

remoteObject.destination = "someDestination";

resultHandler, false, 0, true);


The remote method is invoked and returns an object that
results in the following error "ArgumentError: Error #2004: One of
the parameters is invalid." I've read that you must reference the
class the remote call is returning so just to be safe I added the
following code to the class making the remote call:


private static const classCausingError:ClassCausingError =

I've also read that the action script version of the class
that is being sent from Java to Flex must have the appropriate meta
data so I've added this to the action script class:



I've tried to generalize the problem as much as possible, if
anybody wants to see the actual code then I will post it. Does
anybody have any suggestions about why this error is occurring and
how to fix it?
1 Reply


Level 1
Figured it out! The java class implemented Externalizable
(for no good reason) but the flex class didn't implement
IExternalizable. Getting rid of the Externalizable implementation
on the java side corrected the problem. These classes have been in
use for months but were always serialized from Flex to Java, I
guess you have to go in the reverse direction to cause the