cancel
Showing results for 
Search instead for 
Did you mean: 

ClassCastException when calling finder-method

andr_siegling
Participant
0 Kudos

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é

Accepted Solutions (0)

Answers (1)

Answers (1)

guru_subramanianb
Active Contributor
0 Kudos

Hi Andre,

Just a suggestion.

In your deployment descriptor what class you have written against EJBNAME ?Is tht CustomerLocalHome??

Rdgs,

Guru