Deploy container from kie workbench onto kie server running on another machine

2,268 views
Skip to first unread message

Nick

unread,
Jan 5, 2016, 10:43:01 PM1/5/16
to jBPM Usage
Hi,

I would like to deploy kie workbench and kie server on different machines. Both are configured to use different database.

I registered kie server on kie workbench's Deploy/Rule Deployment/Server Management Browser and created a container, After starting the kie server,  I can see the status of kie server shown as started. However, when starting the container from kie workbench, I get the following error on the kie server's log: Cannot find KieModule: org.jbpm:HR:1.0. See the print stack at the bottom.

I have built the org.jbpm:HR:1.0 project and deployed on kie workbench.

As per http://mswiderski.blogspot.be/2015/09/unified-kie-execution-server-part-1.html, "Make sure it was built at least once and is available in maven repository that your server has access to or is in your local maven repo (usually at ~/.m2/reporitory)". I don't want to have to get the project onto the local maven repo manually.

I thought the deployment of the container/project can be managed all on kie workbench. Also, there is a maven repository on kie workbench setup. Do I need to configure the kie server to be able to locate the  maven repository on kie workbench setup? What is the URL to fetch the org.jbpm:HR:1.0 module from the maven repo.

Regards,
Nick

Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT [CONTAINER] org.kie.server.services.impl.KieServerImpl SEVERE Error creating container 'hr' for module 'org.jbpm:HR:1.0'
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT java.lang.RuntimeException: Cannot find KieModule: org.jbpm:HR:1.0
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:117)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:111)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:218)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.kie.server.remote.rest.common.resource.KieServerRestImpl.createContainer(KieServerRestImpl.java:90)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at java.lang.reflect.Method.invoke(Method.java:497)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
Wed Jan 06 2016 11:13:44 GMT+0800 (Malay Peninsula Standard Time) [APP] OUT at java.lang.Thread.run(Thread.java:745)


Maciej Swiderski

unread,
Jan 6, 2016, 1:22:00 AM1/6/16
to Nick, jBPM Usage
Yes, you need to configure kie server to use workbench's maven repo to be able to download artifacts

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/a846a517-05d5-44c3-8536-67e38e14e8a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nick

unread,
Jan 6, 2016, 2:46:14 AM1/6/16
to jBPM Usage, lhw...@gmail.com

Maciej,

Thank you very much for your quick response.

I found out that the URL is like http://hostname:8080/kie-wb/maven2/org/jbpm/HR/1.0/HR-1.0.jar. However, may I know how to configure kie server to use workbench's maven repo (e,g, the host)?


Regards,
Nick
...

Maciej Swiderski

unread,
Jan 6, 2016, 3:19:52 AM1/6/16
to Nick, jBPM Usage
That's standard maven configuration via settings.xml that defines repositories. Keep in mind that you need to configure authentication for workbench maven repo

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.

Nick

unread,
Jan 17, 2016, 11:10:43 AM1/17/16
to jBPM Usage, lhw...@gmail.com

Hi Maciej,

I started the wildfly server with -Dkie.maven.settings,custom=<path of the settings.xml> with the following

The kie-wb is configured with username and password as kieserver/kieserver1! and the user has roles as admin, kie-server and rest-all

<servers>
    <server>
      <id>mvnrepository</id>
      <username>kieserver</username>
      <password>kieserver1!</password>
      <configuration>
        <wagonProvider>httpclient</wagonProvider>
        <httpConfiguration>
          <all>
            <usePreemptive>true</usePreemptive>
          </all>
        </httpConfiguration>
      </configuration>

    </server>
  </servers>

<profiles>
<profile>
    <id>wb</id>
    <repository>
        <id>mvnrepository</id>
        <url>http://192.168.1.67:8080/kie-wb/maven2</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
    </profile>       

  </profiles>

    <activeProfiles>
    <activeProfile>wb</activeProfile>
  </activeProfiles>

I referred to https://bugzilla.redhat.com/show_bug.cgi?id=1059584

However, I am getting the following error:

23:33:40,609 WARN  [org.kie.scanner.MavenRepository] (EJB default - 1) Unable to resolve artifact: org.jbpm:HR:pom:1.0
23:33:40,615 ERROR [org.kie.server.services.impl.KieServerImpl] (EJB default - 1) Error creating container 'hr' for module 'org.jbpm:HR:1.0': java.lang.RuntimeException: Cannot find KieModule: org.jbpm:HR:1.0
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:117) [drools-compiler-6.3.0.Final.jar:6.3.0.Final]
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:111) [drools-compiler-6.3.0.Final.jar:6.3.0.Final]
        at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:214) [kie-server-services-common-6.3.0.Final.jar:6.3.0.Final]
        at org.kie.server.services.impl.ContainerManager.installContainers(ContainerManager.java:39) [kie-server-services-common-6.3.0.Final.jar:6.3.0.Final]
        at org.kie.server.jms.ContainerManagerEJB.installContainers(ContainerManagerEJB.java:38) [kie-server-jms-6.3.0.Final.jar:6.3.0.Final]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_65]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_65]

Nick

unread,
Jan 17, 2016, 1:05:07 PM1/17/16
to jBPM Usage, lhw...@gmail.com

Hi Maciej,

I managed to solve the problem. The repository should be nested under repositories tag. Thank you very much for your hint on authentication configuration.

<repositories>
<repository>

.... 
        </repository> 
<repositories>

Regards,
--Nick

arjunproj...@gmail.com

unread,
Apr 21, 2017, 3:37:43 PM4/21/17
to jBPM Usage
Hi Maciej Swiderski,

  I am similar issue when loading jbpm files in spring boot project.. 


Params available trying to deploy [Ljava.lang.String;@4de158ca
2017-04-22 01:06:21,883 [main] WARN  Unable to resolve artifact: jbpm.processes:example:1.0
org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact jbpm.processes:example:jar:1.0 in central (http://repo.maven.apache.org/maven2)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444) ~[aether-impl-1.0.0.v20140518.jar:na]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) ~[aether-impl-1.0.0.v20140518.jar:na]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223) ~[aether-impl-1.0.0.v20140518.jar:na]
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294) ~[aether-impl-1.0.0.v20140518.jar:na]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:216) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:205) [kie-ci-6.2.0.Final.jar:6.2.0.Final]
at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:104) [jbpm-kie-services-6.2.0.Final.jar:6.2.0.Final]
at org.jbpm.spring.boot.Application.main(Application.java:30) [classes/:na]
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact jbpm.processes:example:jar:1.0 in central (http://repo.maven.apache.org/maven2)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39) ~[aether-connector-basic-1.0.0.v20140518.jar:na]
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355) ~[aether-connector-basic-1.0.0.v20140518.jar:na]
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67) ~[aether-util-1.0.0.v20140518.jar:na]
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581) ~[aether-connector-basic-1.0.0.v20140518.jar:na]
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249) ~[aether-connector-basic-1.0.0.v20140518.jar:na]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520) ~[aether-impl-1.0.0.v20140518.jar:na]
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421) ~[aether-impl-1.0.0.v20140518.jar:na]
... 7 common frames omitted
2017-04-22 01:06:23,129 [main] WARN  Unable to resolve artifact: jbpm.processes:example:1.0

Maciej Swiderski

unread,
Apr 24, 2017, 10:26:39 AM4/24/17
to arjunproj...@gmail.com, jBPM Usage
cleanrly your kjar cannot be found by maven. Make sure it’s properly installed in your local maven repo.

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages