[rules-users] Bug in 5.1 : function w/o parameter type is a no-no

Wolfgang Laun wolfgang.laun at gmail.com
Thu Sep 23 05:31:19 EDT 2010


The RTE is caused by following DRL.g in writing a function; it says you can
omit the type for a parameter. A function like this causes the crash:

function inf sqr( a ){ return a*a; }

Untyped parameters may be used in queries. I suppose it will be necessary to
use different NTs for parameters and param_definition.

Exception in thread "main" java.lang.RuntimeException:
org.drools.compiler.DroolsParserException: Unknown error while parsing. This
is a bug. Please contact the Development team.
    at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:545)
    at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
    at rss.drools.setup.Application.setup(Application.java:40)
    at rss.drools.setup.Application.execute(Application.java:60)
    at appl.transport.Transport.main(Transport.java:64)
Caused by: org.drools.compiler.DroolsParserException: Unknown error while
parsing. This is a bug. Please contact the Development team.
    at org.drools.compiler.DrlParser.compile(DrlParser.java:250)
    at org.drools.compiler.DrlParser.parse(DrlParser.java:142)
    at org.drools.compiler.DrlParser.parse(DrlParser.java:147)
    at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:264)
    at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100923/e64effef/attachment.html 


More information about the rules-users mailing list