[jboss-jira] [JBoss JIRA] (DROOLS-10) Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
Ken Warkentyne (JIRA)
jira-events at lists.jboss.org
Mon Jan 7 16:15:08 EST 2013
Ken Warkentyne created DROOLS-10:
------------------------------------
Summary: Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
Key: DROOLS-10
URL: https://issues.jboss.org/browse/DROOLS-10
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Ken Warkentyne
Assignee: Mark Proctor
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:
{code}
declare StateEvent
@role( event )
@timestamp( startTime )
@duration( duration )
end
{code}
StateEvent contains the following:
{code}
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;
}
....
{code}
We load the rules from a .drl file as follows:
{code}
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("path-to-file", ResourceType.DRL);
{code}
In 5.4.0, this no longer works and we get the error message:
{code}
Annotated type StateEvent - undefined property in @annotation timestamp: java.sql.Timestamp.value();
{code}
Also tested with 5.5.0.Final and 5.5.0.CR1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list