<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Yes, this should work as the javabean spec allows it and both Drools
Expert and Planner support it:<br>
<br>
public boolean isFixed() {...}<br>
<br>
but IIRC a wrapper Boolean shouldn't:<br>
<br>
public Boolean isFixed() {...}<br>
<br>
<br>
Op 30-01-12 08:33, Michael Anstis schreef:
<blockquote
cite="mid:CAAG9P0tkaFfcWhDA4E8A1VZomMR+UoTyJL8d25ZyPqAiRSV7Fw@mail.gmail.com"
type="cite">
<p>Drools, and hence I assume Planner, *should* handle boolean
"is" accessor. Can you provide more details?</p>
<p>sent on the move</p>
<p>On 30 Jan 2012 07:05, "aitchnyu" <<a moz-do-not-send="true"
href="mailto:jesvinj@technovia.co.in">jesvinj@technovia.co.in</a>>
wrote:<br type="attribution">
</p>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have news for you!<br>
<br>
I had an obvious and (bad surprise) buggy mismatch.<br>
<br>
The obvious mismatch was: setBlockList and getBlocklist (small
'l' in the<br>
getter).<br>
<br>
The other mismatch was isFixed and setFixed. *Drools hates the
'is'* because<br>
(as I guessed) of it's introspector mechanism. It worked only
when I renamed<br>
it to getFixed. Your bugfix would have harmed instead of helped,
as it would<br>
have let that error pass silently.<br>
<br>
Please open an issue to address this.<br>
<br>
Wish I wasnt religious to name boolean getters with 'is'. I will
notify of<br>
further problems once the problem gets back on track.<br>
<br>
<br>
ge0ffrey wrote<br>
><br>
> Hi,<br>
><br>
> The NullPointerException should definitely not happen, you
should get a<br>
> decent error message describing what's wrong.<br>
> It's fixed in 5.4.0.Beta1.<br>
><br>
> It looks like you're running into:<br>
> <a moz-do-not-send="true"
href="https://issues.jboss.org/browse/JBRULES-3247"
target="_blank">https://issues.jboss.org/browse/JBRULES-3247</a><br>
> Upgrade to planner 5.4.0.Beta1<br>
> or add a getter for that setter.<br>
><br>
> Op 28-01-12 06:17, aitchnyu schreef:<br>
>> I tried to create a solver from XML configuration. But
the entire process<br>
>> returns a *cryptic error message *that makes no sense.<br>
>><br>
>> How do I fix this? And how can I make sense of this to
actually solve<br>
>> similar problems like this?<br>
>><br>
>> Please excuse me if I made any bad karma. This is my
first post on this<br>
>> (and<br>
>> any) mailing list.<br>
>><br>
>> jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java
App<br>
>> Exception in thread "main"
java.lang.NullPointerException<br>
>> at<br>
>>
org.drools.planner.core.domain.solution.SolutionDescriptor.processPropertyAnnotations(SolutionDescriptor.java:69)<br>
>> at<br>
>>
org.drools.planner.core.domain.solution.SolutionDescriptor.<init>(SolutionDescriptor.java:61)<br>
>> at<br>
>>
org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:197)<br>
>> at<br>
>>
org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:167)<br>
>> at<br>
>>
org.drools.planner.config.XmlSolverConfigurer.buildSolver(XmlSolverConfigurer.java:103)<br>
>> at App.createSolver(App.java:62)<br>
>> at App.main(App.java:40)<br>
>><br>
>> The function that throws it is listed here. The line is
of course `return<br>
>> configurer.buildSolver();`.<br>
>><br>
>> private static Solver createSolver(){<br>
>> XmlSolverConfigurer configurer = new
XmlSolverConfigurer();<br>
>> File file = new File("solver.xml");<br>
>> FileInputStream fin = null;<br>
>> try{<br>
>> fin = new FileInputStream(file);<br>
>> }<br>
>> catch(IOException e){<br>
>> System.out.println("Unable to read drl");<br>
>> }<br>
>> configurer.configure(fin);<br>
>><br>
>>
//configurer.configure("/home/jesvin/dev/drools/sudoku/solver.xml");<br>
>> return configurer.buildSolver();<br>
>> }<br>
>><br>
>> The content of the XML:<br>
>><br>
>> <?xml version="1.0" encoding="UTF-8"?><br>
>> <solver><br>
>>
<environmentMode>DEBUG</environmentMode><br>
>><br>
>>
<solutionClass>domain.Sudoku</solutionClass><br>
>>
<planningEntityClass>domain.Digit</planningEntityClass><br>
>> <scoreDrl>score.drl</scoreDrl><br>
>> <scoreDefinition><br>
>>
<scoreDefinitionType>SIMPLE</scoreDefinitionType><br>
>> </scoreDefinition><br>
>><br>
>> <termination><br>
>> <scoreAttained>0</scoreAttained><br>
>> </termination><br>
>><br>
>> <constructionHeuristic><br>
>>
<constructionHeuristicType>FIRST_FIT</constructionHeuristicType><br>
>><br>
>><br>
>>
<moveFactoryClass>solution.RowChangeMoveFactory</moveFactoryClass><br>
>> </selector><br>
>> <acceptor><br>
>>
<completeSolutionTabuSize>1000</completeSolutionTabuSize><br>
>> </acceptor><br>
>> <forager><br>
>><br>
>> </forager><br>
>> </localSearch><br>
>> </solver><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a moz-do-not-send="true"
href="http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html"
target="_blank">http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html</a><br>
>> Sent from the Drools: User forum mailing list archive
at Nabble.com.<br>
>> _______________________________________________<br>
>> rules-users mailing list<br>
>> <a class="moz-txt-link-abbreviated" href="mailto:rules-users@.jboss">rules-users@.jboss</a><br>
>> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>><br>
><br>
> --<br>
> With kind regards,<br>
> Geoffrey De Smet<br>
><br>
><br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:rules-users@.jboss">rules-users@.jboss</a><br>
> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
<br>
<br>
--<br>
View this message in context: <a moz-do-not-send="true"
href="http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3699291.html"
target="_blank">http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3699291.html</a><br>
Sent from the Drools: User forum mailing list archive at
Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
With kind regards,
Geoffrey De Smet</pre>
</body>
</html>