[jboss-jira] [JBoss JIRA] Created: (JBRULES-2413) Classname collision in dynamically generated Java code

Simon Hamilton (JIRA) jira-events at lists.jboss.org
Tue Jan 19 18:23:47 EST 2010


Classname collision in dynamically generated Java code
------------------------------------------------------

                 Key: JBRULES-2413
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2413
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Simon Hamilton
            Assignee: Mark Proctor


When multiple rule flow files are coded in the same package it's possible for actions coded in the Java dialect to be placed in the same dynamically generated java classes. We found cases where a NoSuchMethodError occurs at runtime because of a discrepancy between the number of actions available and Action Invokers generated when two flows in the same package have a different number of actions. 

This appears to be and issue with the interaction between JavaDialect.getUniqueLegalName and ProcessBuilder.buildProcess where the ProcessBuilder provides JavaDialect with only the package name.

Altering ProcessBuilder:124 from
	            processDescr.setName(process.getPackageName()); 

to
	            processDescr.setName(process.getPackageName()+"."+process.getName()); 

results in a unique name for the generated java classes.


-- 
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