Skip to Content
0
Aug 04, 2005 at 01:00 PM

ClassCastException when calling finder-method

17 Views

Hello,

i want to get all results from my table. Therefore i created an entity bean with a new finder method ejbFindAll which returns a Collection.

In my stateless session bean i am instantiating the entity bean in this way:

+CustomerLocalHome myCustomerLocalHome = null;

Context myContext = new InitialContext();

myCustomerLocalHome =(CustomerLocalHome) myContext.lookup("/bsp_ear/CustomerBean");+

When i now call the method in this way:

+ myCustomerLocalHome.findAll();+

i get a ClassCastExcetpion.

Does anybody know what this causes?

I tried for hours an could not find a solutions 😔

Thanks for help,

André