Annotations not working when trying to do hello world in Scala

15 views
Skip to first unread message

Vincenzo Moreno Luna

unread,
Apr 24, 2022, 5:14:42 AMApr 24
to OptaPlanner development
Hello everyone, 

I'm trying to translate the hello world java example to scala but I get:

 java.lang.IllegalStateException: The solutionClass (class schooltimetabling.model.TimeTable) must have at least 1 member with a PlanningEntityCollectionProperty annotation or a PlanningEntityProperty annotation.

when trying to run the code. It seems the annotation is ignored. 
I was wondering if anyone else had encountered this issue and if there was a workaround.

The code can be found here.

Thank you

Vincenzo Moreno Luna

unread,
Apr 24, 2022, 6:01:44 AMApr 24
to OptaPlanner development
I locally tried to use a Java version of the TimeTable class and found that other annotations are not working too:

The entityClass (class schooltimetabling.model.Lesson) should have at least 1 getter method or 1 field with a PlanningVariable annotation or a shadow variable annotation.

So it is a general problem with the annotations.

Vincenzo Moreno Luna

unread,
Apr 24, 2022, 12:39:06 PMApr 24
to OptaPlanner development
Reply all
Reply to author
Forward
0 new messages