First of all I am referring to this question (LINK) which did not help me because then versions of frameworks were lower so I am starting new question.
So I am using Grails 2.4.3 framework and trying to use Drools rule engine inside it. Java version is 1.0.8_20 and groovy version is 2.3.9. Dependencies in BuildConfig are:
runtime 'org.drools:drools-core:5.5.0.Final'
runtime 'org.drools:knowledge-api:5.5.0.Final'
In this line of code :
KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder()
I get this exception:
Error initializing the application: com/sun/tools/xjc/Options
Caused by ClassNotFoundException: com.sun.tools.xjc.Options
I've tried to change versions of drools-core/knowledge-api to higher (up to 6.0.1.Final) but keep getting the same error. I've also tried to import this strange xjc dependencies as mentioned in post that I was referring in the beginning but with no success.
Does anyone knows what is the solution to this problem?
Btw full stack trace is :
| Error 2014-12-19 18:04:49,851 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing Grails: com/sun/tools/xjc/Options
Message: com/sun/tools/xjc/Options
Line | Method
->> 2688 | privateGetDeclaredMethods in java.lang.Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1962 | getDeclaredMethods in ''
| 46 | getLocked . . . . . . . . . . . in org.codehaus.groovy.util.LazyReference
| 33 | get in ''
| 46 | doCall . . . . . . . . . . . . . in account.manager.rule.knowledge.Knowledge$_initialize_closure1
| 43 | initialize in account.manager.rule.knowledge.Knowledge
| 39 | $tt__initialize . . . . . . . . in account.manager.RuleSyncService
| 24 | doCall in BootStrap$_closure1
| 327 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 320 | executeForEnvironment in ''
| 296 | executeForCurrentEnvironment . . in ''
| 266 | run in java.util.concurrent.FutureTask
| 1142 | runWorker . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 617 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . . . . . . . . . in java.lang.Thread
Caused by ClassNotFoundException: com.sun.tools.xjc.Options