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.
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?
Jean-Philippe
On Mon, Mar 31, 2014 at 4:34 PM, Mark Proctor <mproctor(a)codehaus.org> wrote:
you'll need kie-ci on the class path, and don't forget to
create your
settings.xml
http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChap...
Mark
On 31 Mar 2014, at 23:28, Jean-Philippe Steinmetz <caskater47(a)gmail.com>
wrote:
Hello,
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.
Here is my code...
KieServices kieServices = KieServices.Factory.get();
ReleaseId releaseId = kieServices.newReleaseId("com.mycompany",
"mymodule", "1.0-SNAPSHOT");
KieContainer kContainer = kieServices.newKieContainer(releaseId);
And here is the output I get...
[pool-1-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-3-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-5-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-7-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-9-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-11-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-13-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-15-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
[pool-17-thread-1] INFO
com.ning.http.client.providers.netty.NettyAsyncHttpProvider - Number of
application's worked threads is 16
Disconnected from the target VM, address: '127.0.0.1:51890', transport:
'socket'
Exception in thread "main" java.lang.NullPointerException
at
org.kie.scanner.KieRepositoryScannerImpl.addDependencies(KieRepositoryScannerImpl.java:128)
at
org.kie.scanner.KieRepositoryScannerImpl.buildArtifact(KieRepositoryScannerImpl.java:119)
at
org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:90)
at
org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:83)
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:84)
The module has the following dependencies listed in the pom.xml.
<dependencies>
<!-- Drools -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>${drools.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${drools.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
<version>${drools.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-persistence-jpa</artifactId>
<version>${drools.version}</version>
<scope>compile</scope>
</dependency>
<!-- Misc -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
I have tried searching for help on this but am unable to find anything
related. Any help here is appreciated.
Thanks!
Jean-Philippe Steinmetz
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users