0 Replies Latest reply on Apr 23, 2014 7:17 AM by sanjmand

    ClassCastException after JNDI lookup in Jboss eap 6.0

    sanjmand

      Hi All,

       

      I am getting ClassCastException after jndi lookup. The jboss server is returning the child class object instead of parent object in jndi lookup.

       

      My lookup code is shown below:

       

      BPMConnectionFactory BpmConnectionFactory= (BPMConnectionFactory) context.lookup("java:/fec/StaffwareProcessSuite");

       

       

       

      The "ConnectionFactory" class is implementing the "BPMConnectionFactory" interface. The above lookup code is returning the "ConnectionFactory" class object instead of "BPMConnectionFactory" object.

       

      This code is perfectly working on weblogic server.

       

      Any ideas what's missing?

       

      Regards

      Sanjeev