0 Replies Latest reply on Jan 13, 2015 6:00 AM by santu biswas

    Getting classcast exception when creating ejb local object in jboss eap 6.3.

    santu biswas Newbie

      Getting classcast exception when creating ejb local object in jboss eap 6.3. We are creating the util class using xdoclet. By using local jndi name we are trying to look up the localhome object to create local component . But getting exception that local can not be cast to localhome. Please find the below error and provide suggestions.

       

       

      DBFacadeLocal localobject= DBFacadeLocalHomeObject.create()  (in this line we are getting error)


      16:07:48,294 SEVERE [dk.tdc.ossj.inventory.web.SetupServlet] (Thread-173) dk.tdc.ossj.inventory.web.SetupServlet#Setup failed: dk.tdc.devenv.exceptions.ServiceExcepti
      on: java.lang.ClassCastException: dk.tdc.ossj.inventory.ejb.DBFacadeLocal$$$view24 cannot be cast to dk.tdc.ossj.inventory.ejb.DBFacadeLocalHome: dk.tdc.devenv.except
      ions.ServiceException: java.lang.ClassCastException: dk.tdc.ossj.inventory.ejb.DBFacadeLocal$$$view24 cannot be cast to dk.tdc.ossj.inventory.ejb.DBFacadeLocalHome
              at dk.tdc.ossj.inventory.ejb.DBFacadeEjbDelegate$DBFacadeLocalProxy.<init>(DBFacadeEjbDelegate.java:1870) [ossj_inventory.jar:2.9.0]
              at dk.tdc.ossj.inventory.ejb.DBFacadeEjbDelegate.<init>(DBFacadeEjbDelegate.java:42) [ossj_inventory.jar:2.9.0]
              at dk.tdc.ossj.inventory.web.SetupServlet$ActionThread.run(SetupServlet.java:67) [ossj_inventory.jar:2.9.0]
              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60-ea]
      Caused by: java.lang.ClassCastException: dk.tdc.ossj.inventory.ejb.DBFacadeLocal$$$view24 cannot be cast to dk.tdc.ossj.inventory.ejb.DBFacadeLocalHome
              at dk.tdc.ossj.inventory.ejb.DBFacadeUtil.getLocalHome(DBFacadeUtil.java:69) [ossj_inventory.jar:2.9.0]
              at dk.tdc.ossj.inventory.ejb.DBFacadeEjbDelegate$DBFacadeLocalProxy.<init>(DBFacadeEjbDelegate.java:1865) [ossj_inventory.jar:2.9.0]
              ... 3 more