[JBoss JIRA] Created: (JBRULES-548) NPT when binding a variable and comparing that variable to another property of the same object the variable was bound from
by ELCA SII (JIRA)
NPT when binding a variable and comparing that variable to another property of the same object the variable was bound from
---------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-548
URL: http://jira.jboss.com/jira/browse/JBRULES-548
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 3.0.4
Environment: Windows 2000
Sun JDK 1.5.0_02
Reporter: ELCA SII
Assigned To: Mark Proctor
Fix For: 3.0.5
I want to have a rule that compares one property of an object with another one of the same object.
Sample Object:
<snip>
public class TestDomainObject {
public TestDomainObject() {
}
public Integer getValueX() {
return new Integer(200);
}
public Integer getValueY() {
return new Integer(300);
}
}
</snip>
I have the following rule in NRL:
<snip>
rule "Rule2"
when
TestDomainObject( y : valueY, valueX < y )
then
System.out.println("valueX < valueY");
end
</snip>
or XML:
<snip>
<rule name="rule2.B">
<lhs>
<column object-type="TestDomainObject" identifier="p2">
<literal field-name="type" evaluator="==" value="invoice"/>
<field-binding field-name="valueY" identifier="v1"/>
<bound-variable field-name="valueX" evaluator="<=" identifier="v1"/>
</column>
</lhs>
<rhs>
System.out.println("rule 2.B valueX <= valueY");
</rhs>
</rule>
</snip>
And this leads to the following exception (3.0.4 and 3.0.x branch head):
<snip>
java.lang.NullPointerException
at org.drools.rule.BoundVariableConstraint.isAllowed(BoundVariableConstraint.java:79)
at org.drools.common.BetaNodeBinder.isAllowed(BetaNodeBinder.java:63)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
at org.drools.reteoo.ObjectSource.propagateAssertObject(ObjectSource.java:119)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:138)
at org.drools.reteoo.ObjectSource.propagateAssertObject(ObjectSource.java:119)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:158)
at org.drools.reteoo.Rete.assertObject(Rete.java:120)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:180)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:69)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:538)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:374)
...
</snip>
In the code at
- org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
the call
- this.binder.isAllowed( handle, null, workingMemory )
is made (in the case the binder is not null). For the second parameter (tuple), 'null' is passed explicitly.
later in the calling stack at:
- org.drools.rule.BoundVariableConstraint.isAllowed(BoundVariableConstraint.java:79)
the following call is made:
- tuple.get(...)
=> But the for the 'tuple' 'null' was passed in beforehand
--
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, 6 months
[JBoss JIRA] Commented: (JBRULES-261) Mismatched types in field constraints
by Edson Tirelli (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-261?page=comments#action_12346625 ]
Edson Tirelli commented on JBRULES-261:
---------------------------------------
Do we want to always report errors or do we want to make automatic conversions when possible? The way I'm going on 3.2 is to allways allow automatic conversions when possible.
> Mismatched types in field constraints
> -------------------------------------
>
> Key: JBRULES-261
> URL: http://jira.jboss.com/jira/browse/JBRULES-261
> Project: JBoss Rules
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: Rule Assemply/SPI
> Affects Versions: 3.0.1
> Reporter: Michael Neale
> Assigned To: Mark Proctor
> Priority: Minor
> Fix For: 3.1-m2
>
>
> Problem: If a rule compares two fields and one of them is a char and the
> other one is a String, the match is always negative. No type-mismatch error
> or warning is displayed. This can be quite confusing. The attached Eclipse
> project illustrates this problem.
> Suggested Solution: If all information is available at compile-time an error
> should be generated on type mismatches. Otherwise there should be a warning
> during run-time and maybe a type conversion attempt.
--
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, 6 months
[JBoss JIRA] Created: (JBRULES-505) Using a GLOBAL value in predicates in more than one rule - rule fails to evaluate correctly.
by Matt Green (JIRA)
Using a GLOBAL value in predicates in more than one rule - rule fails to evaluate correctly.
--------------------------------------------------------------------------------------------
Key: JBRULES-505
URL: http://jira.jboss.com/jira/browse/JBRULES-505
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: All
Affects Versions: 3.0.4
Environment: Windows XP, JBoss 4.0.3SP1, JRules3.0.4, PackageBuilderConfiguration.JANINO
Reporter: Matt Green
Assigned To: Mark Proctor
SAMPLE CODE:
===============================================
package net.rockshore.rmf.rules
#list any import classes here.
import net.rockshore.rmf.entities.SubscriptionLocal;
import net.rockshore.rmf.entities.EventLocal;
import java.lang.String;
#declare any global variables here
global java.util.Collection resultsCollection;
global java.lang.String eventType;
rule "KeepSubscriptionsToEventType"
when
subscription : SubscriptionLocal (eventTypeDiscriminator == (eventType))
then
resultsCollection.add(subscription);
System.out.println("Keeping Subscription:" + subscription + " is of type:" + eventType);
end
rule "DiscardSubscriptionsToWrongEventType"
when
wrongSubscription : SubscriptionLocal (eventTypeDiscriminator != (eventType))
then
System.out.println("Discarding Subscription:" + wrongSubscription + " NOT of type:" + eventType);
retract (wrongSubscription);
end
===============================================
TEST DATA SET:
-------------------------
SubscriptionLocal objects asserted
key eventTypeDiscriminator
---------------------------------------------------------------------------------------------------------
5c4o12-mexdpy-esmukytr-1-esmx439o-58 net.rockshore.rmf.entities.events.business.TravelAlertEvent
5c4o12-mexdpy-esmukytr-1-esmx438t-57 net.rockshore.rmf.entities.events.business.FlightDelayEvent
5c4o12-mexdpy-esmukytr-1-esmx438t-56 net.rockshore.rmf.entities.events.business.FlightDelayEvent
eventType = "net.rockshore.rmf.entities.events.business.FlightDelayEvent"
PROBLEM DESCRIPTION:
-------------------------------------
When firing the above rules with data shown above, the result shows that "DiscardSubscriptionsToWrongEventType" rule was fired for Subscriptions with keys ending 57 and 56. This is the wrong way round as that rule should have fired only with Subscription 58.
Further, rule "KeepSubscriptionsToEventType" did not fire.
FURTHER ANALYSIS:
-------------------------------
If one rule OR the other is deleted then the remaining rule fires correctly.
If both rules have the predicate replaced with a String literal "net.rockshore.rmf.entities.events.business.FlightDelayEvent" then both rules fire correctly.
The problem still occurs when eventType predicate is replaced with eventType.toString()
--
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, 6 months
[JBoss JIRA] Created: (JBRULES-523) JoinNode and NotNode with empty binder throw exception with getConstraints()
by Ahti Kitsik (JIRA)
JoinNode and NotNode with empty binder throw exception with getConstraints()
----------------------------------------------------------------------------
Key: JBRULES-523
URL: http://jira.jboss.com/jira/browse/JBRULES-523
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 3.1-m3
Reporter: Ahti Kitsik
Assigned To: Mark Proctor
Currently it is not possible to check if binder is null or not and getConstraints throws NPE if it is.
Simple sanity check in getContraints would fix it (will be fixed in 3.0.x branch).
Sample for reproducing
final JoinNode joinNode = new JoinNode( 1,
this.tupleSource,
this.objectSource, null);
joinNode.getConstraints(); // Throws NPE
final NotNode notNode = new NotNode( 1,
this.tupleSource,
this.objectSource, null);
notNode.getConstraints(); // throws NPE
--
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, 6 months
[JBoss JIRA] Created: (JBPORTAL-1107) DB2 / Hibernate mapping / error at starting / JBP_INSTANCE table
by Antoine Herzog (JIRA)
DB2 / Hibernate mapping / error at starting / JBP_INSTANCE table
----------------------------------------------------------------
Key: JBPORTAL-1107
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1107
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal Core
Affects Versions: 2.4 Final
Environment: JBP 2.4 on Windows / DB2 8 on Linux RedHat
Reporter: Antoine Herzog
Assigned To: Julien Viet
Priority: Minor
When the portal starts, there are some errors with some types used in portal, that don't fit with hibernate + DB2.
Error : "ERROR [org.hibernate.util.JDBCExceptionReporter] DB2 SQL error: SQLCODE: -204,..."
Error 204 is : "The object identified by _name_ is not found in the database".
Some tables cannot be created, because the fields mapping is not correct.
A string type (default type) with length 50000000 cannot be created in DB2, hence the whole table is not created.
the problem is in : jboss-portal.sar\conf\hibernate_db2\instance\domain.hbm.xml
The property definition : length="50000000" (and default type="string") is not working with DB2.
type="text" is working (Hibernate put it as a CLOB in the database, which is 2Go caractere field).
To check : if this is compatible with other DB mapping.
If not, propose a special domain.hbm.xml for DB2 ? or documentation explaination for this special case.
--
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, 6 months
[JBoss JIRA] Created: (JBPORTAL-1105) <p:theme/> mangles HTML assets defined in portal-themes.xml
by Byron McCollum (JIRA)
<p:theme/> mangles HTML assets defined in portal-themes.xml
-----------------------------------------------------------
Key: JBPORTAL-1105
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1105
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal Theme
Affects Versions: 2.6.DR1, 2.4 Final
Environment: Mac OS X 10.4.8, JBoss Portal + JBoss AS (2.4)
Mac OS X 10.4.8, JBoss Portal + JBoss AS (2.6 DR1)
Reporter: Byron McCollum
Assigned To: Julien Viet
HTML assets defined in portal-themes.xml are being mangled when output from <p:theme/> tag in layout.
My empty script tags with src attributes are being converted to self closing script tags. This is invalid, and causes some use agents (IE currently, and soon to be WebKit and Gecko) to think that everything after the script tag is JavaScript source code, so the whole page ends up being rendered as a blank page. To get around this, I am basically bypassing the use of themes and just hard coding my links into the layout, which defeats the purpose of decoupling the two.
Other annoying issues:
• Double quotes being changed to single quotes.
• Extraneous spaces between attributes. (Look between script and src)
• Missing attributes (charset is missing)
For example, in portal-themes.xml I have this HTML asset in my theme...
<script type="text/javascript" charset="utf-8" src="/themes/mytheme/scripts/lib/overlib.js"></script>
The output in the layout looks like this...
<script src='/portal-core/themes/mytheme/scripts/lib/overlib.js' type='text/javascript' />
More Information:
http://ajaxian.com/archives/why-doesnt-script-work
http://webkit.org/blog/?p=68
--
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, 6 months
[JBoss JIRA] Created: (JBAS-3779) maxSession=n paramter results in executing N+1 MDB's at the same time
by Evgueni Smoliar (JIRA)
maxSession=n paramter results in executing N+1 MDB's at the same time
---------------------------------------------------------------------
Key: JBAS-3779
URL: http://jira.jboss.com/jira/browse/JBAS-3779
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMS service
Affects Versions: JBossAS-4.0.5.GA
Environment: JBoss 4.0.5.GA JDK 1.5.0_09 on XP
Reporter: Evgueni Smoliar
Assigned To: Adrian Brock
I would like to limit number of concurrent MDB invocations by specifying following configuration lines:
<activation-config-property>
<activation-config-property-name>
maxSession
</activation-config-property-name>
<activation-config-property-value>
2
</activation-config-property-value>
</activation-config-property>
JBoss always execute 1 MDB more than it was specified in the configuration. I check it using logging and calling listInProcessMessages
--
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, 6 months