0 Replies Latest reply on Jun 21, 2013 11:08 AM by Nilesh Patidar

    ClassCastException on EJB LookUp

    Nilesh Patidar Newbie

      Hi,

       

      I am working on Weblogic 9.1 to JBoss 5.2 Migration.

      I have Convert the all config file, and successfully deploy the application on JBoss,

       

      but when I test the application,

       

      the bellow red marked code throw ClassCastException.

       

      Java Code:

       

      346.            // Lookup for CAPS EJB using JNDI

      347.            InitialContext ctx = new InitialContext();

      348.           // Get a reference to the CAPSFacade remote interface

      349.            CAPSFacadeHome capsHome = (CAPSFacadeHome)ctx.lookup("caps.CAPSFacadeHome");

      350.            caps = capsHome.create();

       

      Log file Exception:


      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     java.lang.ClassCastException: com.sun.proxy.$Proxy158 cannot be cast to com.experian.ncac.caps.CAPSFacadeHome

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at com.experian.ncac.actions.ExperianAction.getCAPSFacade(ExperianAction.java:349)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at com.experian.ncac.request.RequestCDIByFnaAction.execute(RequestCDIByFnaAction.java:165)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1058)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:269)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:451)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:312)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at com.experian.ncac.servlet.NCACFilter.doFilter(NCACFilter.java:146)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at com.experian.ncac.servlet.LocaleFilter.doFilter(LocaleFilter.java:53)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at com.experian.ncac.servlet.SecurityBlackListFilter.doFilter(SecurityBlackListFilter.java:129)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)

      2013-06-21 15:37:49,636 ERROR [STDERR] (http-127.0.0.1-5050-1)     at java.lang.Thread.run(Thread.java:662)

       

       

      Please find the attached ejb-jar.xml and Jboss.xml.

       

      And let me know what is going wrong.

       

      Plzzzzzzzzzzzzzzzzzzz reply ... ITS VERY URGENT !!!!!!!

      Regards:

      NIlesh Patidar