I am migrating my application from JBoss 5 to JBoss 7 (jboss-as-7.1.1.Final). And using JNDI:
ctx = new InitialContext (jndiProperties);
obj = ctx.lookup(jndiName +"!"+ className);
...
home = (EJBHome)PortableRemoteObject.narrow(obj, EJBHome.class);
This line gives me ClassCastException (see attached).
Please, help!