Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Drools Spreadsheet compile issue #16

Open
Mhretaab opened this issue Nov 1, 2023 · 0 comments
Open

Drools Spreadsheet compile issue #16

Mhretaab opened this issue Nov 1, 2023 · 0 comments

Comments

@Mhretaab
Copy link

Mhretaab commented Nov 1, 2023

This week I have been experimenting with drools quarkus extension. I created the rules using spreadsheet. The spreadsheet extension is .drl.xlsx.

But when I run my project, I am having the following error.

2023-11-01 22:26:42,524 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step org.drools.drl.quarkus.deployment.DroolsAssetsProcessor#generateSources threw an exception: org.drools.model.codegen.project.RuleCodegenError: Errors were generated during the code-generation process:
InvalidExpressionErrorResult: Unable to parse consequence caused by: (line 2,col 46) Parse error. Found "}", expected one of "%=" "&=" "*=" "++" "+=" "--" "-=" "/=" ";" "<<=" "=" ">>=" ">>>=" "^=" "|="
Problem stacktrace :
com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:14041)
com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:13886)
com.github.javaparser.GeneratedJavaParser.StatementExpression(GeneratedJavaParser.java:6181)
com.github.javaparser.GeneratedJavaParser.Statement(GeneratedJavaParser.java:5679)
com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:5933)
com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:2795)
com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:5810)
com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:8338)
com.github.javaparser.JavaParser.parse(JavaParser.java:125)
com.github.javaparser.JavaParser.parseBlock(JavaParser.java:317)
org.drools.model.codegen.execmodel.generator.DrlxParseUtil.parseBlock(DrlxParseUtil.java:499)
org.drools.model.codegen.execmodel.generator.Consequence.rewriteConsequence(Consequence.java:228)
org.drools.model.codegen.execmodel.generator.Consequence.createCall(Consequence.java:142)
org.drools.model.codegen.execmodel.generator.ModelGenerator.processRule(ModelGenerator.java:272)
org.drools.model.codegen.execmodel.generator.ModelGenerator.processRuleDescr(ModelGenerator.java:215)
org.drools.model.codegen.execmodel.generator.ModelGenerator.lambda$processRules$0(ModelGenerator.java:196)
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

I manually compile the spreadsheet using SpreadsheetCompiler and I don't see any syntax error or the supposed error symbol } on the generated drl. Ironically, old spreadsheets are getting compiled correctly.

ShippingDeliver.drl.xlsx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant