[jboss-jira] [JBoss JIRA] Created: (JBRULES-2406) Unable to create Field extractor error caused by methods like public boolean setTime()

Jos Hendriks (JIRA) jira-events at lists.jboss.org
Thu Jan 14 14:02:30 EST 2010


Unable to create Field extractor error caused by methods like public boolean setTime()
--------------------------------------------------------------------------------------

                 Key: JBRULES-2406
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2406
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler
    Affects Versions: 5.1.0.M1, 5.0.1.FINAL
            Reporter: Jos Hendriks
            Assignee: Mark Proctor


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 contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list