-
Bug
-
Resolution: Done
-
Major
-
6.0.0.Final
-
None
solver.solve() throws an exception when configured with a KieBase that was built using calls to KieFileSystem.write(String path, String content) where path contains the \ character.
Exception in thread "main" java.lang.RuntimeException: Unexpected global [scoreHolder]
at org.drools.core.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java:515)
at org.drools.core.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulKnowledgeSessionImpl.java:360)
at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.resetKieSession(DroolsScoreDirector.java:83)
at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.setWorkingSolution(DroolsScoreDirector.java:74)
at org.optaplanner.core.impl.solver.scope.DefaultSolverScope.setWorkingSolutionFromBestSolution(DefaultSolverScope.java:176)
at org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:176)
at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:154)
The same issue may be experienced with any of the versions of write that take a "path" parameter but I haven't tried them myself.
No error or exception is produced by the call to KieFileSystem.write(...) itself.
When a KieBuilder.buildAll() is called a warning is logged:
[o.d.compiler.kie.builder.impl.AbstractKieModule ] No files found for KieBase defaultKieBase
Other than this log entry there is no indication of a problem until the exception is thrown when calling solver.solve()