Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在drools规则和mule中使用Java方言_Java_Spring_Mule_Drools - Fatal编程技术网

在drools规则和mule中使用Java方言

在drools规则和mule中使用Java方言,java,spring,mule,drools,Java,Spring,Mule,Drools,我正在尝试使用mule4.1.1和drools7.29.0开发一个应用程序。问题是,只有当我将方言声明为“mvel”时,规则才会编译。如果尝试使用java方言运行规则,则会出现以下错误: Rule Compilation error : [Rule name='test-rule'] rules/Rule_test$u45$rule1817291490.java (1:0) : The type java.lang.Object cannot be resolved. It is ind

我正在尝试使用
mule4.1.1
drools7.29.0
开发一个应用程序。问题是,只有当我将方言声明为“
mvel
”时,规则才会编译。如果尝试使用java方言运行规则,则会出现以下错误:

Rule Compilation error : [Rule name='test-rule']
    rules/Rule_test$u45$rule1817291490.java (1:0) : The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
    rules/Rule_test$u45$rule1817291490.java (1:0) : The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
    rules/Rule_test$u45$rule1817291490.java (2:30) : Only a type can be imported. com.mycompany.model.Type resolves to a package
    rules/Rule_test$u45$rule1817291490.java (2:68) : Only a type can be imported. java.time.LocalDateTime resolves to a package
    rules/Rule_test$u45$rule1817291490.java (2:99) : Only a type can be imported. com.mycompany.model.Sequence resolves to a package
    rules/Rule_test$u45$rule1817291490.java (2:164) : Only a type can be imported. java.time.Instant resolves to a package
    rules/Rule_test$u45$rule1817291490.java (2:189) : Only a type can be imported. java.time.ZoneId resolves to a package
    rules/Rule_test$u45$rule1817291490.java (2:213) : Only a type can be imported. org.drools.core.spi.KnowledgeHelper resolves to a package
    rules/Rule_test$u45$rule1817291490.java (3:263) : Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor
    rules/Rule_test$u45$rule1817291490.java (6:388) : KnowledgeHelper cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (6:413) : com.mycompany.model.Sequence cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (6:457) : org.kie.api.runtime.rule.FactHandle cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (6:513) : com.mycompany.model.Sequence cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (6:558) : org.kie.api.runtime.rule.FactHandle cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (6:624) : java.lang.Exception cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (6:646) : org.kie.api.runtime.rule.RuleContext cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (7:706) : LocalDateTime cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (8:788) : LocalDateTime cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (9:868) : LocalDateTime cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (10:998) : LocalDateTime cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (11:1126) : LocalDateTime cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (12:1211) : System.out cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (13:1274) : System.out cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (14:1336) : System.out cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (15:1396) : System.out cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (18:1545) : System.out cannot be resolved to a type
    rules/Rule_test$u45$rule1817291490.java (20:1634) : System.out cannot be resolved to a type

有人知道哪一个可能是问题吗?

在问题中添加代码片段添加测试规则代码请说明如何从Mule应用程序调用Drools。它是否使用Java模块?或者使用自定义模块?在问题中添加代码片段添加测试规则代码请显示如何从Mule应用程序调用Drools。它是否使用Java模块?还是使用自定义模块?