1 Reply Latest reply on Sep 13, 2013 4:29 AM by Sascha Janz

    ClassCastException: LocalInterface$$$view12 cannot be cast to LocalInterface

    Sascha Janz Master

      i have two seam 2 applications which i try to run under JBoss 7

       

      one is packaged as ear, the other is packaged as war.

       

      The war application tries per jndi lookup a bean from the ear application.

       

      The lookup is

       

      InitialContext ctx = new InitialContext();

      Object o = (Object) ctx.lookup("java:global/earpp/earapp.jar/LocalInteferfaceImpl");

       

       

       

      LocalInteferfaceImpl is implementing LocalInteferface

       

      but when i try to cast  the object o  to LocaInterface i got ClassCastException : LocalInterface$$$view12 cannot be cast to LocalInterface

       

      The interface is packaged in both. the ear and the war file.

       

      what am i  doing wrong?