[jboss-jira] [JBoss JIRA] (DROOLS-876) Error creating field accessors for timestamp field 'org.drools.compiler.lang.descr.AnnotationDescr
Mario Fusco (JIRA)
issues at jboss.org
Mon Aug 10 12:14:03 EDT 2015
[ https://issues.jboss.org/browse/DROOLS-876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-876.
--------------------------------
Resolution: Cannot Reproduce Bug
I tried to reproduce this compilation issue with the following test case, but it works as expected for me.
{code}
@Test
public void test876() {
// DROOLS-876
String drl =
"import " + SensorReading.class.getCanonicalName() + "\n" +
"declare SensorReading \n" +
" @role(event)\n" +
" @timestamp(createdAt)\n" +
" @expire(2s)\n" +
"end\n" +
"\n" +
"rule \"Sound the alarm in case temperature rises above threshold\"\n" +
"salience 10\n" +
"when\n" +
" Number( $tmp:doubleValue) from accumulate( $temp : SensorReading() over window:time( 10s ) , \n" +
" count( $temp ) )\n" +
"then\n" +
"// sound the alarm\n" +
" System.out.println(\"v1.4 hot02 Container : \" + $tmp + \" Hot Hot~! Please switch on cooler!\");\n" +
"\n" +
"end\n";
KieServices ks = KieServices.Factory.get();
KieFileSystem kfs = ks.newKieFileSystem().write( "src/main/resources/r1.drl", drl );
Results results = ks.newKieBuilder( kfs ).buildAll().getResults();
assertEquals( 0, results.getMessages().size() );
}
public static class SensorReading implements java.io.Serializable {
static final long serialVersionUID = 1L;
private java.lang.String sourceIp;
private java.lang.String destinationIp;
private long createdAt;
private java.lang.String protocol;
public SensorReading()
{
}
public java.lang.String getSourceIp()
{
return this.sourceIp;
}
public void setSourceIp(java.lang.String sourceIp)
{
this.sourceIp = sourceIp;
}
public java.lang.String getDestinationIp()
{
return this.destinationIp;
}
public void setDestinationIp(java.lang.String destinationIp)
{
this.destinationIp = destinationIp;
}
public java.lang.String getProtocol()
{
return this.protocol;
}
public void setProtocol(java.lang.String protocol)
{
this.protocol = protocol;
}
public long getCreatedAt()
{
return this.createdAt;
}
public void setCreatedAt(long createdAt)
{
this.createdAt = createdAt;
}
public SensorReading(java.lang.String sourceIp, java.lang.String destinationIp,
long createdAt, java.lang.String protocol)
{
this.sourceIp = sourceIp;
this.destinationIp = destinationIp;
this.createdAt = createdAt;
this.protocol = protocol;
}
}
{code}
> Error creating field accessors for timestamp field 'org.drools.compiler.lang.descr.AnnotationDescr
> --------------------------------------------------------------------------------------------------
>
> Key: DROOLS-876
> URL: https://issues.jboss.org/browse/DROOLS-876
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 6.3.0.Beta2
> Environment: Window 7 64bit
> Wildfly 8.1.0.Final
> kie-server-6.3.0-SNAPSHOT-ee7.war
> kie-drools-wb-6.3.0-SNAPSHOT-wildfly8.war
> (from http://download.jboss.org/drools/release/snapshot/master/)
> Reporter: JongHwan Nam
> Assignee: Mario Fusco
>
> This is my wildfly log...
> 17:55:04,569 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (default task-47) Unable
> to build KieBaseModel:kiebase
> Error creating field accessors for timestamp field 'org.drools.compiler.lang.descr.AnnotationDescr at 3
> 492935' for type 'SensorReading'
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list