Search the web
Sign In
New User? Sign Up
graniteds · Granite Data Services
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Unable to read object in stream   Message List  
Reply | Forward Message #4169 of 5342 |
Re: Unable to read object in stream

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!
> > >
> >
>





Thu Jul 2, 2009 8:25 pm

drbob4276
Offline Offline
Send Email Send Email

Forward
Message #4169 of 5342 |
Expand Messages Author Sort by Date

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...
drbob4276
Offline Send Email
Jul 2, 2009
3:59 am

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...
drbob4276
Offline Send Email
Jul 2, 2009
4:02 am

You have to use the option "-include-libraries granite-essentials.swc" of the Flex compiler to force it to include all internal GDS classes....
williamdrai
Offline Send Email
Jul 2, 2009
3:48 pm

Thank you so much! It worked!...
drbob4276
Offline Send Email
Jul 2, 2009
8:26 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help