Thank you so much! It worked!
--- In graniteds@yahoogroups.com, "williamdrai" <william.drai@...> wrote:
>
> You have to use the option "-include-libraries granite-essentials.swc" of the
Flex compiler to force it to include all internal GDS classes.
>
>
> --- In graniteds@yahoogroups.com, "drbob4276" <drbob4276@> wrote:
> >
> > Hi - I pasted the wrong code. The last line in the code is casting to a
ListCollectionView not a UIDSet. Sorry about the mistake.
> >
> > I am getting the error regardless of whether it is a ListCollectionView or a
UIDSet.
> >
> > Thanks for the help!
> >
> >
> > --- In graniteds@yahoogroups.com, "drbob4276" <drbob4276@> wrote:
> > >
> > > Hi -
> > >
> > > I get the following error message when sending an object from Java to the
Flex Client using GraniteDS:
> > >
> > > ArgumentError: Error #2173: Unable to read object in stream. The class
org.granite.messaging.persistence.ExternalizablePersistentSet does not implement
flash.utils.IExternalizable but is aliased to an externalizable class.
> > > at ObjectInput/readObject()
> > > at
domain.vo::PatientBase/readExternal()[C:\eclipse_workspace\GraniteSpringFlex\src\
\domain\vo\PatientBase.as:182]
> > > at ObjectInput/readObject()
> > > at
mx.collections::ArrayList/readExternal()[C:\autobuild\3.2.0\frameworks\projects\\
framework\src\mx\collections\ArrayList.as:443]
> > > at
mx.collections::ArrayCollection/readExternal()[C:\autobuild\3.2.0\frameworks\pro\
jects\framework\src\mx\collections\ArrayCollection.as:132]
> > >
> > > I have the following Java class declaration:
> > > @Entity
> > > @org.hibernate.annotations.Proxy(lazy=false)
> > > @Table(name="Patient")
> > > @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
> > > public class Patient extends domain.vo.VOBase implements Serializable {
> > > public Patient() {
> > > }
> > >
> > > ...
> > >
> > > @OneToMany(mappedBy="patient", targetEntity=domain.vo.Episode.class)
> > >
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_U\
PDATE, org.hibernate.annotations.CascadeType.LOCK})
> > >
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollecti\
onOption.FALSE)
> > > private java.util.Set<Episode> episode = new
java.util.HashSet<Episode>();
> > >
> > > ....
> > > }
> > >
> > > The AS side was generated by Gas3 (Version 2) as follows:
> > >
> > > package domain.vo {
> > >
> > > import flash.utils.IDataInput;
> > > import flash.utils.IDataOutput;
> > >
> > > import mx.collections.ListCollectionView;
> > >
> > > import org.granite.collections.UIDSet;
> > > import org.granite.meta;
> > >
> > > use namespace meta;
> > >
> > > [Bindable]
> > > public class PatientBase extends VOBase {
> > >
> > > private var _aux1:String;
> > > private var _aux2:String;
> > > private var _dob:Date;
> > > private var _episode:ListCollectionView;
> > > ....
> > > override public function readExternal(input:IDataInput):void {
> > > super.readExternal(input);
> > > if (meta::isInitialized()) {
> > > _aux1 = input.readObject() as String;
> > > _aux2 = input.readObject() as String;
> > > _dob = input.readObject() as Date;
> > > _episode = input.readObject() as ListCollectionView;
> > > ....
> > >
> > > }
> > >
> > > It crashes on the line in readExternal that is reading the episode.
> > >
> > > The patient to episode is a 1:n relationship. The episode also references
the patient.
> > >
> > > The episode property on the Java side is shown to be of type
PersistentSet.
> > >
> > > Please help.
> > >
> > > Thank you!
> > >
> >
>