Accessing remote package built by Drools Workbench on different server

1,672 views
Skip to first unread message

Vytautas Gimbutas

unread,
Dec 2, 2014, 11:51:52 AM12/2/14
to drools...@googlegroups.com
Hello,
Drools workbench is hosted on different server than application that uses artifacts from Workbench. Everything works fine when I host it on the same server and on the same user (i.e. same home directory).

I'm using this approach to fetch package remotely - http://stackoverflow.com/a/21378844/1253057. I've also tried the answer described below in the same thread, but the result is the same.
Is it possible to get it working when Drools workbench is hosted on different server?

Thanks.

---
18:42:08,778 WARN [org.kie.scanner.embedder.MavenSettings] (default task-1) Environment variable M2_HOME is not set
18:42:08,986 INFO  [stdout] (pool-4-thread-2)  wagon http use multi threaded http connection manager maxPerRoute 20, max total 40
18:42:09,634 WARN [org.kie.scanner.MavenRepository] (default task-1) Unable to resolve artifact: com.foo.bar:Engine:LATEST: org.sonatype.aether.resolution.ArtifactResolutionException: Failed to resolve version for com.foo.bar:Engine:jar:LATEST: Could not find metadata com.foo.bar:Engine/maven-metadata.xml in local (/Users/vytautasgimbutas/.m2/repository)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286) [aether-impl-1.13.1.jar:]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:205) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:194) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.ArtifactResolver.resolveArtifact(ArtifactResolver.java:51) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:100) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:93) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:114) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:100) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:77) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at com.foo.bar.engine.KnowledgeServicesManager.getContainer(KnowledgeServicesManager.java:28) [classes:]
at com.foo.bar.engine.KnowledgeBaseManager.getAdditionalInformationKieBase(KnowledgeBaseManager.java:12) [classes:]
at com.foo.bar.engine.KnowledgeSessionManager.createStatelessKnowledgeSessionAdditionalInformation(KnowledgeSessionManager.java:95) [classes:]
at com.foo.bar.inspection.InspectionService.inspect(InspectionService.java:26) [classes:]
at com.foo.bar.resources.ResourceManager.updateClient(ResourceManager.java:209) [classes:]
at com.foo.bar.resources.ResourceManager.expireClient(ResourceManager.java:200) [classes:]
at com.foo.bar.api.rest.endpoint.ClientEndpoint.expireCLientClientEndpoint.java:50) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Caused by: org.sonatype.aether.resolution.VersionResolutionException: Failed to resolve version for com.foo.bar:Engine:jar:LATEST: Could not find metadata com.foo.bar:Engine/maven-metadata.xml in local (/Users/vytautasgimbutas/.m2/repository)
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:287) [maven-aether-provider-3.0.5.jar:3.0.5]
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:272) [aether-impl-1.13.1.jar:]
... 59 more
Caused by: org.sonatype.aether.transfer.MetadataNotFoundException: Could not find metadata com.foo.bar:Engine/maven-metadata.xml in local (/Users/vytautasgimbutas/.m2/repository)
at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:215) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:173) [aether-impl-1.13.1.jar:]
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:225) [maven-aether-provider-3.0.5.jar:3.0.5]
... 60 more

18:42:09,640 WARN [org.kie.scanner.MavenRepository] (default task-1) Unable to resolve artifact: com.foo.bar:Engine:pom:LATEST: org.sonatype.aether.resolution.ArtifactResolutionException: Failed to resolve version for com.foo.bar:Engine:pom:LATEST: Could not find metadata com.foo.bar:Engine/maven-metadata.xml in local (/Users/vytautasgimbutas/.m2/repository)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286) [aether-impl-1.13.1.jar:]
at org.kie.scanner.MavenRepository.resolveArtifact(MavenRepository.java:205) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.ArtifactResolver.getPomFileForGAV(ArtifactResolver.java:106) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.ArtifactResolver.getResolverFor(ArtifactResolver.java:72) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.loadPomArtifact(KieRepositoryScannerImpl.java:125) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:101) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:93) [kie-ci-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:114) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:100) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:77) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at com.foo.bar.engine.KnowledgeServicesManager.getContainer(KnowledgeServicesManager.java:28) [classes:]
at com.foo.bar.engine.KnowledgeBaseManager.getAdditionalInformationKieBase(KnowledgeBaseManager.java:12) [classes:]
at com.foo.bar.engine.KnowledgeSessionManager.createStatelessKnowledgeSessionAdditionalInformation(KnowledgeSessionManager.java:95) [classes:]
at com.foo.bar.inspection.InspectionService.inspect(InspectionService.java:26) [classes:]
at com.foo.bar.resources.ResourceManager.updateClientRiskIndex(ResourceManager.java:209) [classes:]
at com.foo.bar.resources.ResourceManager.expireClientRiskIndex(ResourceManager.java:200) [classes:]
at com.foo.bar.api.rest.endpoint.ClientEndpoint.expireClientRiskIndex(ClientEndpoint.java:50) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Caused by: org.sonatype.aether.resolution.VersionResolutionException: Failed to resolve version for com.foo.bar:Engine:pom:LATEST: Could not find metadata com.foo.bar:Engine/maven-metadata.xml in local (/Users/vytautasgimbutas/.m2/repository)
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:287) [maven-aether-provider-3.0.5.jar:3.0.5]
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:272) [aether-impl-1.13.1.jar:]
... 60 more
Caused by: org.sonatype.aether.transfer.MetadataNotFoundException: Could not find metadata com.foo.bar:Engine/maven-metadata.xml in local (/Users/vytautasgimbutas/.m2/repository)
at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:215) [aether-impl-1.13.1.jar:]
at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:173) [aether-impl-1.13.1.jar:]
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:225) [maven-aether-provider-3.0.5.jar:3.0.5]
... 61 more

18:42:09,645 ERROR [com.foo.bar.api.rest.endpoint.ClientEndpoint] (default task-1) Exception: java.lang.RuntimeException: Cannot find KieModule: com.foo.bar:Engine:LATEST
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:99) [drools-compiler-6.1.0.Final.jar:6.1.0.Final]
at com.foo.bar.engine.KnowledgeServicesManager.getContainer(KnowledgeServicesManager.java:28) [classes:]
at com.foo.bar.engine.KnowledgeBaseManager.getAdditionalInformationKieBase(KnowledgeBaseManager.java:12) [classes:]
at com.foo.bar.engine.KnowledgeSessionManager.createStatelessKnowledgeSessionAdditionalInformation(KnowledgeSessionManager.java:95) [classes:]
at com.foo.bar.inspection.InspectionService.inspect(InspectionService.java:26) [classes:]
at com.foo.bar.resources.ResourceManager.updateClientRiskIndex(ResourceManager.java:209) [classes:]
at com.foo.bar.resources.ResourceManager.expireClientRiskIndex(ResourceManager.java:200) [classes:]
at com.foo.bar.api.rest.endpoint.ClientEndpoint.expireClientRiskIndex(ClientEndpoint.java:50) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]

Michael Anstis

unread,
Dec 2, 2014, 1:28:44 PM12/2/14
to drools...@googlegroups.com
Have you configured the remote (i.e. workbench) Maven repository in your client (i.e. your consuming code) settings.xml?

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@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-usage/147cd375-02c1-4dd0-8abc-7bdb64947ffd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vytautas Gimbutas

unread,
Dec 2, 2014, 1:53:14 PM12/2/14
to drools...@googlegroups.com
I didn't have, but now I have and the same problem is still here.

~/.m2/settings.xml & /home/dev/settings.xml:
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <profiles>
        <profile>
            <id>profile-1</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>drools-wb</id>
                    <name>Drools workbench</name>
                    <url>http://xxxx:8084/drools-wb/maven2</url>
                </repository>
            </repositories>
        </profile>
    </profiles>
</settings>

I also added system property:
kie.maven.settings.custom=/home/dev/settings.xml

Michael Anstis

unread,
Dec 2, 2014, 2:16:08 PM12/2/14
to drools...@googlegroups.com

Can you trace route from the client server to workbench server on port 8084 to verify network connectivity between the 2 is not your issue?

What errors do you get?

Sent on the move

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

Vytautas Gimbutas

unread,
Dec 3, 2014, 10:24:25 AM12/3/14
to drools...@googlegroups.com
Hi, I found in resolver-status.properties (~/.m2/...) "not authorized". After adding the credentials it started to work.
Thanks.

Shiva moorthy P V

unread,
Sep 22, 2015, 6:50:41 AM9/22/15
to Drools Usage
Hi Vytautas,

I have created a rule and deployed it in local Maven repository using Kie Workbench. (localhost:8080)
Now I am trying to access from my application in Eclipse.

But I am not getting what URL I have to use in my app to access the repository.

Could you please hlep?

Regards,
Shiva

Michael Anstis

unread,
Sep 22, 2015, 6:53:42 AM9/22/15
to drools...@googlegroups.com
localhost:8080/<web-context>/maven2

Where <web-context> is whatever web-context you've deployed kie-wb under; e.g. kie-wb-6.2.0.Final-eap6_4 etc (i.e. the URL you use to access the workbench).

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

Shiva moorthy P V

unread,
Sep 22, 2015, 7:14:56 AM9/22/15
to Drools Usage
Hi Michael,

Thanks for the reply.
We are using JBOS kie-drools-wb-distribution-wars-6.2.0.Final-jboss-as7
Is this the expected behaviuor?
Is the URL http://localhost:8080/kie-drools-wb-distribution-wars-6.2.0.Final-jboss-as7/maven2 accessible only from Application and not from the browser??
Please help.

Regards,
Shiva

Michael Anstis

unread,
Sep 22, 2015, 7:35:08 AM9/22/15
to drools...@googlegroups.com
The URL is not "browsable" i.e. you cannot type it into a browser and expect to browse the repository.

However if you append GAV information to the URL you can download individual JARs; or if you use the URL for a <repository> definition in your pom Maven will resolve dependencies from the workbench's "internal" repository.

Shiva moorthy

unread,
Sep 23, 2015, 4:33:44 AM9/23/15
to drools...@googlegroups.com
Hi Michael,

Thanks for letting me know this as I did not find any documentation about what will be the default URL for local repository created using workbench.

However, it is giving me error now when I use it in my app:

Below is how I configured repository in POM file:
<repositories>
   <repository>
     <id>kie-drools-wb-distribution-wars-6.2.0.Final-jboss-as7</id>
     <name>Drools Workbench</name>
   </repository>
  </repositories>

Below is how I access the KieModule from my app:
ReleaseId releaseId = kieServices.newReleaseId( "demo", "MyNewProject", "1.0" );

I am getting the below error as it is unable to locate the artifacts:
java.lang.RuntimeException: Cannot find KieModule: demo:MyNewProject:1.0
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97)

Am I doing anything wrong here? Or do I have to configure something to access the repository from remote machine?

Regards,
Shiva

--
You received this message because you are subscribed to a topic in the Google Groups "Drools Usage" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-usage/xyki9ro6PNM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-usage...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Shiva moorthy

unread,
Sep 23, 2015, 4:49:21 AM9/23/15
to drools...@googlegroups.com
+More information below:

This is how I added dependency:

<dependency>
<groupId>demo</groupId>
<artifactId>MyNewProject</artifactId>
<version>1.0</version>
</dependency>

It is unable to resolve the dependency.
--
 
Regards,
Shiva

Shiva moorthy

unread,
Sep 23, 2015, 5:14:00 AM9/23/15
to drools...@googlegroups.com
Hi Michael,

It looks like an issue with access to remote repository as the resource is available there (cross checked by logging into remote machine and firing URL http://localhost:8080/kie-drools-wb-distribution-wars-6.2.0.Final-jboss-as7/maven2/demo/MyNewProject/1.0/MyNewProject-1.0.jar which works fine)

Any access privileges I need to do add in my eclipse IDE or somewhere ?
Any idea?

Regards,
Shiva
--
 
Regards,
Shiva

Michael Anstis

unread,
Sep 23, 2015, 5:46:34 AM9/23/15
to drools...@googlegroups.com
The Maven repository is protected and you need to provide authentication credentials.

If you access the URL (in your example) from an "already authenticated (workbench)" session you won't need provide any.

If, for example, you paste the URL into a new browser window (that has not logged into the workbench) you'll be prompted for a login. Any "workbench" login will suffice.

Therefore you need to configure authentication settings in your maven settings.xml file. Here's an example:

 <server>  
      <id>guvnor-m2-repo</id>
      <username>user-id</username>
      <password>password</password>
      <configuration>
        <wagonProvider>httpclient</wagonProvider>
        <httpConfiguration>
          <all>
            <usePreemptive>true</usePreemptive>
          </all>
        </httpConfiguration>
      </configuration>
    </server>

The "id" corresponds to the "id" in your repository configuration.

With kind regards,

Mike 

Shiva moorthy

unread,
Sep 24, 2015, 12:22:45 AM9/24/15
to drools...@googlegroups.com
Hi Michael,

Thanks a lot for the inputs.
Now I am able to resolve the dependencies.
However, When I try to access it using ReleaseID, it throws me below error:
java.lang.RuntimeException: Cannot find KieModule: demo:MyNewProject:1.0
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97)
at com.hp.sparkDemo.CaseDataFilter.main(CaseDataFilter.java:68)

This is how I am accessing the artifact:
ReleaseId releaseId = new ReleaseIdImpl( "demo", "MyNewProject", "1.0" );
 KieContainer kieContainer  = kieServices.newKieContainer(releaseId);

I see the jar (MyNewProject-1.0.jar) under maven dependencies folder in Eclipse.
Also, the statement import demo.mynewproject.*;  does not throw any error.

Am I missing something?


Regards,
shiva



For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Michael Anstis

unread,
Sep 24, 2015, 1:14:33 AM9/24/15
to drools...@googlegroups.com

OK.

Think of this :

Your project has a pom.xml that contains a <repository> definition pointing at the workbench. Eclipse uses this (including the authentication in settings.xml) to connect to the workbench 's repository to resolve dependencies. All of this happens at compile time.

Now at runtime things are a little different. The executing code  has no pom.xml at runtime (all be it the code was deployed as a JAR/WAR/EAR etc). So how does KieService know where to look to resolve KJARs?

The answer lay in settings.xml again. You need to add a profile that is active by default with the workbench 's repository definition.

I'm not at my PC right now so cannot paste an example, but read the maven documentation - it'll have examples.

With kind regards,

Mike

Shiva moorthy

unread,
Sep 24, 2015, 1:58:27 AM9/24/15
to drools...@googlegroups.com
HI Michael,

I am already doing that in m2\settings.xml as show below, but still facing the same problem. Please also note below that I am using a Proxy.

Regards,
Shiva

 <servers>
   <server>  
      <id>uf-playground</id>
      <username>applicationuser</username>
      <password>application</password>
      <configuration>
        <wagonProvider>httpclient</wagonProvider>
        <httpConfiguration>
          <all>
            <usePreemptive>true</usePreemptive>
          </all>
        </httpConfiguration>
      </configuration>
    </server>
  </servers>
  <mirrors/>
  <proxies>
    <proxy>
      <id>web-proxy.corp.hp.com</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>web-proxy.corp.hp.com</host>
      <port>8080</port>
      <username></username>
      <password></password>
      <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts>
    </proxy>
  </proxies>
   <profiles>
        <profile>
            <id>myprofile</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
<repositories>
<repository>
 <id>uf-playground</id>
 <name>Drools Workbench</name>
</repository>
</repositories>
        </profile>
    </profiles>
</settings>








For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Michael Anstis

unread,
Sep 24, 2015, 2:06:09 AM9/24/15
to drools...@googlegroups.com
OK, what version are you using?

We had an issue with KieScanner (used by KieServices) resolving artifacts in additional reposiitories: https://issues.jboss.org/browse/DROOLS-899

This is fixed in 6.2.0.CR (6.2.0.Final hitting the streets very, very soon - been delayed by ~2 weeks but "imminent")

Shiva moorthy

unread,
Sep 24, 2015, 2:46:20 AM9/24/15
to drools...@googlegroups.com
oh!! That helped me. Thank you. I updated kie-ci to 6.2.0.Final.
But now the KieScanner gives different error as below. Any idea about this?

Regards,
Shiva

Exception in thread "main" java.lang.NoSuchMethodError: com.google.inject.Binder.bindListener(Lcom/google/inject/matcher/Matcher;[Lcom/google/inject/spi/ProvisionListener;)V
at org.eclipse.sisu.plexus.PlexusBindingModule.configure(PlexusBindingModule.java:75)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.spi.Elements.getElements(Elements.java:92)
at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:75)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:477)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:203)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:167)
at org.kie.scanner.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:136)
at org.kie.scanner.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:110)
at org.kie.scanner.embedder.MavenEmbedder.<init>(MavenEmbedder.java:88)
at org.kie.scanner.embedder.MavenEmbedder.<init>(MavenEmbedder.java:115)
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:27)
at org.kie.scanner.embedder.MavenProjectLoader.loadMavenProject(MavenProjectLoader.java:67)
at org.kie.scanner.Aether.<init>(Aether.java:47)
at org.kie.scanner.Aether.getAether(Aether.java:57)
at org.kie.scanner.MavenRepository.getMavenRepository(MavenRepository.java:73)
at org.kie.scanner.ArtifactResolver.<init>(ArtifactResolver.java:36)
at org.kie.scanner.KieRepositoryScannerImpl.getArtifactResolver(KieRepositoryScannerImpl.java:85)
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:95)
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:91)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:113)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:99)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:76)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:95)
at com.hp.sparkDemo.CaseDataFilter.main(CaseDataFilter.java:68)


For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Michael Anstis

unread,
Sep 24, 2015, 2:54:07 AM9/24/15
to drools...@googlegroups.com

Hehe.. my mistake I meant fixed in 6.3.0.Final(*) (or latest SNAPSHOT). You'll need to update the whole drools distribution you use not just a single JAR.

(*) My mistake was that 6.2 is the version of RedHat's BPMS that'll be based on community 6.3.x.

Shiva moorthy

unread,
Sep 24, 2015, 3:09:55 AM9/24/15
to drools...@googlegroups.com
HI Michael,

No problem:-)
I updated all 3 jars, namely drools-core, drools-compiler and kie-ci with 6.3.0.CR2 (the latest available) , but still facing this Google API exception.
Anything I need to set in Eclipse?

The dependency POM config below:

<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>6.3.0.CR2</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>6.3.0.CR2</version>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
<version>6.3.0.CR2</version>
</dependency>

Regards,
Shiva



For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Michael Anstis

unread,
Sep 24, 2015, 4:08:37 AM9/24/15
to drools...@googlegroups.com
The fix I linked isn't in 6.3.0.CR2, only the latest SNAPSHOTs or Final (when it's released.. any day soon).

On 24 September 2015 at 06:58, Shiva moorthy <psbhat...@gmail.com> wrote:

Shiva moorthy

unread,
Sep 24, 2015, 4:46:57 AM9/24/15
to drools...@googlegroups.com
Hi Michael,

Thank you.
So, Is there any workaround solution for this exception or Do I have to wait till the Final version is updated in Maven?

Meanwhile I tried to access the latest SNAPSHOT by mentioning the version as 6.3.0-SNAPSHOT as below. But the dependency is not getting resolved. Am I missing something here?

<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
<version>6.3.0-SNAPSHOT</version>
</dependency>




For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Shiva moorthy

unread,
Sep 24, 2015, 11:26:23 AM9/24/15
to drools...@googlegroups.com

Hi Michael,

Any solution for the problem I mentioned above?

Thank you.

Michael Anstis

unread,
Sep 24, 2015, 11:28:54 AM9/24/15
to drools...@googlegroups.com
No, but I think 6.3.0.Final will be released before the weekend.

Shiva moorthy

unread,
Sep 24, 2015, 12:00:26 PM9/24/15
to drools...@googlegroups.com

Thanks Michael for the update.
I will wait for the new version.

Shiva moorthy

unread,
Sep 28, 2015, 2:22:00 AM9/28/15
to drools...@googlegroups.com
Hi Michael,

Good Morning.

Now I am using the latest 6.3.0.Final which resolved the earlier exception, however it is throwing a different exception as shown below:
It seems KieScanner is trying to access eciplse aether. I tried with referencing eclipse Aether APIs, but then it started giving Ant Loader exceptions and so on.

Is this a bug or am I missing something?
Please help.

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/aether/deployment/DeploymentException
at org.kie.scanner.ArtifactResolver.<init>(ArtifactResolver.java:52)
at org.kie.scanner.KieRepositoryScannerImpl.getArtifactResolver(KieRepositoryScannerImpl.java:101)
at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:118)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:129)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:115)
at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:92)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:115)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:111)
at com.hp.sparkDemo.CaseDataFilter.main(CaseDataFilter.java:71)
Caused by: java.lang.ClassNotFoundException: org.eclipse.aether.deployment.DeploymentException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
--
 
Regards,
Shiva

Michael Anstis

unread,
Sep 28, 2015, 4:26:03 AM9/28/15
to drools...@googlegroups.com
Can you give exact details of what you are trying to do and the environment in which your're trying to do it etc

KieScanner uses Aether, but you should not need to change anything as the appropriate dependency will be downloaded by maven.

Shiva moorthy

unread,
Sep 28, 2015, 5:26:02 AM9/28/15
to drools...@googlegroups.com
HI Michael,

Thanks for the reply.

As I have mentioned in my earlier mails, we have a Kie workbench setup on JBOSS on remote machine and a maven repository configured there. My goal is to access artifacts from this remote repository from my local.

In Detail:
On the remote machine, we have created a Drools rule and this artifact is published in the maven repository (name of repository: uf-playground) on the remote machine using Kie workbench.

Now, I am trying to access this remote repository using Kie scanner APIs from my local.
I am using eclipse as an IDE for my application development and have created a Maven project.

Below is the code snippet of what I have written inside my Java program within this Maven Project to access remote repository:

KieServices kieServices = KieServices.Factory.get();
ReleaseId releaseId = new ReleaseIdImpl( "demo", "MyNewProject", "1.0" );
KieContainer kieContainer  = kieServices.newKieContainer(releaseId);

Last line throws me the error I mentioned in the last mail.

I have attached settings.xml of Eclipse Maven Plugin for your reference.
Please note that the remote repository is working fine from the browser URL and also I am able to see it in "Maven Dependencies" in my package explorer of eclipse.
I have a dependency in my project pom file for the artifact as below and it is getting resolved:
<dependency>
<groupId>demo</groupId>
<artifactId>MyNewProject</artifactId>
<version>1.0</version>
</dependency>

Please suggest if I am doing anything wrong or if you need more information.






For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva
settngs.xml

Kunal Ransing

unread,
Sep 28, 2015, 11:19:54 AM9/28/15
to Drools Usage
Hi,

In above setting.xml, repository url is http://16.155.181.143:8080/kie-drools-wb-distribution-wars-6.2.0.Final-jboss-as7/maven2
It should be 6.3.0 Final, right ?
...

Michael Anstis

unread,
Sep 28, 2015, 11:49:09 AM9/28/15
to drools...@googlegroups.com
Assuming you've deployed 6.3.0-Final of the WARs you are correct.

I've asked a colleague to comment on the Eclipse/Aether issue - if you're able to run from CLI (i.e not within Eclipse, so CLI, NetBeans, IDEA etc) and let us know if the problem remains it could help. 

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

Kunal Ransing

unread,
Sep 29, 2015, 5:47:08 AM9/29/15
to Drools Usage
Hi ,
Anyone solved it ? 
I am facing problem for same thing except I am using simple java web project.
I opened post: Drool 6.2 - Failed to run rule using loading kie project artifact jar in "non-maven java web project
I tried with 6.3.0Final But get error java.lang.RuntimeException: Cannot find KieModule: com.eno:Test1:LATEST.
Please see my post for more detail.
...

Kunal Ransing

unread,
Sep 29, 2015, 11:42:03 PM9/29/15
to Drools Usage
Hi,
Any update? Anyone solved problem of Accessing remote package built by Drools Workbench 6.3 on different server ?

raks...@gmail.com

unread,
Sep 30, 2015, 6:55:21 AM9/30/15
to Drools Usage
Hi,

I work with Shiva Moorthy. I only see the wars for four different servers: Wildfly, Tomcat, Weblogic, WAS, EAP. We use JBoss Application Server to host our WAR. I could not find it in the downloaded kie-drools-distribution. Can someone help?

Thanks
Rakshaki

Mark Proctor

unread,
Sep 30, 2015, 8:21:17 AM9/30/15
to drools...@googlegroups.com
try EAP
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

Kunal Ransing

unread,
Sep 30, 2015, 10:16:24 AM9/30/15
to Drools Usage
Hi Mark,
Any update about exception java.lang.RuntimeException: Cannot find KieModule: com.eno:Test1:LATEST.

I opened post: Drool 6.2 - Failed to run rule using loading kie project artifact jar in "non-maven java web project
I also tried with Drool 6.3 as asked by Michael but giving above exception.
I missed something or Is there any bug? 

Mark Proctor

unread,
Sep 30, 2015, 10:31:21 AM9/30/15
to drools...@googlegroups.com
i’ve not heard of anything. If the issue is still there, then please open a JIRA with as simple as possible reproducer.

Mark

jco

unread,
Oct 1, 2015, 3:43:51 AM10/1/15
to Drools Usage
Wiildfly really IS JBoss 8 AS.  Upgrade to at least Drools 6.2 - it runs fine with my system.  I even posted the problems and new documents at http://javarules.blogspot.com/2015/08/installing-jboss-and-drools-workbench.html that explains how Drools 6.1 goes with JBAS 7.x and Drools 6.2 goes with JBAS 8.x.  AND, it was posted here as well.  Somewhere...  :-)

jco

Kunal Ransing

unread,
Oct 3, 2015, 9:32:38 AM10/3/15
to Drools Usage
Hi,
I solved it. Problem is in setting.xml. Actually I used <server>xxx</server>. Correct way is <servers><server>xxx</server></servers>. Also removed code of programmatically download the .jar. Below correct code:
    KieServices ks = KieServices.Factory.get();
    //Set settings.xml using below OR keep setting.xml at /home/.m2/settings.xml
    System.setProperty("kie.maven.settings.custom", "/home/krunal/devtool/drool6/settings.xml");
    ReleaseIdImpl r = new ReleaseIdImpl("com.eno:Test1:LATEST");
    KieContainer kContainer = ks.newKieContainer(r);
    KieScanner kieScanner = ks.newKieScanner(kContainer);
    kieScanner.start(5000L);

Now I tried to do programmatically download the .jar & create kiecontainer without maven settings.xml like stackoverflow.com/questions/21186570/… , it gives me above error java.lang.RuntimeException: Cannot find KieModule: com.eno:Test1:LATEST. I used below code. Any idea ?
    //Not working below way...giving error java.lang.RuntimeException: Cannot find KieModule: com.eno:Test1:LATEST
    KieServices ks = KieServices.Factory.get();
    KieRepository kr = ks.getRepository();
    System.out.println(kr.getDefaultReleaseId());
    UrlResource urlResource = (UrlResource) ks.getResources().newUrlResource(url);
    urlResource.setUsername("admin");
    urlResource.setPassword("Passw0rd");
    urlResource.setBasicAuthentication("enabled");
    InputStream is = urlResource.getInputStream();
    KieModule kModule = kr.addKieModule(ks.getResources().newInputStreamResource(is));
    System.out.println(kModule.getReleaseId());
    KieContainer kContainer = ks.newKieContainer(kModule.getReleaseId());

Shiva moorthy

unread,
Oct 8, 2015, 2:10:35 AM10/8/15
to drools...@googlegroups.com
HI Michael,

Any update on this Eclipse/Aether exception?
were you guys able to reproduce it from your end?

Thanks and Regards,
Shiva

--
You received this message because you are subscribed to a topic in the Google Groups "Drools Usage" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-usage/xyki9ro6PNM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-usage...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
 
Regards,
Shiva

Eliot Garcia

unread,
Nov 5, 2015, 11:39:19 AM11/5/15
to Drools Usage
Good morning

I try run my rules but y have the same problem

Could not find artifact bcId:nx1project:jar:1.0111 in artifactory...

Somebody has any example about that??

It would be helpful to have some code to download and to test the operation About kiedrools.

anyone could help with this please!!


Reply all
Reply to author
Forward
0 new messages