Bug 739638 - Events have undefined methods
Summary: Events have undefined methods
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.2.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: BRMS 5.2.0.GA
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-19 17:12 UTC by Tomas Schlosser
Modified: 2023-05-15 19:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple test case (1.40 KB, application/x-zip-compressed)
2011-09-19 17:12 UTC, Tomas Schlosser
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBRULES-3218 0 None Closed Declare statements don't resolve types properly when imported with package imports (.*) 2012-03-05 08:28:40 UTC

Description Tomas Schlosser 2011-09-19 17:12:21 UTC
Created attachment 523875 [details]
Simple test case

Description of problem:
Methods are undefined for classes imported from different package and defined as events.

Version-Release number of selected component (if applicable):
BRMS 5.2.0.ER4

How reproducible:
every time

Steps to Reproduce:
1. run the included test case
  
Actual results:
Rule Compilation error : [Rule name='rule 3']
	org/jboss/qa/brms/entrypoints/Rule_rule_3_0.java (8:409) : The method setId(int) is undefined for the type OutsideEvent
	org/jboss/qa/brms/entrypoints/Rule_rule_3_0.java (9:424) : The method setKey(String) is undefined for the type OutsideEvent
	org/jboss/qa/brms/entrypoints/Rule_rule_3_0.java (10:448) : The method setValue(String) is undefined for the type OutsideEvent


	at org.jboss.qa.brms.entrypoints.EntryPointsTest.main(EntryPointsTest.java:27)

Expected results:


Additional info:

Comment 1 Edson Tirelli 2011-09-19 20:01:52 UTC
I was able to reproduce the problem. It is not related to events themselves, but to having an import .* on a given package and then using a "declare" statement for a type in that package.

Investigating.

Comment 2 Edson Tirelli 2011-09-20 13:27:48 UTC
Just to keep you updated, I have the problem narrowed down and it is related to classpath clashes and problems on classpath resolution when using imports with .*. 

Working full time on the solution, just not clear yet how to do it.

Comment 3 Edson Tirelli 2011-09-20 15:33:44 UTC
Bug fixed and committed. 

https://github.com/droolsjbpm/drools/commit/08ce9dae3054ddc0ebb53c943d5dc58441e91bf4

Comment 4 lcarlon 2011-09-21 03:56:39 UTC
Marked as not needing a release note as Events and CEP will be supported for the first time in 5.2.0.

Comment 5 Edson Tirelli 2011-09-21 12:10:41 UTC
Just to clarify, this is *not* related to events. It was a bug when using package imports (e.g., org.drools.test.*) and a declare statement on a class in that package. For instance, a fact declaration would raise the same problem:

declare MyClass
    @role( fact )
end

Having said that, I believe this regression was introduced after 5.1.0 was released and since it is fixed now, probably does not require a release note.

Comment 6 lcarlon 2011-09-21 22:36:20 UTC
Thanks for the clarification, Edson.

I'll leave this marked as no release note needed for the reasons you've stated.

Comment 7 Tomas Schlosser 2011-09-30 08:07:26 UTC
This bug was fixed in BRMS-5.2.0.ER5, marking it verified.


Note You need to log in before you can comment on or make changes to this bug.