Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-08-2012, 07:21 PM   #1
Senior Member
Join Date: Nov 2002
Location: CA
Posts: 454
Question Remoting AS3 to Java is null?

Is there a secret to getting AS3 objects to translate over into Java using LCDS/Blaze?

I'm working on a legacy system and we are having issue communicating with the back end, specifically when we send certain custom AS3 objects over Blaze to our Java RO methods... sometimes they port over, but often they come across "the bridge" as nulls. (Objects coming from Java to AS3 work just fine however, as do sending primitive values rather than objects.)

I thought using the remote metatag [RemoteClass(alias="java.foo.bar.Snafu")] in our AS3 classes was enough for bidrirectional support, and indeed it works just fine when Java is sending AS3 Snafu objects... but when AS3 tries to send to Java it works for some classes (mostly the legacy ones) but fails for others (mostly our new classes).

The specific error we get is something like this: "Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class com.foo.bar.model.ResultableResource".

The error to me looks like Blaze cannot find the ResultableResource java class, yet we've doublechecked that the classes that don't translate have equivalents on both sides, and indeed they look similar to the classes that are working.

Is there some external mapping or publishing trick we need to do in Java or AS3 to allow these objects to export correctly? Do they need to implement the java.Externalizable interface? Maybe they need to be added manually to some kind of manifest? Adobe docs are fuzzy on the matter and make it sound like things should just work, but they don't.

Any thoughts, examples, or links are greatly appreciated.
Arodicus is offline   Reply With Quote
Old 02-08-2012, 07:25 PM   #2
Senior Member
Join Date: Nov 2002
Location: CA
Posts: 454
Default AS3 to Java fails in Blaze - but not always

As it turns out, a winky-bear helper on the java side was redirecting all our established Java classes to pathnames and class definitions of her own choosing, therefore the RemoteClass alias names were pointing to the incorrect objects.

We're making her stand in the corner.

Problem resolved. =)

Last edited by Arodicus; 02-08-2012 at 11:37 PM.
Arodicus is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:08 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.