[
https://issues.jboss.org/browse/DROOLS-10?page=com.atlassian.jira.plugin....
]
Edson Tirelli resolved DROOLS-10.
---------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
Fix Version/s: 6.0.0.Alpha1
Resolution: Cannot Reproduce Bug
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: Edson Tirelli
Fix For: 6.0.0.Alpha1
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