java.lang.ClassCastException [message #91855] |
Sun, 11 May 2003 22:33 |
happyhero
Messages: 10 Registered: April 2002
|
Junior Member |
|
|
hey:
I need your help. I met the question in jdev with bmp bean.
1 FirstBmpHome home =(FirstBmpHome) PortableRemoteObject.narrow(firstBmpHome,FirstBmpHome.class);
2 System.out.println("TemplateClient.main(): home narrowed...");
3 Collection recs = home.FindAll();
4 System.out.println("TemplateClient.main(): found " + recs.size());
5 Iterator iterator = recs.iterator();
6 int i = 0;
7 while(iterator.hasNext()){
8 rec = (FirstBmp) PortableRemoteObject.narrow(iterator.next(), FirstBmp.class);
9 System.out.println("row-" + i++ + " " + rec.getCountry_name()); }
}
there are error in 8.
the following:
java.lang.ClassCastException
java.lang.Object com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
java.lang.Object javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
void SampleFirstBmpClient2.main(java.lang.String[[]])
thanx your help!
|
|
|
|