3 Replies Latest reply on Aug 6, 2014 1:53 AM by Maciej Swiderski

    jbpm 6 ejb3.0 class  cannot be cast error ?

    mst knk Newbie

      Hi ,

      i got an exception while trying to access ejb interface . My implementation looks like  (i use org.kie.internal.executor.api.Command interface ) :

       

      public class TestCommand implements Command {

          public ExecutionResults execute(CommandContext ctx) {

              ExecutionResults executionResults = new ExecutionResults();

              try {

                  InitialContext ctx1 = new InitialContext();

                  DummyBeanLocal dummyBean =(DummyBeanLocal)ctx1.lookup("java:global/Test-EAR/ejb-TestBean/DummyBean!com.mst.ejb.DummyBeanLocal");

              } catch (NamingException e) {

              }

              return executionResults;

          }}

       

      The error message is :

      [org.jbpm.executor.impl.AvailableJobsExecutor] (pool-18-thread-1) Error during command ag.pst.TestCommand execution

      com.mst.ejb.DummyBeanLocal$$$view8 cannot be cast to com.mst.ejb.DummyBeanLocal

       

      is it possible to use ejb  on Command interface ?  what is the best approach to use ejb and jbpm together ?

      Any help and  tips would be greatly appreciated .