[
https://issues.jboss.org/browse/JBRULES-2298?page=com.atlassian.jira.plug...
]
Mario Fusco resolved JBRULES-2298.
----------------------------------
Fix Version/s: 5.3.2.Final
Resolution: Done
Can't use functions when MVEL dialect is set at package level
-------------------------------------------------------------
Key: JBRULES-2298
URL:
https://issues.jboss.org/browse/JBRULES-2298
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.1.FINAL
Reporter: Michael Neale
Assignee: Mario Fusco
Priority: Critical
Fix For: 5.3.2.Final, 5.4.0.CR1
package jboss.cloud
dialect "mvel"
#trying to get functions working...
rule "something"
when
s: SimpleFact(id == 42, name == "michael")
then
System.out.println("hello");
end
function String doSomething() {
return "hey";
}
And I get:
java.lang.NullPointerException
at org.drools.rule.builder.dialect.mvel.MVELDialect.compile(MVELDialect.java:510)
at
org.drools.rule.builder.dialect.mvel.MVELDialect.addFunction(MVELDialect.java:338)
at org.drools.compiler.PackageBuilder.addFunction(PackageBuilder.java:1104)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:626)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira