It's been a while since I've worked in the EJB world (been doing a lot of just webapp development lately) so please bear with me.
I am using jboss-4.2.1.GA and java version "1.5.0_11"
I am working on a simple EJB project. I have 1 local session bean an 1 entity bean which is managed by the Java Persistence API. I pack this all up into an ear file and deploy it to jboss. I can see in the JNDIList the ejb is deployed:
+- oak.oths.domain (class: org.jnp.interfaces.NamingContext) | +- AlumniEjb (class: org.jnp.interfaces.NamingContext) | | +- local (proxy: $Proxy172 implements interface org.oak.oths.domain.alumni.AlumniLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
// This causes a ClassCastException! AlumniLocal local = (AlumniLocal)ctx.lookup("oak.oths.domain/AlumniEjb/local");