Hello,
I am running Kie Server (7.15.0.Final) as a Spring Boot application, and I am using the jboss/drools-workbench-showcase:7.15.0.Final docker image to run the Workbench as a container. I have successfully linked the server to the workbench (the server shows up in the workbench). Here are some of the properties I configured in "resources/application.properties":
kieserver.serverId=SpringBoot
kieserver.serverName=KIE Server SpringBoot
kieserver.restContextPath=/rest
cxf.path=/rest
kieserver.location=
http://192.168.1.179:8090/rest/serverkieserver.controllers=
http://192.168.1.179:8080/drools-wb/rest/controller
However, when I attempt to build/deploy a container to the server (I am using the mortgages project as an example) I receive this from on the Kie Server end:
-------------------------------- START STACK TRACE ----------------------------------
2019-01-30 11:21:35.807 INFO 24843 --- [ main] o.k.s.services.impl.ContainerManager : About to install containers '[KieContainerResource [containerId=mortgages:mortgages:1.0.0-SNAPSHOT, releaseId=mortgages:mortgages:1.0.0-SNAPSHOT, resolvedReleaseId=null, status=STARTED]]' on kie server 'KieServer{id='SpringBoot'name='KIE Server SpringBoot'version='7.15.0.Final'location='
http://192.168.1.179:8090/rest/server'}'
2019-01-30 11:21:35.836 WARN 24843 --- [ main] o.a.m.i.embedder.MavenSettings : Environment variable M2_HOME is not set
2019-01-30 11:21:39.573 WARN 24843 --- [ main] o.a.maven.integration.MavenRepository : Unable to resolve artifact: mortgages:mortgages:1.0.0-SNAPSHOT
2019-01-30 11:21:40.184 WARN 24843 --- [ main] o.a.maven.integration.MavenRepository : Unable to resolve artifact: mortgages:mortgages:pom:1.0.0-SNAPSHOT
2019-01-30 11:21:40.191 ERROR 24843 --- [ main] o.k.server.services.impl.KieServerImpl : Error creating container 'mortgages:mortgages:1.0.0-SNAPSHOT' for module 'mortgages:mortgages:1.0.0-SNAPSHOT'
java.lang.RuntimeException: Cannot find KieModule: mortgages:mortgages:1.0.0-SNAPSHOT
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186) ~[drools-compiler-7.15.0.Final.jar:7.15.0.Final]
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176) ~[drools-compiler-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:238) [kie-server-services-common-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.services.impl.ContainerManager.installContainersSync(ContainerManager.java:44) [kie-server-services-common-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.services.impl.ContainerManager.installContainers(ContainerManager.java:33) [kie-server-services-common-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.services.impl.ControllerBasedStartupStrategy.startup(ControllerBasedStartupStrategy.java:87) [kie-server-services-common-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.services.impl.KieServerImpl.init(KieServerImpl.java:153) [kie-server-services-common-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.springboot.SpringBootKieServerImpl.init(SpringBootKieServerImpl.java:53) [kie-server-spring-boot-autoconfiguration-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.springboot.autoconfiguration.KieServerAutoConfiguration.kieServer(KieServerAutoConfiguration.java:96) [kie-server-spring-boot-autoconfiguration-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.springboot.autoconfiguration.KieServerAutoConfiguration$$EnhancerBySpringCGLIB$$67748abc.CGLIB$kieServer$3(<generated>) [kie-server-spring-boot-autoconfiguration-7.15.0.Final.jar:7.15.0.Final]
at org.kie.server.springboot.autoconfiguration.KieServerAutoConfiguration$$EnhancerBySpringCGLIB$$67748abc$$FastClassBySpringCGLIB$$6d2533a8.invoke(<generated>) [kie-server-spring-boot-autoconfiguration-7.15.0.Final.jar:7.15.0.Final]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [spring-core-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.kie.server.springboot.autoconfiguration.KieServerAutoConfiguration$$EnhancerBySpringCGLIB$$67748abc.kieServer(<generated>) [kie-server-spring-boot-autoconfiguration-7.15.0.Final.jar:7.15.0.Final]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
--------------------------------------------------------------------------------------------------------
From what I have read so far, I believe I need to specify to the kie server where the maven repository is on the workbench so it can access the artifacts. However I do not know which system property to specify or how to specify it. Is the maven repository url specified as an environment variable or should it be specified in "application.properties"? Or am I missing something else?
Thanks,
Brandon