[JBoss JIRA] Created: (JBRULES-613) Can't use dollar ($) char in Rule Name with Janino compiler
by Bree VanOss (JIRA)
Can't use dollar ($) char in Rule Name with Janino compiler
-----------------------------------------------------------
Key: JBRULES-613
URL: http://jira.jboss.com/jira/browse/JBRULES-613
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 3.0.5
Environment: Verified on WinXP and OS X
Reporter: Bree VanOss
Assigned To: Mark Proctor
Priority: Minor
Essentially it appears that any rule using the U.S. Dollar character ($) in the
rule name fails when compiled with Janino. I was able to reproduce the issue
using the "default" new JBoss-rules project wizard in Eclipse.
The stack trace follows, though it may not be much help. I tried tracking it
down and it looks like the problem is actually caused in the parse/compilation
step (i.e. builder.addPackageFromDrl( source );). After this step the rule in
question has a null "consequence", which causes the
"AbstractRuleBase.addRule(...)" method to fail when it does the isValid() check.
<code>
java.lang.IllegalArgumentException: The rule called Show me da $ is not valid.
Check for compile errors reported.
at org.drools.common.AbstractRuleBase.addRule(Unknown Source)
at org.drools.reteoo.ReteooRuleBase.addRule(Unknown Source)
at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
at com.sample.DroolsTest.readRule(DroolsTest.java:89)
at com.sample.DroolsTest.main(DroolsTest.java:29)
</code>
--
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
19 years, 2 months
[JBoss JIRA] Created: (JBRULES-798) CLONE -null pointer with number comparison..
by Sanjay Mahurpawar (JIRA)
CLONE -null pointer with number comparison..
--------------------------------------------
Key: JBRULES-798
URL: http://jira.jboss.com/jira/browse/JBRULES-798
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.4
Environment: Windows XP or Solaris
Sun JDK 1.4.2
Drools 3.0.4 distribution
Reporter: Sanjay Mahurpawar
Assigned To: Mark Proctor
getting a null pointer while asserting fact:
Caused by: java.lang.NullPointerException
at org.drools.base.evaluators.IntegerFactory$IntegerGreaterEvaluator.evaluate(Unknown Source)
at org.drools.rule.BoundVariableConstraint.isAllowed(Unknown Source)
at org.drools.common.BetaNodeBinder.isAllowed(Unknown Source)
at org.drools.reteoo.TupleSource.attemptJoin(Unknown Source)
at org.drools.reteoo.JoinNode.assertTuple(Unknown Source)
at org.drools.reteoo.LeftInputAdapterNode.createAndAssertTuple(Unknown Source)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
at org.drools.reteoo.ObjectTypeNode.assertObject(Unknown Source)
at org.drools.reteoo.Rete.assertObject(Unknown Source)
at org.drools.reteoo.ReteooRuleBase.assertObject(Unknown Source)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
Rule is something like this:
rule "Greater Than with NULL number!!"
when
MyFact ( integerAttribute > 10 )
then
.....
end
the *intergerAttribute* is of type java.lang.Integer and value is *null*.
no such problem if expression changed to *integerAttribute == 10* or !=
--
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
19 years, 2 months
[JBoss JIRA] Created: (JBRULES-784) NPE when left or right hand fact attribute is null
by David Nelson (JIRA)
NPE when left or right hand fact attribute is null
--------------------------------------------------
Key: JBRULES-784
URL: http://jira.jboss.com/jira/browse/JBRULES-784
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Conflict Resolution
Affects Versions: 3.1-m1, 3.0.6
Environment: Windows XP, JBoss 4.0.5, Java 1.5
Reporter: David Nelson
Assigned To: Mark Proctor
When a rule is evaluated, if the left or right side of a comparison is null, then the rule throws a NPE during execution which bubbles to the UI.
Here's the simple scenario:
Class A has a name attribute.
Class B has a name attribute set to "Bob".
when
b : B()
a: A( $name : name, ($name != b.getName()) )
then
System.out.println("This is not an issue!");
--
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
19 years, 2 months
[JBoss JIRA] Created: (JBRULES-577) Please add "contained by" syntax for constraints
by Dirk Bergstrom (JIRA)
Please add "contained by" syntax for constraints
------------------------------------------------
Key: JBRULES-577
URL: http://jira.jboss.com/jira/browse/JBRULES-577
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Reporter: Dirk Bergstrom
Assigned To: Mark Proctor
I'd like to be able to write a constraint to determine if a field's value is a member of some collection. This is the inverse of the "contains" keyword. The proposed syntax is:
[bindingVar :] <fieldName> in <someCollection>
(I'm not picky about the keyword, other possibilities are "containedBy" or "memberOf", but "in" is a single word)
Use case:
I have a container class with a field that exposes a collection of record
numbers. In the working memory, I have a bunch of record objects, and one
container object. I want to write a rule that fires when it encounters a
container that has records matching some criteria:
when
Container( $recordNums : records )
Record( number in $recordNums, otherField == "somevalue" )
then
doStuff();
The current workaround is:
Record( num : number -> ( $recordNums.contains(num) ) )
Which is problematic, as the predicate may not be time-constant.
--
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
19 years, 2 months
[JBoss JIRA] Created: (SECURITY-22) Concurrency bug in JaasSecurityManager
by Alex Besogonov (JIRA)
Concurrency bug in JaasSecurityManager
--------------------------------------
Key: SECURITY-22
URL: http://jira.jboss.com/jira/browse/SECURITY-22
Project: JBoss Security
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JBossSX
Affects Versions: 2.0
Reporter: Alex Besogonov
Assigned To: Anil Saldhana
JaasSecurityManager$DomainInfo.destroy calls logout() when cached entry expires, even while it is used by another thread.
Suppose we have two threads:
Thread 1:
1. 'User1' authentication
2. 'User1' is added to auth cache
3. Doing some lengthy operation
4. Checking roles of User1 - WILL FAIL, another thread has called logout()!
Thread 2 (when Thread1 is doing 'some lengthy operation' ):
1. 'User1' logs in.
2. Auth cache entry has expired.
3. Calling .logout() on stale entry
--
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
19 years, 2 months