File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes ClassCastException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ClassCastException" Watch "ClassCastException" New topic
Author

ClassCastException

richard marais
Ranch Hand

Joined: Aug 20, 2001
Posts: 30
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

Joined: Aug 20, 2001
Posts: 30
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());
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassCastException
 
Similar Threads
Deploying Servlet in EJB
Extend Test - ClassCastException
some problem with Entity Bean with PK
Handleing multiple rows from an EJB
classCastException