我正在使用 kie-maven-plugin 将所有规则编译为 KJAR。
运行maven命令mvn clean install -DgenerateModel=YES后,出现一些编译器错误,如下所示:
[WARNING] ClassNotFoundException occured!
java.lang.ClassNotFoundException: Unable to find class 'com.rules.engine.service.RuleValidationErrorServiceImpl'
和
Error importing : 'com.model.rules.CodeRule'
Rule Compilation error : [Rule name='1.1.a']
com/rule2/Rule_1$u46$1$u46$a2059806722.java (2:38) : Only a type can be imported. com.model.rules.CodeRule resolves to a package
com/rule2/Rule_1$u46$1$u46$a2059806722.java (7:417) : $responseCodeRule cannot be resolved
com/rule2/Rule_1$u46$1$u46$a2059806722.java (7:444) : ruleValidationErrorService cannot be resolved
com/rule2/Rule_1$u46$1$u46$a2059806722.java (8:487) : $responseCodeRule cannot be resolved
但奇怪的是,即使存在这些编译错误,构建仍然成功。创建了一个 jar,将所有这些规则编译成类。
我查了很多资料,还是没明白。任何可能有此类经验的人请帮助我解决这些编译错误。超级感谢!
您能够识别或解决这个问题吗?
这看起来肯定是可执行模型编译器编译中的错误,您可以检查一下KJAR中是否生成了Rule_1$u46$1$u46$a2059806722.java的.class文件吗?
您也可以使用
jar tf kiejarname.jar
查看文件
同时,您能为我们提供这些规则的复制器吗?
非常感谢