Version 2

    Why does JUnit throw ClassCastException when testing EJBs

     

    If you get a ClassCastException when doing trying to narrow an EJB with JUnit, see  item 10 of the junit faq.  This can normally be corrected by changing the way you launch junit or by excluding classes in the excluded.properties file.