-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
None
-
None
We have a Java class that uses java.sql.Timestamp to record time values. In Drools 5.0.1, we were able to use the @timestamp annotation as follows:
declare StateEvent @role( event ) @timestamp( startTime ) @duration( duration ) end
StateEvent contains the following:
import java.sql.Timestamp; ... private Timestamp startTime; private Long duration; public Timestamp getStartTime() { return startTime; } public void setStartTime(Timestamp st) { startTime = st; } public Long getDuration() { return duration; } public void setDuration(Long d) { duration = d; } ....
We load the rules from a .drl file as follows:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("path-to-file", ResourceType.DRL);
In 5.4.0, this no longer works and we get the error message:
Annotated type StateEvent - undefined property in @annotation timestamp: java.sql.Timestamp.value();
Also tested with 5.5.0.Final and 5.5.0.CR1