<div dir="ltr">I have kie-ci on the class path and I don't believe the settings.xml is necessary when the repo i'm pulling from is local on the same machine.<div><br></div><div>I was able to resolve the issue it seems. It turns out I had extra dependencies being declared in a parent pom. When I pulled those out and placed them in the module's pom instead it seems to have fixed the issue. Although, I can see this being an issue down the road. KieServices should be able to reconcile a parent pom if referenced. Perhaps this is a bug?</div>
<div><br></div><div>Jean-Philippe</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 4:34 PM, Mark Proctor <span dir="ltr"><<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">you’ll need kie-ci on the class path, and don’t forget to create your settings.xml<div>
<a href="http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployingSection" target="_blank">http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployingSection</a></div>
<div><br></div><div>Mark<br><div><div><div class="h5"><div>On 31 Mar 2014, at 23:28, Jean-Philippe Steinmetz <<a href="mailto:caskater47@gmail.com" target="_blank">caskater47@gmail.com</a>> wrote:</div><br></div></div>
<blockquote type="cite"><div><div class="h5"><div dir="ltr">Hello,<div><br></div><div>I am trying to set up a simple Drools (6.0.1.Final) application that pulls a kmodule from an external jar that is installed in the local Maven repository. Unfortunately when my code executes the newKieContainer method it crashes with a NullPointerException.</div>
<div><br></div><div>Here is my code...</div><div><br></div><div><div> KieServices kieServices = KieServices.Factory.get();</div><div> ReleaseId releaseId = kieServices.newReleaseId("com.mycompany", "mymodule", "1.0-SNAPSHOT");</div>
<div> KieContainer kContainer = kieServices.newKieContainer(releaseId);</div></div><div><br></div><div>And here is the output I get...</div><div><br></div><div><div>[pool-1-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div>
<div>[pool-3-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div><div>[pool-5-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div>
<div>[pool-7-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div><div>[pool-9-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div>
<div>[pool-11-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div><div>[pool-13-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div>
<div>[pool-15-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div><div>[pool-17-thread-1] INFO com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of application's worked threads is 16</div>
<div>Disconnected from the target VM, address: '<a href="http://127.0.0.1:51890/" target="_blank">127.0.0.1:51890</a>', transport: 'socket'</div><div>Exception in thread "main" java.lang.NullPointerException</div>
<div><span style="white-space:pre-wrap">        </span>at org.kie.scanner.KieRepositoryScannerImpl.addDependencies(KieRepositoryScannerImpl.java:128)</div><div><span style="white-space:pre-wrap">        </span>at org.kie.scanner.KieRepositoryScannerImpl.buildArtifact(KieRepositoryScannerImpl.java:119)</div>
<div><span style="white-space:pre-wrap">        </span>at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:90)</div><div><span style="white-space:pre-wrap">        </span>at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:83)</div>
<div><span style="white-space:pre-wrap">        </span>at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:113)</div><div><span style="white-space:pre-wrap">        </span>at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:99)</div>
<div><span style="white-space:pre-wrap">        </span>at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:76)</div><div><span style="white-space:pre-wrap">        </span>at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:84)</div>
</div><div><br></div><div>The module has the following dependencies listed in the pom.xml.</div><div><br></div><div><dependencies></div><div> <!-- Drools --></div><div> <dependency></div><div> <groupId>org.drools</groupId></div>
<div> <artifactId>drools-core</artifactId></div><div> <version>${drools.version}</version></div><div> <scope>compile</scope></div><div> </dependency></div>
<div> <dependency></div><div> <groupId>org.drools</groupId></div><div> <artifactId>drools-compiler</artifactId></div><div> <version>${drools.version}</version></div>
<div> <scope>compile</scope></div><div> </dependency></div><div> <dependency></div><div> <groupId>org.drools</groupId></div><div> <artifactId>drools-decisiontables</artifactId></div>
<div> <version>${drools.version}</version></div><div> <scope>compile</scope></div><div> </dependency></div><div> <dependency></div><div> <groupId>org.drools</groupId></div>
<div> <artifactId>drools-persistence-jpa</artifactId></div><div> <version>${drools.version}</version></div><div> <scope>compile</scope></div><div> </dependency></div>
<div> <!-- Misc --></div><div> <dependency></div><div><span style="white-space:pre-wrap">        </span> <groupId>org.slf4j</groupId></div><div><span style="white-space:pre-wrap">        </span> <artifactId>slf4j-api</artifactId></div>
<div><span style="white-space:pre-wrap">        </span> <version>1.7.6</version></div><div><span style="white-space:pre-wrap">        </span></dependency></div><div> <dependency></div><div> <groupId>junit</groupId></div>
<div> <artifactId>junit</artifactId></div><div> <version>3.8.1</version></div><div> <scope>test</scope></div><div> </dependency></div><div></dependencies></div>
<div><br></div><div>I have tried searching for help on this but am unable to find anything related. Any help here is appreciated.</div><div><br></div><div>Thanks!</div><div><br></div><div>Jean-Philippe Steinmetz</div></div>
</div></div>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>
</div><br></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>