Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
string index out of range
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at org.drools.core.rule.constraint.MvelConstraint.getLeftInExpression(MvelConstraint.java:608)
at org.drools.core.rule.constraint.MvelConstraint.hashCode(MvelConstraint.java:602)
at org.drools.core.reteoo.AlphaNode.calculateHashCode(AlphaNode.java:189)
at org.drools.core.reteoo.AlphaNode.<init>(AlphaNode.java:89)
at org.drools.core.reteoo.builder.PhreakNodeFactory.buildAlphaNode(PhreakNodeFactory.java:88)
at org.drools.core.reteoo.builder.PatternBuilder.buildAlphaNodeChain(PatternBuilder.java:360)
at org.drools.core.reteoo.builder.PatternBuilder.attachAlphaNodes(PatternBuilder.java:346)
at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:136)
at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:84)
at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:220)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:220)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:167)
at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:139)
at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
at org.drools.core.impl.KnowledgeBaseImpl.internalAddRule(KnowledgeBaseImpl.java:1525)
at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:926)
at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:728)
at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:745)
at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:728)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.createKieBase(AbstractKieModule.java:226)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:407)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:375)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:356)
at org.kie.internal.utils.KieHelper.build(KieHelper.java:73)
at org.drools.benchmarks.turtle.buildtime.AbstractBuildtimeBenchmark.actuallyCreateTheKBase(AbstractBuildtimeBenchmark.java:74)
at org.drools.benchmarks.turtle.buildtime.KBaseCreationFromDrlBenchmark.timeKBaseCreationFromDrl(KBaseCreationFromDrlBenchmark.java:40)
at org.drools.benchmarks.turtle.buildtime.generated.KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.timeKBaseCreationFromDrl_avgt_jmhStub(KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.java:186)
at org.drools.benchmarks.turtle.buildtime.generated.KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.timeKBaseCreationFromDrl_AverageTime(KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.java:150)
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.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:453)
at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:437)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Benchmark had encountered error, and fail on error was requested
ERROR: org.openjdk.jmh.runner.RunnerException: Benchmark caught the exception
at org.openjdk.jmh.runner.Runner.runBenchmarks(Runner.java:578)
at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:320)
at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
at org.openjdk.jmh.Main.main(Main.java:71)
Caused by: org.openjdk.jmh.runner.BenchmarkException: Benchmark error during the run
at org.openjdk.jmh.runner.BenchmarkHandler.runIteration(BenchmarkHandler.java:428)
at org.openjdk.jmh.runner.BaseRunner.runBenchmark(BaseRunner.java:262)
at org.openjdk.jmh.runner.BaseRunner.runBenchmark(BaseRunner.java:234)
at org.openjdk.jmh.runner.BaseRunner.doSingle(BaseRunner.java:139)
at org.openjdk.jmh.runner.BaseRunner.runBenchmarksForked(BaseRunner.java:76)
at org.openjdk.jmh.runner.ForkedRunner.run(ForkedRunner.java:72)
at org.openjdk.jmh.runner.ForkedMain.main(ForkedMain.java:84)
Suppressed: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at org.drools.core.rule.constraint.MvelConstraint.getLeftInExpression(MvelConstraint.java:608)
at org.drools.core.rule.constraint.MvelConstraint.hashCode(MvelConstraint.java:602)
at org.drools.core.reteoo.AlphaNode.calculateHashCode(AlphaNode.java:189)
at org.drools.core.reteoo.AlphaNode.<init>(AlphaNode.java:89)
at org.drools.core.reteoo.builder.PhreakNodeFactory.buildAlphaNode(PhreakNodeFactory.java:88)
at org.drools.core.reteoo.builder.PatternBuilder.buildAlphaNodeChain(PatternBuilder.java:360)
at org.drools.core.reteoo.builder.PatternBuilder.attachAlphaNodes(PatternBuilder.java:346)
at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:136)
at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:84)
at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:220)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:220)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108)
at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:167)
at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:139)
at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
at org.drools.core.impl.KnowledgeBaseImpl.internalAddRule(KnowledgeBaseImpl.java:1525)
at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:926)
at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:728)
at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:745)
at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:728)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.createKieBase(AbstractKieModule.java:226)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:407)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:375)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:356)
at org.kie.internal.utils.KieHelper.build(KieHelper.java:73)
at org.drools.benchmarks.turtle.buildtime.AbstractBuildtimeBenchmark.actuallyCreateTheKBase(AbstractBuildtimeBenchmark.java:74)
at org.drools.benchmarks.turtle.buildtime.KBaseCreationFromDrlBenchmark.timeKBaseCreationFromDrl(KBaseCreationFromDrlBenchmark.java:40)
at org.drools.benchmarks.turtle.buildtime.generated.KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.timeKBaseCreationFromDrl_avgt_jmhStub(KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.java:186)
at org.drools.benchmarks.turtle.buildtime.generated.KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.timeKBaseCreationFromDrl_AverageTime(KBaseCreationFromDrlBenchmark_timeKBaseCreationFromDrl_jmhTest.java:150)
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.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:453)
at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:437)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[drosa@localhost kie-benchmarks]$ java -jar ./drools-benchmarks/target/drools-benchmarks.jar -jvmArgs "-Xms6144m -Xmx6144m" -foe true -rf csv -rff results.csv org.drools.benchmarks.turtle.buildtime.KBaseCreationFromDrlBenchmark.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.