1 Reply Latest reply on Oct 4, 2008 1:34 PM by Alejandro Guizar

    java.lang.ClassCastException: $Proxy60 cannot be cast to org

    francesco franzè Newbie

      hi
      My code is:

      Properties props = new Properties();
      props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
      
      InitialContext ctx = new InitialContext();
      LocalCommandServiceHome commandServiceHome = LocalCommandServiceHome) ctx.lookup("ejb/CommandServiceBean");
      
      


      I'have librey jbossall-client.jar

      I' have this error :

      java.lang.ClassCastException: $Proxy60 cannot be cast to org.jbpm.ejb.LocalCommandServiceHome
      13:51:39,386 ERROR [STDERR] at com.linksmt.fpap.workflow.workflowUtils.test(workflowUtils.java:32)
      13:51:39,386 ERROR [STDERR] at com.linksmt.fpap.controllers.findMeController.handle(findMeController.java:36)
      13:51:39,386 ERROR [STDERR] at org.springframework.web.servlet.mvc.AbstractCommandController.handleRequestInternal(AbstractCommandController.java:84)
      13:51:39,387 ERROR [STDERR] at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      13:51:39,387 ERROR [STDERR] at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      13:51:39,388 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
      13:51:39,388 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
      13:51:39,388 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
      13:51:39,389 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:453)
      13:51:39,389 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      13:51:39,390 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      13:51:39,390 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      13:51:39,390 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      13:51:39,391 ERROR [STDERR] at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      13:51:39,391 ERROR [STDERR] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      13:51:39,391 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      13:51:39,392 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      13:51:39,392 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      13:51:39,392 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      13:51:39,393 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      13:51:39,393 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      13:51:39,393 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      13:51:39,394 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      13:51:39,394 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      13:51:39,395 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      13:51:39,395 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      13:51:39,395 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      13:51:39,396 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      13:51:39,396 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      13:51:39,396 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      13:51:39,397 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      13:51:39,397 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      13:51:39,397 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)org.jbpm.ejb.LocalCommandServiceHome

      thank you ...