Posted By:
dachih_naraw
Posted On:
Tuesday, April 9, 2002 05:50 AM
Hi, all. I have a method "collection TelGroup::findAllGroups()" in BMP-EJB class. And I call in servlet so: . . . . . StringBuffer pagecont = new StringBuffer(); TelGroupHome grouphome = getTelGroupHome(); TelGroup tgroup = null; String grname = null; Collection groupcollection = grouphome.findAllGroup(); Iterator it = groupcollection.iterator(); System.out.println("groupcollection.size() = " + .size()); while(it.hasNext()){ Object obj = it.next(); tgroup = (TelGroup) javax.rmi.PortableRemoteObject.narrow(obj, TelGroup.class); System.out.println(" Group is: " + tgroup.toString()); grname = tgroup.getName();
More>>
Hi, all.
I have a method "collection TelGroup::findAllGroups()" in BMP-EJB class.
And I call in servlet so:
. . . . .
StringBuffer pagecont = new StringBuffer();
TelGroupHome grouphome = getTelGroupHome();
TelGroup tgroup = null;
String grname = null;
Collection groupcollection = grouphome.findAllGroup();
Iterator it = groupcollection.iterator();
System.out.println("groupcollection.size() = " + .size());
while(it.hasNext()){
Object obj = it.next();
tgroup = (TelGroup) javax.rmi.PortableRemoteObject.narrow(obj, TelGroup.class);
System.out.println(" Group is: " + tgroup.toString());
grname = tgroup.getName();
System.out.println("grname: " + grname);
pagecont.append("
" + grname + "
");
}
. . . . .
My ejb was deployed successfully with IAS and I use JBuilder.
I have this error(ouput) when I run the servlet.
groupcollection.size() = 8
<--- it's ok. Have to be 8 objects/beans
Group is: Stub[repository_id=RMI:TelGroup:0000000000000000,key=ServiceId[service=/EJB[cb-d16/ejbcontainer]TelGroupJNDI,id={1
bytes:[9]}],codebase=null]
grgname = UserTelephones
<--- In block "while" is first time allways ok. But then, second time(sometimes third time) comes error below.
Group is: Stub[repository_id=RMI:TelGroup:0000000000000000,key=ServiceId[service=/EJB[cb-d16/ejbcontainer]TelGroupJNDI,id={2
bytes:[1][0]}],codebase=null]
CORBA OBJECT_NOT_EXIST 0[]
<--- that's error ??????????
What's wrong? Please any advice, experience,...
Thanks for any helps.
<<Less