3 Replies Latest reply on Aug 16, 2016 2:38 AM by jaikiran pai

    java.lang.ClassCastException:  com.load.DBKeyStore$$$view76 cannot be cast to  com.load.DBKeyStore

    Tavleen Oberoi Newbie

      Hi

       

      I am trying to access a local EJB using jndi lookup.   

      _____________________________________________________________________________________

      public final class DatabaseKeyStoreSpi extends KeyStoreSpi {

      private DBKeyStore keyStore ; 

       

      {

      keyStore =  InitialContext.doLookup("java:app/core/DBKeyStoreBean!DBKeyStore");

      }

      .... other stuff

      }

      _____________________________________________________________________________________

      where DBKeyStoreBean got the structure

      @Stateless

      @TransactionAttribute(TransactionAttributeType.REQUIRED)

      @DependsOn("GServiceBean")

      public class DBKeyStoreBean implements DBKeyStore {

       

      _____________________________________________________________________________________

      and DBKeyStore  local bean got

      @Local

      public interface DBKeyStore {

      _____________________________________________________________________________________


      On deploying it on wildfly server, i get the exception as

      Caused by: java.lang.ClassCastException: com.load.DBKeyStore$$$view76 cannot be cast to com.load.DBKeyStore

       

      All my classes are in a single JAR under an EAR.

       

      Any help would be appreciated.

       

       

      Regards

      Tavleen