6.4.final KieScanner throws Errors

845 views
Skip to first unread message

Webster Homer

unread,
May 9, 2016, 10:57:53 AM5/9/16
to Drools Usage
Trying to upgrade from 6.1Final Drools. I have a number of issues
We use Wildfly 8.2 as our Application server and everything is built with Java 8
If my code calls the KieScanner I get this error:
09:47:31,748 WARN  [org.jboss.modules] (default task-1) Failed to define class org.eclipse.sisu.inject.DefaultRankingFunction$ServletVisitor in Module "deployment.SearchContent.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/eclipse/sisu/inject/DefaultRankingFunction$ServletVisitor (Module "deployment.SearchContent.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.3.Final]
Caused by: java.lang.NoClassDefFoundError: com/google/inject/servlet/ServletModuleTargetVisitor
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.8.0_51]
at java.lang.ClassLoader.defineClass(ClassLoader.java:760) [rt.jar:1.8.0_51]
Caused by: java.lang.ClassNotFoundException: com.google.inject.servlet.ServletModuleTargetVisitor from [Module "deployment.SearchContent.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

Then tons of warnings
09:47:36,310 WARN  [org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer] (default task-1) Unknown repository update policy '', assuming 'never'
09:47:36,311 WARN  [org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer] (default task-1) Unknown repository update policy '', assuming 'never'
09:47:36,318 WARN  [org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer] (default task-1) Unknown repository update policy '', assuming 'never'

And finally the rules themselves don't compile:
Rule Compilation error : [Rule name='Search configuration set default q.op']
com/sial/rules/search/Rule_Search_configuration_set_default_q$u46$op123531600.java (2:1061) : Syntax error, static imports are only available if source level is 1.5 or greater
com/sial/rules/search/Rule_Search_configuration_set_default_q$u46$op123531600.java (2:1075) : The import com.sial.rules.search.SetupSolrQuery.setupSolrQuery cannot be resolved
com/sial/rules/search/Rule_Search_configuration_set_default_q$u46$op123531600.java (2:1127) : Syntax error, static imports are only available if source level is 1.5 or greater

They DID compile when the Kjar was created and unit tests were run. Looks like 6.4 is a bit buggy. All our code worked with 6.1 but nothing works with 6.4

Webster Homer

unread,
May 9, 2016, 1:54:09 PM5/9/16
to Drools Usage
I found that adding the following dependency to my project fixed the LinkageError exceptions 
       <dependency>
          <groupId>com.google.inject.extensions</groupId>
          <artifactId>guice-servlet</artifactId>
          <version>3.0</version>
     </dependency>
 
However I still see the repository warning and the rules compilation errors

Webster Homer

unread,
May 9, 2016, 2:36:53 PM5/9/16
to Drools Usage
Made the repository warning go away by making certain that each repository in the settings.xml file had update policy explicitly set. The file works with our builds, and came directly from an admin. Drools 6.1.0-Final was happy with it, but something in the 6.4 maven was not happy.

I don't understand the Rule compile errors when loading the Knowledge base at runtime. It looks like it thinks that the version of Java is Java 4.


On Monday, May 9, 2016 at 9:57:53 AM UTC-5, Webster Homer wrote:

Kunal Ransing

unread,
Jun 6, 2016, 6:02:52 AM6/6/16
to Drools Usage
Hi,

Using kie drool 6.4 with wildfly 10. Getting same warning like below. Have you solved it ?

Kunal Ransing

unread,
Dec 5, 2016, 8:33:28 AM12/5/16
to Drools Usage
Hi,

Solved problem by adding below :


         <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-servlet</artifactId>
            <version>4.1.0</version>
        </dependency>
Reply all
Reply to author
Forward
0 new messages