1 2 Previous Next 15 Replies Latest reply on Aug 3, 2007 8:51 AM by mailinator

    EjbSchedulerServiceFactory - Exception

      Hi,
      I have some problems with the EjbScheduler.
      while executing

      code :
      ProcessInstance processInstance = new ProcessInstance(processDefinition);

      Token token = processInstance.getRootToken();
      token.signal("Transition");

      I got this :

      exception

      javax.servlet.ServletException: java.lang.ClassCastException: org.jbpm.scheduler.ejbtimer.EjbSchedulerServiceFactory
      org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      caused by

      java.lang.ClassCastException: org.jbpm.scheduler.ejbtimer.EjbSchedulerServiceFactory
      org.jbpm.svc.Services.getServiceFactory(Services.java:122)
      org.jbpm.svc.Services.getService(Services.java:139)
      org.jbpm.svc.Services.getCurrentService(Services.java:88)
      org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:328)
      org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
      org.jbpm.graph.exe.Token.end(Token.java:303)
      org.jbpm.graph.exe.Token.end(Token.java:253)
      org.jbpm.graph.node.EndState.execute(EndState.java:59)
      org.jbpm.graph.def.Node.enter(Node.java:318)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
      org.jbpm.graph.def.Transition.take(Transition.java:151)
      org.jbpm.graph.def.Node.leave(Node.java:393)
      org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
      org.jbpm.graph.def.Node.leave(Node.java:357)
      org.jbpm.graph.node.TaskNode.execute(TaskNode.java:190)
      org.jbpm.graph.def.Node.enter(Node.java:318)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
      org.jbpm.graph.def.Transition.take(Transition.java:151)
      org.jbpm.graph.def.Node.leave(Node.java:393)
      org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
      org.jbpm.graph.node.Decision.execute(Decision.java:152)
      org.jbpm.graph.def.Node.enter(Node.java:318)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
      org.jbpm.graph.def.Transition.take(Transition.java:151)
      org.jbpm.graph.def.Node.leave(Node.java:393)
      org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
      org.jbpm.graph.node.Decision.execute(Decision.java:152)
      org.jbpm.graph.def.Node.enter(Node.java:318)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
      org.jbpm.graph.def.Transition.take(Transition.java:151)
      org.jbpm.graph.def.Node.leave(Node.java:393)
      org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
      org.jbpm.graph.def.Node.leave(Node.java:357)
      org.jbpm.graph.node.TaskNode.execute(TaskNode.java:190)
      org.jbpm.graph.def.Node.enter(Node.java:318)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
      org.jbpm.graph.def.Transition.take(Transition.java:151)
      org.jbpm.graph.def.Node.leave(Node.java:393)
      org.jbpm.graph.node.StartState.leave(StartState.java:70)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      org.jbpm.graph.def.Node_$$_javassist_307.leave(Node_$$_javassist_307.java)
      org.jbpm.graph.exe.Token.signal(Token.java:194)
      org.jbpm.graph.exe.Token.signal(Token.java:157)
      com.it.application.responsable.cinematique.taches.tachesAction.traitement(tachesAction.java:165)
      com.it.framework2.cinematique.InterforumGeneraleAction.execute(InterforumGeneraleAction.java:240)
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      Does anyone know about this ?

      Regards,

      O.M.

        • 1. Re: EjbSchedulerServiceFactory - Exception

          Hi,

          no one ever encountred this issue ?
          If you have please help, i'm really stuck with that error and i didn't find any useful information in the userguide.

          Regards,

          O.M.

          • 2. Re: EjbSchedulerServiceFactory - Exception
            kukeltje

            O.M.

            I really, really think you should be more patient with your questions being answered. Some people (in fact including me) may get a little irritated. If things are really important and this open, free user forum is not quick enough, I'd suggest you buy commercial support somewhere (e.g. with JBoss/Red Hat)

            Ronald

            • 3. Re: EjbSchedulerServiceFactory - Exception

              Hi Ronald,

              you don't have to feel irritated.
              I generally wait half a day or a day before posting again.

              Its not that i don't like free forum, but buying commercial support isnt a solution. I tried Jbpm after giving a try to WLI because i thought it was easier.
              I'm beginning to think otherwise.

              Of course its not mandatory to post on my threads. If someone have information for me, i always appreciate if they share those informations.
              If not, everybody is welcome on my threads either for reading or posting.
              Did you ever meet the issue with that Ejbtimer ? Do you have some pointers on the docs to help ?
              If so feel free to post.

              Anyway, thanks for your post and feel free to post.

              Regards,

              O.M.

              • 4. Re: EjbSchedulerServiceFactory - Exception

                O.M.,

                Some of us read EVERY POST to try to help as many folks as we can.
                Unfortunately, there aren't very many folks who try to answer queries.
                So you should try to make their (unpaid, volunteer) job easier, not harder by cluttering up the forums with redundant queries.

                >> you don't have to feel irritated.
                >> I generally wait half a day or a day before posting again.

                Half a day!!!!????
                This is borderline spamming.
                Please back off to a couple of days, at a minimum.

                -Ed Staub

                • 5. Re: EjbSchedulerServiceFactory - Exception

                  Hi,

                  i agree with you,
                  we should make the job of the helping people easier.

                  I apologize if i have somehow made that job harder.

                  I will think about what you said and wait a couple of days.
                  Thanks for trying to help and for readin EVERY post.

                  BTW, do you have some informations about my problem ?

                  Regards,

                  O.M.

                  • 6. Re: EjbSchedulerServiceFactory - Exception

                    Well, looking at the exception,

                    java.lang.ClassCastException: org.jbpm.scheduler.ejbtimer.EjbSchedulerServiceFactory
                    org.jbpm.svc.Services.getServiceFactory(Services.java:122)


                    then looking at the source it points at...

                    public ServiceFactory getServiceFactory(String name) {
                     return (ServiceFactory) getServiceFactories().get(name);
                     }
                    

                    I'd guess that EjbSchedulerServiceFactory is not an instance of ServiceFactory... but looking at EjbSchedulerServiceFactory.java, I find:

                    public class EjbSchedulerServiceFactory implements ServiceFactory {...}


                    So... it looks like a classloader problem of some kind, where there are two class instantiations of ServiceFactory competing for your affection.

                    At this point, I'd look for competing JBPM deployments in the WAR, EAR (if any), appserver, and anywhere else you can think of.

                    -Ed Staub

                    • 7. Re: EjbSchedulerServiceFactory - Exception

                      Thanks for the pointers.

                      What do you mean by "competing JBPM deployements" ?

                      Regards,

                      O.M.

                      • 8. Re: EjbSchedulerServiceFactory - Exception

                        JBPM deployed more than once, e.g.:
                        - in the WAR
                        and also in the EAR (if there is one)
                        and also in the appserver classpath.

                        I'm really guessing here - if I were in your situation, I'd drop some logging into getServiceFactory to try to find out what's going on.

                        -Ed Staub

                        • 9. Re: EjbSchedulerServiceFactory - Exception

                          Hi,

                          what do you mean by jbpm ?

                          i have deployed the jbpm-enterprise.ear on my jboss server.

                          I also have put the jbpm-jpdl.jar and the jbpm-identity.jar in the war of my application.

                          Is that what you mean ?
                          I didnt see anything about config files in the jbpm-jpdl, was i wrong ?

                          Regards,

                          O.M.

                          • 10. Re: EjbSchedulerServiceFactory - Exception

                            Hi,

                            if i delete the jbpm-jpdl.jar from my WEB-INF/lib of my webapp,

                            i have another exception (different from the previous one).

                            exception :

                            javax.servlet.ServletException: org.jbpm.JbpmException: ejb local timer lookup problem
                            org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
                            org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)

                            caused by
                            org.jbpm.JbpmException: ejb local timer lookup problem
                            org.jbpm.scheduler.ejbtimer.EjbSchedulerService.(EjbSchedulerService.java:34)
                            org.jbpm.scheduler.ejbtimer.EjbSchedulerServiceFactory.openService(EjbSchedulerServiceFactory.java:11)
                            org.jbpm.svc.Services.getService(Services.java:141)
                            org.jbpm.svc.Services.getCurrentService(Services.java:88)
                            org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:328)
                            org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
                            org.jbpm.graph.exe.Token.end(Token.java:303)
                            org.jbpm.graph.exe.Token.end(Token.java:253)
                            org.jbpm.graph.node.EndState.execute(EndState.java:59)
                            org.jbpm.graph.def.Node.enter(Node.java:318)

                            caused by

                            javax.naming.NameNotFoundException: ejb not bound
                            org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
                            org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
                            org.jnp.server.NamingServer.getObject(NamingServer.java:543)
                            org.jnp.server.NamingServer.lookup(NamingServer.java:267)
                            org.jnp.server.NamingServer.lookup(NamingServer.java:270)
                            org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
                            org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
                            org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)


                            While looking for this on the internet, i found this : http://jira.jboss.com/jira/browse/JBPM-877;jsessionid=6CC7D4FBC2903E0C6AB279A215FBD96E

                            Seems like my problem but i dont understand how it was resolved :(

                            Does someone know ?

                            Regards,

                            O.M.

                            • 11. Re: EjbSchedulerServiceFactory - Exception

                              O.M.,

                              You're going to need to start looking at the source code to resolve this stuff. Take a look at where this is coming from:

                              >> org.jbpm.scheduler.ejbtimer.EjbSchedulerService.(EjbSchedulerService.java:34)

                              and you'll get a really good idea of what's going on now.

                              Since you're now getting the service from the service factory, the previous problem appears to be resolved.

                              -Ed Staub

                              • 12. Re: EjbSchedulerServiceFactory - Exception
                                msandoz

                                theres also always remote debugging of the appserver...its pretty simple as you just have to uncomment one line in the run.conf and then connect to port 8787 in the remote debugger in eclipse...

                                • 13. Re: EjbSchedulerServiceFactory - Exception

                                  Hi,

                                  thanks for helping,

                                  @Ed, i did go in the source and in find this :

                                  try {
                                  Context initial = new InitialContext();
                                  LocalTimerServiceHome localTimerServiceHome = (LocalTimerServiceHome) initial.lookup("java:comp/env/ejb/LocalTimerServiceBean"); localTimerService = localTimerServiceHome.create();
                                  } catch (Exception e) {
                                  JbpmException jbpmException = new JbpmException("ejb local timer lookup problem", e);
                                  log.error(e);
                                  throw jbpmException;
                                  }

                                  Apparently thats that lookup that fail. I think that its because the names are not matching or because that ejb does not exist.
                                  My wondering is about where that ejb is defined and/or deployed during the processus of deploying the jbpm-enterprise.ear ?

                                  @msandoz, i will see that functionnality.

                                  Regards,

                                  O.M.

                                  • 14. Re: EjbSchedulerServiceFactory - Exception

                                    O.M.,

                                    You're now into appserver-dependent stuff.
                                    What appserver are you on?
                                    You mentioned WLI - WebLogic, perhaps?

                                    >> My wondering is about where that ejb is defined and/or deployed during the processus of deploying the jbpm-enterprise.ear ?

                                    C'mon, I know you know this stuff!
                                    web.xml? ejb-jar.xml? Put on some hip-boots and wade in!

                                    Also, you can probably use the appserver management tools to query about the deployment.

                                    The "java:comp/env" prefix on the bean name in JNDI may not be uniformly applied by all appservers when a bean is deployed. If you're not on JBoss, that's my first guess.

                                    -Ed Staub

                                    1 2 Previous Next