Kunal Kishan created DROOLS-2287:
------------------------------------
Summary: Creating KIE Container with Externally Location Drool Files
Key: DROOLS-2287
URL:
https://issues.jboss.org/browse/DROOLS-2287
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.5.0.Final
Reporter: Kunal Kishan
Assignee: Mario Fusco
Fix For: 7.5.0.Final
When Creating Container getting the Following Issue
@Bean(name = "kieContainer")
public KieContainer kieContainer(@Qualifier("rulesProvider") RulesProvider
rulesProvider) {
KieContainer kieContainer = null;
try {
KieServices kieServices = KieServices.Factory.get();
KieFileSystem kFileSystem = kieServices.newKieFileSystem();
Resource resource =
kieServices.getResources().newFileSystemResource(rulesProvider.getRuleFile())
.setResourceType(ResourceType.DRL);
kFileSystem.write(resource);
KieBuilder kbuilder = kieServices.newKieBuilder(kFileSystem);
kbuilder.buildAll();
if
(kbuilder.getResults().hasMessages(org.kie.api.builder.Message.Level.ERROR)) {
throw new RuntimeException("Build time Errors: " +
kbuilder.getResults().toString());
}
kieContainer =
kieServices.newKieContainer(kbuilder.getKieModule().getReleaseId());
**********
Causes failure @ * kbuilder.buildAll();*
Caused by: java.lang.NoSuchMethodError:
org/codehaus/plexus/DefaultPlexusContainer.<init>(Lorg/codehaus/plexus/ContainerConfiguration;)V
(loaded from
file:/C:/.m2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar
by java.net.URLClassLoader@ec8dd793) called from class
org.appformer.maven.integration.embedder.MavenEmbedderUtils (loaded from
file:/C:/.m2/org/kie/soup/kie-soup-maven-integration/7.5.0.Final/kie-soup-maven-integration-7.5.0.Final.jar
by java.net.URLClassLoader@ec8dd793).
at
org.appformer.maven.integration.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:167)
at
org.appformer.maven.integration.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:141)
at
org.appformer.maven.integration.embedder.PlexusComponentProvider.<init>(PlexusComponentProvider.java:37)
at
org.appformer.maven.integration.embedder.MavenEmbedderUtils.buildComponentProvider(MavenEmbedderUtils.java:57)
at
org.appformer.maven.integration.embedder.MavenEmbedder.<init>(MavenEmbedder.java:87)
at
org.appformer.maven.integration.embedder.MavenEmbedder.<init>(MavenEmbedder.java:81)
at
org.appformer.maven.integration.embedder.MavenProjectLoader.newMavenEmbedder(MavenProjectLoader.java:77)
at
org.appformer.maven.integration.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:61)
at
org.appformer.maven.integration.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:55)
at
org.appformer.maven.integration.MavenPomModelGenerator.parse(MavenPomModelGenerator.java:34)
at org.appformer.maven.support.PomModel$Parser.parse(PomModel.java:110)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildPomModel(KieBuilderImpl.java:684)
at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.getPomModel(KieBuilderImpl.java:661)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.init(KieBuilderImpl.java:282)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:330)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:317)
at
com.citizens.client.droolsengine.config.DroolEngineConfig.kieContainer(DroolEngineConfig.java:42)
at
com.citizens.client.droolsengine.config.DroolEngineConfig$$EnhancerBySpringCGLIB$$12222c38.CGLIB$kieContainer$0(<generated>)
at
com.citizens.client.droolsengine.config.DroolEngineConfig$$EnhancerBySpringCGLIB$$12222c38$$FastClassBySpringCGLIB$$3d6004b0.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
at
com.citizens.client.droolsengine.config.DroolEngineConfig$$EnhancerBySpringCGLIB$$12222c38.kieContainer(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 52 more
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)