Cannot Create Container with Kie Server Spring Boot

197 views
Skip to first unread message

bra...@qualifynow.io

unread,
Jan 30, 2019, 1:37:17 PM1/30/19
to Drools Setup
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/server
kieserver.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

Maciej Swiderski

unread,
Jan 30, 2019, 3:01:08 PM1/30/19
to drools...@googlegroups.com
That’s all standard maven setup of remote repositories, have a look at this https://access.redhat.com/documentation/en-us/red_hat_jboss_bpm_suite/6.2/html/development_guide/maven_settings_file

Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/f0e14354-f65c-491c-a5dc-89770d73f82b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Smith

unread,
Jul 22, 2019, 6:25:45 AM7/22/19
to Drools Setup
Hi Maciej Swiderski,

Can you suggest me how can i develop a rule using a guided rule editor to compare two list objects.

As i did not find any  facility to compare the list objects using guided editor.

I know we can implement using the drl file.

But here we require using guided rule
Reply all
Reply to author
Forward
0 new messages