Hi Ashwani.
Try using the t3 protocol while doing a lookup. instead of iiop.
Thanks
Ankur
Ashwani Kalra
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
NT.COM> cc:
Sent by: A Subject: Re: ejbSelect method throwing
ClassCastException .
mailing list for
Enterprise
JavaBeans
development
<EJB-INTEREST@JAV
A.SUN.COM>
07/19/02 04:47 PM
Please respond to
Ashwani Kalra
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".
-----------------------Disclaimer------------------------
The views of the author may not necessarily reflect those
of the Company. All liability is excluded to the extent
permitted by law for any claims arising as a result of the
use of this medium to transmit information by or to
IT Solutions (India) Pvt. Ltd.
We have taken precautions to minimize the risk of
transmitting software viruses, but we advise you to
carry out your own virus checks on any attachment to
this message. We cannot accept liability for any loss or
damage caused by software viruses.
------------------------Disclaimer------------------------
===========================================================================
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".