Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@baldimir
Created August 22, 2019 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baldimir/e0f1aa27d194b750148f779370d13560 to your computer and use it in GitHub Desktop.
Save baldimir/e0f1aa27d194b750148f779370d13560 to your computer and use it in GitHub Desktop.
java.lang.AssertionError: [Message [id=1, level=ERROR, path=src/main/java/defaultpkg/RulesE1CF84BD82473987CAB7497AB34B5E36RuleMethods0.java, line=26, column=81
text=method alphaIndexedBy in class org.drools.model.PatternDSL cannot be applied to given types;
required: java.lang.Class<U>,org.drools.model.Index.ConstraintType,int,org.drools.model.functions.Function1<T,U>,U
found: java.lang.Class<java.lang.Boolean>,org.drools.model.Index.ConstraintType,int,(_this)->_[...]yed(),java.lang.String
reason: inference variable U has incompatible bounds
equality constraints: java.lang.Boolean
lower bounds: java.lang.String], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/RulesE1CF84BD82473987CAB7497AB34B5E36RuleMethods0.java, line=0, column=0
text=Java source of src/main/java/defaultpkg/RulesE1CF84BD82473987CAB7497AB34B5E36RuleMethods0.java in error:
package defaultpkg;
import java.util.*;
import org.drools.model.*;
import org.drools.modelcompiler.dsl.pattern.D;
import org.drools.model.Index.ConstraintType;
import java.time.*;
import java.time.format.*;
import java.text.*;
import org.drools.core.util.*;
import org.drools.modelcompiler.domain.Person;
import org.drools.modelcompiler.domain.Result;
import static defaultpkg.RulesE1CF84BD82473987CAB7497AB34B5E36.*;
public class RulesE1CF84BD82473987CAB7497AB34B5E36RuleMethods0 {
/**
* Rule name: R1
*/
public static org.drools.model.Rule rule_R1() {
final org.drools.model.Variable<org.drools.modelcompiler.domain.Person> var_$p = D.declarationOf(org.drools.modelcompiler.domain.Person.class,
"$p");
org.drools.model.Rule rule = D.rule("R1").build(D.pattern(var_$p).expr("57D5E3D259B967E7111347D6E11D86F8",
(_this) -> org.drools.modelcompiler.util.EvaluationUtil.areNullSafeEquals(_this.getEmployed(),
"true"),
D.alphaIndexedBy(java.lang.Boolean.class,
org.drools.model.Index.ConstraintType.EQUAL,
0,
_this -> _this.getEmployed(),
"true"),
D.reactOn("employed")),
D.execute(() -> {
}));
return rule;
}
}
]]
at org.junit.Assert.fail(Assert.java:88)
at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:152)
at org.drools.modelcompiler.BaseModelTest.createKieBuilder(BaseModelTest.java:125)
at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:114)
at org.drools.modelcompiler.BaseModelTest.getKieContainer(BaseModelTest.java:107)
at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:103)
at org.drools.modelcompiler.BaseModelTest.getKieSession(BaseModelTest.java:99)
at org.drools.modelcompiler.CompilerTest.testBooleanCoercion(CompilerTest.java:1978)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment