Re: [rules-users] Planner has trouble creating a configurer: how to debug

2012-01-30 Thread Geoffrey De Smet
Yes, this should work as the javabean spec allows it and both Drools 
Expert and Planner support it:


  public boolean isFixed() {...}

but IIRC a wrapper Boolean shouldn't:

   public Boolean isFixed() {...}


Op 30-01-12 08:33, Michael Anstis schreef:


Drools, and hence I assume Planner, *should* handle boolean "is" 
accessor. Can you provide more details?


sent on the move

On 30 Jan 2012 07:05, "aitchnyu" > wrote:


I have news for you!

I had an obvious and (bad surprise) buggy mismatch.

The obvious mismatch was: setBlockList and getBlocklist (small 'l'
in the
getter).

The other mismatch was isFixed and setFixed. *Drools hates the
'is'* because
(as I guessed) of it's introspector mechanism. It worked only when
I renamed
it to getFixed. Your bugfix would have harmed instead of helped,
as it would
have let that error pass silently.

Please open an issue to address this.

Wish I wasnt religious to name boolean getters with 'is'. I will
notify of
further problems once the problem gets back on track.


ge0ffrey wrote
>
> Hi,
>
> The NullPointerException should definitely not happen, you
should get a
> decent error message describing what's wrong.
> It's fixed in 5.4.0.Beta1.
>
> It looks like you're running into:
> https://issues.jboss.org/browse/JBRULES-3247
> Upgrade to planner 5.4.0.Beta1
> or add a getter for that setter.
>
> Op 28-01-12 06:17, aitchnyu schreef:
>> I tried to create a solver from XML configuration. But the
entire process
>> returns a *cryptic error message *that makes no sense.
>>
>> How do I fix this? And how can I make sense of this to actually
solve
>> similar problems like this?
>>
>> Please excuse me if I made any bad karma. This is my first post
on this
>> (and
>> any) mailing list.
>>
>>  jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java App
>>  Exception in thread "main" java.lang.NullPointerException
>>  at
>>

org.drools.planner.core.domain.solution.SolutionDescriptor.processPropertyAnnotations(SolutionDescriptor.java:69)
>>  at
>>

org.drools.planner.core.domain.solution.SolutionDescriptor.(SolutionDescriptor.java:61)
>>  at
>>

org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:197)
>>  at
>>

org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:167)
>>  at
>>

org.drools.planner.config.XmlSolverConfigurer.buildSolver(XmlSolverConfigurer.java:103)
>>  at App.createSolver(App.java:62)
>>  at App.main(App.java:40)
>>
>> The function that throws it is listed here. The line is of
course `return
>> configurer.buildSolver();`.
>>
>>  private static Solver createSolver(){
>>  XmlSolverConfigurer configurer = new XmlSolverConfigurer();
>>  File file = new File("solver.xml");
>>  FileInputStream fin = null;
>>  try{
>>  fin = new FileInputStream(file);
>>  }
>>  catch(IOException e){
>>   System.out.println("Unable to read drl");
>>  }
>>  configurer.configure(fin);
>>
>>
//configurer.configure("/home/jesvin/dev/drools/sudoku/solver.xml");
>>  return configurer.buildSolver();
>>  }
>>
>> The content of the XML:
>>
>> 
>> 
>> DEBUG
>>
>> domain.Sudoku
>> domain.Digit
>> score.drl
>> 
>> SIMPLE
>> 
>>
>> 
>> 0
>> 
>>
>> 
>> FIRST_FIT
>>
>>
>> solution.RowChangeMoveFactory
>> 
>> 
>> 1000
>> 
>> 
>>
>> 
>> 
>> 
>>
>> --
>> View this message in context:
>>

http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html
>> Sent from the Drools: User forum mailing list archive at
Nabble.com.
>> ___
>> rules-users mailing list
>> rules-users@.jboss
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
> --
> With kind regards,
> Geoffrey De Smet
>
>
> ___
> rules-users mailing list
> rules-users@.jboss
> https://lists.jboss.org/mailman/listinfo/rules-users
>


--
View this message in context:

http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3699291.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org 
https://lists.jbo

Re: [rules-users] Planner has trouble creating a configurer: how to debug

2012-01-29 Thread Michael Anstis
Drools, and hence I assume Planner, *should* handle boolean "is" accessor.
Can you provide more details?

sent on the move

On 30 Jan 2012 07:05, "aitchnyu"  wrote:

> I have news for you!
>
> I had an obvious and (bad surprise) buggy mismatch.
>
> The obvious mismatch was: setBlockList and getBlocklist (small 'l' in the
> getter).
>
> The other mismatch was isFixed and setFixed. *Drools hates the 'is'*
> because
> (as I guessed) of it's introspector mechanism. It worked only when I
> renamed
> it to getFixed. Your bugfix would have harmed instead of helped, as it
> would
> have let that error pass silently.
>
> Please open an issue to address this.
>
> Wish I wasnt religious to name boolean getters with 'is'. I will notify of
> further problems once the problem gets back on track.
>
>
> ge0ffrey wrote
> >
> > Hi,
> >
> > The NullPointerException should definitely not happen, you should get a
> > decent error message describing what's wrong.
> > It's fixed in 5.4.0.Beta1.
> >
> > It looks like you're running into:
> >https://issues.jboss.org/browse/JBRULES-3247
> > Upgrade to planner 5.4.0.Beta1
> > or add a getter for that setter.
> >
> > Op 28-01-12 06:17, aitchnyu schreef:
> >> I tried to create a solver from XML configuration. But the entire
> process
> >> returns a *cryptic error message *that makes no sense.
> >>
> >> How do I fix this? And how can I make sense of this to actually solve
> >> similar problems like this?
> >>
> >> Please excuse me if I made any bad karma. This is my first post on this
> >> (and
> >> any) mailing list.
> >>
> >>  jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java App
> >>  Exception in thread "main" java.lang.NullPointerException
> >>  at
> >>
> org.drools.planner.core.domain.solution.SolutionDescriptor.processPropertyAnnotations(SolutionDescriptor.java:69)
> >>  at
> >>
> org.drools.planner.core.domain.solution.SolutionDescriptor.(SolutionDescriptor.java:61)
> >>  at
> >>
> org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:197)
> >>  at
> >>
> org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:167)
> >>  at
> >>
> org.drools.planner.config.XmlSolverConfigurer.buildSolver(XmlSolverConfigurer.java:103)
> >>  at App.createSolver(App.java:62)
> >>  at App.main(App.java:40)
> >>
> >> The function that throws it is listed here. The line is of course
> `return
> >> configurer.buildSolver();`.
> >>
> >>  private static Solver createSolver(){
> >>  XmlSolverConfigurer configurer = new XmlSolverConfigurer();
> >>  File file = new File("solver.xml");
> >>  FileInputStream fin = null;
> >>  try{
> >>  fin = new FileInputStream(file);
> >>  }
> >>  catch(IOException e){
> >>   System.out.println("Unable to read drl");
> >>  }
> >>  configurer.configure(fin);
> >>
> >> //configurer.configure("/home/jesvin/dev/drools/sudoku/solver.xml");
> >>  return configurer.buildSolver();
> >>  }
> >>
> >> The content of the XML:
> >>
> >>  
> >>  
> >>DEBUG
> >>
> >>domain.Sudoku
> >>domain.Digit
> >>score.drl
> >>
> >>  SIMPLE
> >>
> >>
> >>
> >>  0
> >>
> >>
> >>
> >>
>  FIRST_FIT
> >>
> >>
> >> solution.RowChangeMoveFactory
> >>  
> >>  
> >>1000
> >>  
> >>  
> >>
> >>  
> >>
> >>  
> >>
> >> --
> >> View this message in context:
> >>
> http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html
> >> Sent from the Drools: User forum mailing list archive at Nabble.com.
> >> ___
> >> rules-users mailing list
> >> rules-users@.jboss
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >>
> >
> > --
> > With kind regards,
> > Geoffrey De Smet
> >
> >
> > ___
> > rules-users mailing list
> > rules-users@.jboss
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3699291.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Planner has trouble creating a configurer: how to debug

2012-01-29 Thread aitchnyu
I have news for you! 

I had an obvious and (bad surprise) buggy mismatch.

The obvious mismatch was: setBlockList and getBlocklist (small 'l' in the
getter).

The other mismatch was isFixed and setFixed. *Drools hates the 'is'* because
(as I guessed) of it's introspector mechanism. It worked only when I renamed
it to getFixed. Your bugfix would have harmed instead of helped, as it would
have let that error pass silently.

Please open an issue to address this. 

Wish I wasnt religious to name boolean getters with 'is'. I will notify of
further problems once the problem gets back on track.


ge0ffrey wrote
> 
> Hi,
> 
> The NullPointerException should definitely not happen, you should get a 
> decent error message describing what's wrong.
> It's fixed in 5.4.0.Beta1.
> 
> It looks like you're running into:
>https://issues.jboss.org/browse/JBRULES-3247
> Upgrade to planner 5.4.0.Beta1
> or add a getter for that setter.
> 
> Op 28-01-12 06:17, aitchnyu schreef:
>> I tried to create a solver from XML configuration. But the entire process
>> returns a *cryptic error message *that makes no sense.
>>
>> How do I fix this? And how can I make sense of this to actually solve
>> similar problems like this?
>>
>> Please excuse me if I made any bad karma. This is my first post on this
>> (and
>> any) mailing list.
>>
>>  jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java App
>>  Exception in thread "main" java.lang.NullPointerException
>>  at
>> org.drools.planner.core.domain.solution.SolutionDescriptor.processPropertyAnnotations(SolutionDescriptor.java:69)
>>  at
>> org.drools.planner.core.domain.solution.SolutionDescriptor.(SolutionDescriptor.java:61)
>>  at
>> org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:197)
>>  at
>> org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:167)
>>  at
>> org.drools.planner.config.XmlSolverConfigurer.buildSolver(XmlSolverConfigurer.java:103)
>>  at App.createSolver(App.java:62)
>>  at App.main(App.java:40)
>>
>> The function that throws it is listed here. The line is of course `return
>> configurer.buildSolver();`.
>>
>>  private static Solver createSolver(){
>>  XmlSolverConfigurer configurer = new XmlSolverConfigurer();
>>  File file = new File("solver.xml");
>>  FileInputStream fin = null;
>>  try{
>>  fin = new FileInputStream(file);
>>  }
>>  catch(IOException e){
>>   System.out.println("Unable to read drl");
>>  }
>>  configurer.configure(fin);
>> 
>> //configurer.configure("/home/jesvin/dev/drools/sudoku/solver.xml");
>>  return configurer.buildSolver();
>>  }
>>
>> The content of the XML:
>>
>>  
>>  
>>DEBUG
>>
>>domain.Sudoku
>>domain.Digit
>>score.drl
>>
>>  SIMPLE
>>
>>
>>
>>  0
>>
>>
>>
>>  FIRST_FIT
>>
>>   
>> solution.RowChangeMoveFactory
>>  
>>  
>>1000
>>  
>>  
>>
>>  
>>
>>  
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> ___
>> rules-users mailing list
>> rules-users@.jboss
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> 
> -- 
> With kind regards,
> Geoffrey De Smet
> 
> 
> ___
> rules-users mailing list
> rules-users@.jboss
> https://lists.jboss.org/mailman/listinfo/rules-users
> 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3699291.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Planner has trouble creating a configurer: how to debug

2012-01-28 Thread Geoffrey De Smet
Hi,

The NullPointerException should definitely not happen, you should get a 
decent error message describing what's wrong.
It's fixed in 5.4.0.Beta1.

It looks like you're running into:
   https://issues.jboss.org/browse/JBRULES-3247
Upgrade to planner 5.4.0.Beta1
or add a getter for that setter.

Op 28-01-12 06:17, aitchnyu schreef:
> I tried to create a solver from XML configuration. But the entire process
> returns a *cryptic error message *that makes no sense.
>
> How do I fix this? And how can I make sense of this to actually solve
> similar problems like this?
>
> Please excuse me if I made any bad karma. This is my first post on this (and
> any) mailing list.
>
>  jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java App
>  Exception in thread "main" java.lang.NullPointerException
>   at
> org.drools.planner.core.domain.solution.SolutionDescriptor.processPropertyAnnotations(SolutionDescriptor.java:69)
>   at
> org.drools.planner.core.domain.solution.SolutionDescriptor.(SolutionDescriptor.java:61)
>   at
> org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:197)
>   at
> org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:167)
>   at
> org.drools.planner.config.XmlSolverConfigurer.buildSolver(XmlSolverConfigurer.java:103)
>   at App.createSolver(App.java:62)
>   at App.main(App.java:40)
>
> The function that throws it is listed here. The line is of course `return
> configurer.buildSolver();`.
>
>  private static Solver createSolver(){
>   XmlSolverConfigurer configurer = new XmlSolverConfigurer();
>   File file = new File("solver.xml");
>   FileInputStream fin = null;
>   try{
>   fin = new FileInputStream(file);
>   }
>   catch(IOException e){
>System.out.println("Unable to read drl");
>   }
>   configurer.configure(fin);
>  //configurer.configure("/home/jesvin/dev/drools/sudoku/solver.xml");
>  return configurer.buildSolver();
>  }
>
> The content of the XML:
>
>  
>  
>DEBUG
>
>domain.Sudoku
>domain.Digit
>score.drl
>
>  SIMPLE
>
>
>
>  0
>
>
>
>  FIRST_FIT
>
>solution.RowChangeMoveFactory
>  
>  
>1000
>  
>  
>
>  
>
>  
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

-- 
With kind regards,
Geoffrey De Smet


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Planner has trouble creating a configurer: how to debug

2012-01-27 Thread aitchnyu
I tried to create a solver from XML configuration. But the entire process
returns a *cryptic error message *that makes no sense.

How do I fix this? And how can I make sense of this to actually solve
similar problems like this? 

Please excuse me if I made any bad karma. This is my first post on this (and
any) mailing list.

jesvin@Jesvin-Technovia:~/dev/drools/sudoku$ java App 
Exception in thread "main" java.lang.NullPointerException
at
org.drools.planner.core.domain.solution.SolutionDescriptor.processPropertyAnnotations(SolutionDescriptor.java:69)
at
org.drools.planner.core.domain.solution.SolutionDescriptor.(SolutionDescriptor.java:61)
at
org.drools.planner.config.solver.SolverConfig.buildSolutionDescriptor(SolverConfig.java:197)
at
org.drools.planner.config.solver.SolverConfig.buildSolver(SolverConfig.java:167)
at
org.drools.planner.config.XmlSolverConfigurer.buildSolver(XmlSolverConfigurer.java:103)
at App.createSolver(App.java:62)
at App.main(App.java:40)

The function that throws it is listed here. The line is of course `return
configurer.buildSolver();`.

private static Solver createSolver(){
XmlSolverConfigurer configurer = new XmlSolverConfigurer();
File file = new File("solver.xml");
FileInputStream fin = null;
try{
fin = new FileInputStream(file);
}
catch(IOException e){
 System.out.println("Unable to read drl");
}
configurer.configure(fin);
//configurer.configure("/home/jesvin/dev/drools/sudoku/solver.xml");
return configurer.buildSolver();
}

The content of the XML:



  DEBUG

  domain.Sudoku
  domain.Digit
  score.drl
  
SIMPLE
  

  
0
  
  
  
FIRST_FIT

  solution.RowChangeMoveFactory


  1000


  

  


--
View this message in context: 
http://drools.46999.n3.nabble.com/Planner-has-trouble-creating-a-configurer-how-to-debug-tp3695307p3695307.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users