[rules-users] Optaplanner: Unexpected global [scoreHolder] - Kie API trouble

Geoffrey De Smet ge0ffrey.spam at gmail.com
Thu May 16 03:02:56 EDT 2013


I presume you're building your own KieBase and setting it with 
setKieBase() ?

If so, that KieBase is empty or corrupted or something, but it doesn't 
fail-fast either apparently.
Look at this code for inspiration (that's where I ran into it too):
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-core/src/main/java/org/optaplanner/core/config/score/director/ScoreDirectorFactoryConfig.java#L299

Please let us know what exactly the problem was here on the mailing list.
I want to create a jira for DROOLS to fail-fast during KieBase 
construction when a misconfiguration happens.

On 15-05-13 16:18, jonathan.labin wrote:
> I am using Optaplanner 6.0.0-Beta2 and I am in some cases receiving the
> following error during initial solution construction:
>
> 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)
>
> I noticed this error in gist:
> https://gist.github.com/ge0ffrey/5236604
>
> If this is the same error, what are the current constraints that I need
> adhere to in order to avoid this error?
>
> Jon
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-Unexpected-global-scoreHolder-tp4023837.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list