3 Replies Latest reply on Dec 21, 2005 2:42 PM by Bill Burke


    Robin Young Newbie

      I get a ClassCastException when trying to cast an entity bean to a interface that it implements in the web teir.

      I have a bean annotated with @Entity that also implements an interface.
      I can lookup an instance of this bean perfectly fine within a stateless session bean and can cast the result to the interface perfectly fine at this point. However if I pass this object back to the web tier then I get a class cast exception when casting to the interface.

      Obviously this is a classloader issue.

      The stateless, entity and interface classes are deployed in an ejb3 archive.
      Only the interfaces are deployed in the war (along with servlet stuff).

      This all worked fine using Preview 5 but now I've swapped to Beta then it fails.

      Have the classloading rules changed?