condition ending with ; is not considered as wrong when parsing ruleset but
generates error when asserting an object
--------------------------------------------------------------------------------------------------------------------
Key: DROOLS-470
URL: http://jira.codehaus.org/browse/DROOLS-470
Project: drools
Type: Bug
Components: semantics.java
Versions: 2.5
Reporter: Kris Verlaenen
Priority: Minor
When creating a java condition ending with a semi-colon, loading of the ruleset
is successful.
e.g. when creating a rule containing
<java:condition>
true;
</java:condition>
then
ruleBase =
RuleBaseLoader.loadFromInputStream(this.getClass().getResourceAsStream(
"/myrule.java.drl" ))
does not generate any errors.
Although, when asserting an object in the working memory that leads to the
evaluation of that condition, first some output is written to the system out,
followed by an exception:
drools/org/MyRuleSet_1136384249796/java/Allow_ProviderA_access_0.java(26)
Syntax error on token ";", delete this token
drools/org/MyRuleSet_1136384249796/java/Allow_ProviderA_access_0.java(26)
Syntax error on token ";", delete this token
java.lang.NoClassDefFoundError:
drools/org/MyRuleSet_1136384249796/java/Allow_ProviderA_access_0
at
drools.org.MyRuleSet_1136384249796.java.Allow_ProviderA_access_0Invoker$Condition_1Invoker.invoke(Allow_ProviderA_access_0Invoker.java:36)
at
org.drools.semantics.java.JavaCondition.isAllowed(JavaCondition.java:172)
at org.drools.reteoo.ConditionNode.assertTuple(ConditionNode.java:154)
at
org.drools.reteoo.TupleSource.propagateAssertTuple(TupleSource.java:118)
at org.drools.reteoo.ParameterNode.assertObject(ParameterNode.java:126)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:173)
at org.drools.reteoo.Rete.assertObject(Rete.java:111)
at org.drools.reteoo.RuleBaseImpl.assertObject(RuleBaseImpl.java:193)
at
org.drools.reteoo.WorkingMemoryImpl.assertObject(WorkingMemoryImpl.java:373)
at
org.drools.reteoo.WorkingMemoryImpl.assertObject(WorkingMemoryImpl.java:348)
If a ; is not allowed in a condition, this problem should be detected when
parsing the ruleset.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira