hi binil, I have tried that also. Not working. Also I think I dont need PortableRemoteObject.narrow() in business fn.
--Ashwani ----- Original Message ----- From: "Binil Thomas" <[EMAIL PROTECTED]> To: "Ashwani Kalra" <[EMAIL PROTECTED]> Sent: Friday, July 19, 2002 4:03 PM Subject: Re: ejbSelect method throwing ClassCastException . > Tried PortableRemoteObject.narrow() etc etc ?? > Everytime a remote object is obtained as an Object, dont use a cast, > narrow it down with PortableRemoteObject.narrow() method. This is due to > some CORBA related stuff, which I am not very well versed about. :-) > > Now, Iterator.next() returns an Object which you are trying to cast, so > maybe the problem lie therein, > > - Binil > > On Fri, 19 Jul 2002, Ashwani Kalra wrote: > > > Hi, > > I have Customer bean entity bean (fields id, name) and I am executing an > > ejbSelect method from one of its business methods. Below is the entry for > > the same in ejb-jar.xml. > > <query> > > <query-method> > > <method-name>ejbSelectNames</method-name> > > <method-params> > > <method-param>java.lang.String</method-param> > > </method-params> > > </query-method> > > <ejb-ql> > > <![CDATA[SELECT OBJECT(a) FROM CustBean AS a WHERE a.name = ?1]]> > > </ejb-ql> > > </query> > > > > > > I am getting ClassCastException when I retrieve the elements. Here is the > > code section at which I am getting error. > > > > Customer c=(Customer)it.next(); > > > > Where Customer is the localRemote interface of my bean. > > > > Am I doing something wrong ?? I am working on WL 6.1 > > > > Thanks > > Ashwani > > > > =========================================================================== > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > > of the message "signoff EJB-INTEREST". For general help, send email to > > [EMAIL PROTECTED] and include in the body of the message "help". > > > > -- > And did they get you to trade your heroes for ghosts? Hot ashes for > trees? Hot air for a cool breeze? Cold comfort for change? And did you > exchange a walk on part in the war for a lead role in a cage? - PF > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
