Re: [rules-users] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-05-28 Thread Geoffrey De Smet
This fix will be in 
6.0.0.Beta3:https://github.com/droolsjbpm/optaplanner/commit/63b1f7284fad495386ee9f34238dc3b69cb9bb98
Solution: use XStreamBendableScoreConverter instead

On 24-05-13 21:28, jonathan.labin wrote:
 I have switched to 6.0.0.beta2 and I am still receiving a similar error.
 While BendableScoreDefinition does now have a no-arg constructor, It seems
 that XStream is still upset that the constructor is not public.

   ...
 Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
 (class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
 does not have a public no-arg constructor
   at
 org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:43)
   ... 17 more
 Caused by: java.lang.IllegalAccessException: Class
 org.optaplanner.persistence.xstream.XStreamScoreConverter can not access a
 member of class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition
 with modifiers private
   at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
   at java.lang.Class.newInstance0(Class.java:366)
   at java.lang.Class.newInstance(Class.java:325)
   at
 org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:38)
   ... 17 more




 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523p4023961.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] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-05-28 Thread Geoffrey De Smet
And now there's a test (that also shows how it works) so it definitely 
works this time around :)

https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-benchmark/src/test/java/org/optaplanner/persistence/xstream/XStreamBendableScoreConverterTest.java#L43

On 28-05-13 17:21, Geoffrey De Smet wrote:
 This fix will be in 
 6.0.0.Beta3:https://github.com/droolsjbpm/optaplanner/commit/63b1f7284fad495386ee9f34238dc3b69cb9bb98
 Solution: use XStreamBendableScoreConverter instead

 On 24-05-13 21:28, jonathan.labin wrote:
 I have switched to 6.0.0.beta2 and I am still receiving a similar error.
 While BendableScoreDefinition does now have a no-arg constructor, It seems
 that XStream is still upset that the constructor is not public.

  ...
 Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
 (class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
 does not have a public no-arg constructor
  at
 org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:43)
  ... 17 more
 Caused by: java.lang.IllegalAccessException: Class
 org.optaplanner.persistence.xstream.XStreamScoreConverter can not access a
 member of class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition
 with modifiers private
  at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
  at java.lang.Class.newInstance0(Class.java:366)
  at java.lang.Class.newInstance(Class.java:325)
  at
 org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:38)
  ... 17 more




 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523p4023961.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


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


Re: [rules-users] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-05-25 Thread Geoffrey De Smet
Thanks for the feedback. If there's a jira please reopen it.
Beta3 is going out soon, hopefully I 'll have time to fix it on Monday 
or Tuesday to make that release.

Once the projectscheduling example is migrated, which uses 
BendableScore, these errors will be caught in our automated testing.

On 24-05-13 21:28, jonathan.labin wrote:
 I have switched to 6.0.0.beta2 and I am still receiving a similar error.
 While BendableScoreDefinition does now have a no-arg constructor, It seems
 that XStream is still upset that the constructor is not public.

   ...
 Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
 (class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
 does not have a public no-arg constructor
   at
 org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:43)
   ... 17 more
 Caused by: java.lang.IllegalAccessException: Class
 org.optaplanner.persistence.xstream.XStreamScoreConverter can not access a
 member of class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition
 with modifiers private
   at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
   at java.lang.Class.newInstance0(Class.java:366)
   at java.lang.Class.newInstance(Class.java:325)
   at
 org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:38)
   ... 17 more




 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523p4023961.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] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-05-24 Thread jonathan.labin
I have switched to 6.0.0.beta2 and I am still receiving a similar error. 
While BendableScoreDefinition does now have a no-arg constructor, It seems
that XStream is still upset that the constructor is not public.

...
Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
(class
org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
does not have a public no-arg constructor
at
org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:43)
... 17 more
Caused by: java.lang.IllegalAccessException: Class
org.optaplanner.persistence.xstream.XStreamScoreConverter can not access a
member of class
org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition
with modifiers private
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.Class.newInstance0(Class.java:366)
at java.lang.Class.newInstance(Class.java:325)
at
org.optaplanner.persistence.xstream.XStreamScoreConverter.init(XStreamScoreConverter.java:38)
... 17 more




--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523p4023961.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] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-04-25 Thread jonathan.labin
Is there an example that uses BendableScore?

I'm trying to convert my app from using HardSoftScore to BendableScore and
I've run into my first issue:


Changing from:
@XStreamConverter(value = XStreamScoreConverter.class, types =
{HardSoftLongScoreDefinition.class})

to
@XStreamConverter(value = XStreamScoreConverter.class, types =
{BendableScoreDefinition.class})

throws:
Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
(class
org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
does not have a public no-arg constructor.

The answer to this issue would be helpful but I'll probably hit other bumps
along the way.  Does anyone have an example that uses BendableScore?

Thanks,

Jon



--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523.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] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-04-25 Thread jonathan.labin
Sorry.  This is in 6.0.0.Beta1



--
View this message in context: 
http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523p4023525.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] [Optaplanner] No-arg constructor for BendableScoreDefinition

2013-04-25 Thread Geoffrey De Smet

On 25-04-13 16:18, jonathan.labin wrote:
 Is there an example that uses BendableScore?

 I'm trying to convert my app from using HardSoftScore to BendableScore and
 I've run into my first issue:


 Changing from:
 @XStreamConverter(value = XStreamScoreConverter.class, types =
 {HardSoftLongScoreDefinition.class})

 to
 @XStreamConverter(value = XStreamScoreConverter.class, types =
 {BendableScoreDefinition.class})

 throws:
 Caused by: java.lang.IllegalArgumentException: The scoreDefinitionClass
 (class
 org.optaplanner.core.impl.score.buildin.bendable.BendableScoreDefinition)
 does not have a public no-arg constructor.
Reported a few days ago too, should be fixed for 6.0.0.Beta2
https://github.com/droolsjbpm/optaplanner/commit/c042baea7dd937ac14af289580695a5992ad6e77

 The answer to this issue would be helpful but I'll probably hit other bumps
 along the way.  Does anyone have an example that uses BendableScore?
A new example that is coming in a few weeks is called Project Scheduling 
and that will use it.
   https://github.com/triceo/mista13/

 Thanks,

 Jon



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Optaplanner-No-arg-constructor-for-BendableScoreDefinition-tp4023523.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