0 Replies Latest reply on Jul 27, 2018 10:39 AM by Aravind PS

    jBPM 7.8.0 remote services

    Aravind PS Newbie

      I am calling Kie Server rest api from sample application in jBPM 7.8.0: {The drools core jar does not have this class}

      When I try to start a process using remote API, I am getting a class not found issue.

       

      SEVERE: Servlet.service() for servlet [mvc-dispatcher] in context with path [/Avery-web] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/drools/core/command/CommandService] with root cause

      java.lang.ClassNotFoundException: org.drools.core.command.CommandService

      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)

      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)

      at java.lang.ClassLoader.defineClass1(Native Method)

      at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)

      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)

      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)

      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)

      at org.kie.services.client.api.command.RemoteRuntimeEngine.getKieSession(RemoteRuntimeEngine.java:23)

      at org.avery.jbpm.remote.service.AveryProcessService.startProcess(AveryProcessService.java:29)

      at org.avery.jbpm.remote.AveryRemoteProcessWorkflowManager.triggerApprovalWorkflowProcess(AveryRemoteProcessWorkflowManager.java:47)

      at org.avery.jbpm.web.DeploymentController.startRemoteInstance(DeploymentController.java:103)

      at org.avery.jbpm.web.DeploymentController.getDeployments(DeploymentController.java:91)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)

      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)

      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)

      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)

      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)

      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)

      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)

      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)

      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)

      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)

      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)

      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:206)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)

      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

      at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)

      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)

      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)

      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

      at org.kie.integration.tomcat.JACCValve.invoke(JACCValve.java:113)

      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)

      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

       

      code:

      RemoteConfiguration configuration = new RemoteConfiguration(serverRequest.getDeploymentId(),

      new URL(serverRequest.getUrl()), serverRequest.getUser(), serverRequest.getPassword());

      logger.debug("configuration: " + configuration);

      RemoteRuntimeEngine remoteRuntimeEngine = new RemoteRuntimeEngine(configuration);

       

      KieSession ksession = remoteRuntimeEngine.getKieSession();

       

       

      private void start(String name, Map<String, Object> params, KieSession ksession) {

       

      try {

      logger.debug(name);

      ProcessInstance processInstance = ksession.startProcess(name, params);

      logger.debug("processInstance: " + processInstance);

      logger.debug(processInstance.getId() + "");

      } catch(Exception ex) {

      logger.debug("Error: " + ex.getMessage());

      }

      }

       

      Can anyone help me with this issue?

       

      Aravind