Cannot find KieModule kie scanner

984 views
Skip to first unread message

superseed77

unread,
Apr 23, 2015, 12:41:44 PM4/23/15
to drools...@googlegroups.com
Hi all

I've setted-up a scanner, but it can't find the source
The source are in my local repo ~/.m2/repository

Question Where does it look ?
How to know where is looking for ?
How to force it to look in local repo ?

my pom
   <groupId>org.test</groupId>
  <artifactId>test-spring-kie</artifactId>
  <version>0.1.0-SNAPSHOT</version>


the trace
Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: org.test:test-spring-kie:0.1.0-SNAPSHOT
    at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97)
    at org.kie.spring.factorybeans.KieImportFactoryBean.setKContainer(KieImportFactoryBean.java:115)
    at org.kie.spring.factorybeans.KieImportFactoryBean.postProcessBeanFactory(KieImportFactoryBean.java:106)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:177)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:124)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:658)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:355)
    at hello.Application.main(Application.java:20)


Any clue ?
Thanks

Mario Fusco

unread,
Apr 24, 2015, 3:17:24 AM4/24/15
to drools...@googlegroups.com
Hi,

by default it behaves exactly as a plain maven so it uses the settings.xml file in your home folder, but you can pass a different file via system property if you want to use a different setting.
This maven integration part is implemented in the kie-ci module. Did you add it to your pom?

Cheers,
Mario

--
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/af990859-06ff-4b97-883d-f1d056e95c23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

superseed77

unread,
Apr 24, 2015, 5:41:32 AM4/24/15
to drools...@googlegroups.com
Thanks for the answer,

I've added this in my pom
<dependency>
    <groupId>org.kie</groupId>
    <artifactId>kie-ci</artifactId>
    <version>6.2.0.Final</version>
</dependency>

But still an error
I've put a break point on KieServicesImpl newKieContainer()
But can't figure out where does it look for
Which class hold the repository location ?


[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project test-spring-kie: An exception occured while executing the Java class. null: InvocationTargetException: Cannot find KieModule: org.test:test-spring-kie:0.1.0-SNAPSHOT -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project test-spring-kie: An exception occured while executing the Java class. null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. null
    at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:352)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Cannot find KieModule: org.kie:test-spring-kie:0.1.0-SNAPSHOT

    at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:97)
    at org.kie.spring.factorybeans.KieImportFactoryBean.setKContainer(KieImportFactoryBean.java:115)
    at org.kie.spring.factorybeans.KieImportFactoryBean.postProcessBeanFactory(KieImportFactoryBean.java:106)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:177)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:124)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:658)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:355)
    at hello.Application.main(Application.java:20)
    ... 6 more

superseed77 .

unread,
Apr 25, 2015, 9:27:30 AM4/25/15
to drools...@googlegroups.com
It looks for
org.test:test-spring-kie:pom:0.1.8-SNAPSHOT
instead of
org.test:test-spring-kie:0.1.8-SNAPSHOT

org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.test:test-spring-kie:pom:0.1.8-SNAPSHOT in local (file:///home/superseed77/.m2/repository)


From where the extra :POM: comes from ?

How can I get rid of it ?

Thanks


--
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/lI9cbj3E97M/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.

Parveen Beniwal

unread,
Dec 9, 2016, 4:49:16 AM12/9/16
to Drools Usage
Hi,

I had the similar issue and adding kie-ci solved the problem. Thanks. 
Reply all
Reply to author
Forward
0 new messages