[
http://jira.jboss.com/jira/browse/JBRULES-503?page=comments#action_12343970 ]
jasonc411 commented on JBRULES-503:
-----------------------------------
When compiling the above file, I get the error:
2006-09-25 09:56:54,914 ERROR com.ca.data.controllers.issuer.PersistIssuer Unable to add
processing rules, exception unspecified.
org.drools.rule.InvalidRulePackage: Function Compilation error
at org.drools.rule.Package.checkValidity(Unknown Source)
at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
When I remove the line with the generic, it compiles fine. Also there is no additional
info other than exception unspecified.
Compiler Throwing an exception on generics
------------------------------------------
Key: JBRULES-503
URL:
http://jira.jboss.com/jira/browse/JBRULES-503
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 3.0.4
Environment: JBoss Rules 3.0.4, antlr-2.7.6.jar, antlr-3.0ea8.jar,
commons-jci-core-1.0-406301.jar, commons-jci-eclipse-3.2.0.666.jar, core-3.2.0.666.jar,
drools-compiler-3.0.4.jar, drools-jsr94-3.0.4.jar, jsr94-1.1.jar, stringtemplate2.3b6.jar
Reporter: jasonc411
Assigned To: Mark Proctor
#created on: Sep 15, 2006
package com.ca.data.dsrules
#list any import classes here.
import com.ca.data.model.base.DataSourceEnum;
import com.ca.data.model.issuer.Issuer;
import java.util.ArrayList;
import java.util.List;
import com.ca.data.model.Data;
import com.ca.data.datasubs.utils.JMSServiceLocator;
import com.ca.data.jms.JMSTextMessageSender;
function void save(Issuer issuer){
JMSTextMessageSender cleanQueue =
JMSServiceLocator.getTextSender("SomeServer", "SomeTopic");
Data data = new Data();
List<Issuer> myIssuers = new ArrayList<Issuer>();
myIssuers.add(issuer);
Data.setIssuerList(myIssuers);
cleanQueue.simpleSend(issuer);
}
rule "Persist Validated Data"
agenda-group "Data In"
no loop
salience 1
when
issuer : Issuer(dataSource == DataSourceEnum.SomeSource, id != -1)
then
System.out.println("Validated");
save(issuer);
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira