• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassCastException

 
richard marais
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try the following I get a ClassCastException.
java.util.Enumeration e = home.findGreaterThan(0);
while (e.hasMoreElements())
{
Bean bean = (Bean)e.nextElement();
System.out.println(bean.getMethod());
}
I am trying to process multiple rows from the EJB Bean. How should I do this?
 
richard marais
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the above problem with the following:
java.util.Enumeration e = home.findGreaterThan(11);
while (e.hasMoreElements())
{
Object ref = e.nextElement();
Ory_menu ory_menu = (Ory_menu) PortableRemoteObject.narrow(ref, Ory_menu.class);
System.out.println(ory_menu.getSort_order());
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic