[
https://issues.jboss.org/browse/JBRULES-2406?page=com.atlassian.jira.plug...
]
Mario Fusco resolved JBRULES-2406.
----------------------------------
Resolution: Done
Unable to create Field extractor error caused by methods like public
boolean setTime()
--------------------------------------------------------------------------------------
Key: JBRULES-2406
URL:
https://issues.jboss.org/browse/JBRULES-2406
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.1.FINAL, 5.1.0.M1
Reporter: Jos Hendriks
Assignee: Mario Fusco
Fix For: 6.0.0.Alpha1
I used The clipse plugin to create a new drools project and added the example java class
and rule file.
I have added the method below to the Message class:
public boolean setTime() {
return true;
}
This result in the following error messages:
Unable to create Field Extractor for 'status' of '[ClassObjectType
class=com.sample.DroolsTest$Message]' in rule 'Hello World' : [Rule
name='Hello World']
Unable to create Field Extractor for 'message' : [Rule name='Hello
World']
org.drools.RuntimeDroolsException: java.lang.ArrayIndexOutOfBoundsException: 0
Unable to create Field Extractor for 'status' of '[ClassObjectType
class=com.sample.DroolsTest$Message]' in rule 'GoodBye' : [Rule
name='GoodBye']
Unable to create Field Extractor for 'message' : [Rule name='GoodBye']
org.drools.RuntimeDroolsException: java.lang.ArrayIndexOutOfBoundsException: 0
Rule Compilation error : [Rule name='Hello World']
com/sample/Rule_Hello_World_0.java (7:416) : myMessage cannot be resolved
Rule Compilation error : [Rule name='GoodBye']
com/sample/Rule_GoodBye_0.java (7:343) : myMessage cannot be resolved
java.lang.IllegalArgumentException: Could not parse knowledge.
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:46)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Adding a parameter to setTime or renameing it to something else then setXxxx, storeTime
for example, does not result in an error.
--
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