[JBoss JIRA] Created: (JBRULES-658) Unable to invoke global variable Service from an embedded Function()
by James DePaul (JIRA)
Unable to invoke global variable Service from an embedded Function()
--------------------------------------------------------------------
Key: JBRULES-658
URL: http://jira.jboss.com/jira/browse/JBRULES-658
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Environment: Windows
Reporter: James DePaul
Assigned To: Mark Proctor
Priority: Minor
Trying to invoke a service referenced in a global variable works when invoked from the <consequence> block, but NOT from the function imbeded in the Rule definition - see code sample below:
rule "Shipper Match"
salience 90
when
shipperGI : GateIn ( customerId == "NISSAN", primaryShipperId == "YELLOW" )
then
myService.sendNotification(shipperGI, Constants.SHIPPER_MATCH); // <-- This WORKS
// notifyPartNer(shipperGI, COnstants.SHIPPER_MATCH); <-- This DOES NOT work!
end
// Match found - notify customer
function void notifyPartner(GateIn _event, String _action ) {
System.out.println("Invoking Service for action = " + _action );
//myService.sendNotification(_event, _action);
}
--
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, 3 months
[JBoss JIRA] Created: (JBRULES-763) predicate with multiple variable references causes NPE
by Steve Miner (JIRA)
predicate with multiple variable references causes NPE
------------------------------------------------------
Key: JBRULES-763
URL: http://jira.jboss.com/jira/browse/JBRULES-763
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.6
Environment: Mac OS X 10.4.9 JBoss Rules 3.0.6
Reporter: Steve Miner
Assigned To: Mark Proctor
I'm trying to use a predicate that has multiple references to bound variables all within the same fact. If I use only one variable, it works, but it causes a NPE if I have two references.
// This rule causes a NPE
rule "more friends than enemies"
when
$p : Person($enemies : enemies, $friends : friends -> ($friends.size() > $enemies.size()))
then
System.out.println($p + " has more friends than enemies");
end
stack trace
org.drools.RuntimeDroolsException: java.lang.NullPointerException
at org.drools.rule.PredicateConstraint.isAllowed(Unknown Source)
at org.drools.common.BetaNodeBinder.isAllowed(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)
at com.sample.DroolsTest.main(DroolsTest.java:51)
Caused by: java.lang.NullPointerException
at com.sample.Rule_more_friends_than_enemies_0Predicate0Invoker.evaluate(Rule_more_friends_than_enemies_0Predicate0Invoker.java:13)
... 11 more
--
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, 3 months
[JBoss JIRA] Created: (JBRULES-740) IncompatibleClassChangeError working with ShadowProxy
by Dirk Bergstrom (JIRA)
IncompatibleClassChangeError working with ShadowProxy
-----------------------------------------------------
Key: JBRULES-740
URL: http://jira.jboss.com/jira/browse/JBRULES-740
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.1-m2
Environment: Trunk (revision 10170)
Reporter: Dirk Bergstrom
Assigned To: Mark Proctor
Attachments: Record.java, RLIRecord.java
I'm getting an exception while asserting objects into the working memory. Depending on the timing, I get different stacktraces leading up the same exception on the same generated class. I have 15 rules and three types of objects in the working memory. 2500 User objects, 37 Milestone objects, and 2000 RLI objects. If I assert all the Users and Milestones first, I get the first exception below during assertion of the RLI objects, at the 257th object asserted. If I arrange to skip that particular record, I can assert a few more before another record trips the bug. If I put a try/catch block around the assertion and continue after hitting an exception, I can assert about 1600 of the records successfully, and the others reliably throw (ie. if I try to assert them later). If I assert RLIs first, I get the second stacktrace during assertion of Milestones. Looks like the problem happens during execution of one or more rules. I'll attach the RLI class, and its parent class (which is also the parent of the other two classes).
Exception in thread "RLIs Processor" java.lang.IncompatibleClassChangeError
at net.juniper.dash.data.RLIRecordShadowProxy.hashCode(Unknown Source)
at java.util.HashMap.put(HashMap.java:418)
at java.util.HashSet.add(HashSet.java:194)
at org.drools.reteoo.CollectNode.assertTuple(CollectNode.java:135)
at org.drools.reteoo.CollectNode.assertObject(CollectNode.java:212)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:304)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:176)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at
org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:729)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:548)
Exception in thread "Milestones and NPI Processor" java.lang.IncompatibleClassChangeError
at net.juniper.dash.data.RLIRecordShadowProxy.hashCode(Unknown Source)
at java.util.HashMap.put(HashMap.java:418)
at java.util.HashSet.add(HashSet.java:194)
at org.drools.reteoo.CollectNode.assertTuple(CollectNode.java:135)
at org.drools.reteoo.CompositeTupleSinkAdapter.propagateAssertTuple(CompositeTupleSinkAdapter.java:30)
at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:116)
at org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:147)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:176)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:729)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:548)
at net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:190)
at net.juniper.dash.data.DataSource.populateRecords(DataSource.java:150)
at net.juniper.dash.Updater$DataSourceProcessor.work(Updater.java:181)
at net.juniper.dash.Refresher.run(Refresher.java:70)
--
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, 3 months
[JBoss JIRA] Created: (JBMESSAGING-915) Sybase Persistence Problem - CLUSTERED is a keyword
by Radim Marek (JIRA)
Sybase Persistence Problem - CLUSTERED is a keyword
---------------------------------------------------
Key: JBMESSAGING-915
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-915
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core Persistence
Affects Versions: 1.2.0.GA
Environment: Windows XP/Linux gentoo (dev); Adaptive Server Enterprise/12.5.3/EBF 13339 ESD#7/P/x86_64/Enterprise Linux/ase1253/1951/64-bit/OPT/Fri Mar 24 00:39:11 2006; Java 5 Update 11
Reporter: Radim Marek
Assigned To: Ovidiu Feodorov
examples/config sybase-persistence-service.xml is used using CLUSTERD as column name and it's keyword in Sybase.
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.messaging:service=PostOffice
State: FAILED
Reason: com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near the keyword 'CLUSTERED'.
I Depend On:
jboss.messaging:service=ServerPeer
jboss.jca:service=DataSourceBinding,name=DefaultDS
jboss:service=TransactionManager
Depends On Me:
jboss.messaging.connectionfactory:service=ConnectionFactory
jboss.messaging.connectionfactory:service=NonClusteredConnectionFactory
jboss.messaging.destination:service=Queue,name=DLQ
jboss.messaging.destination:service=Queue,name=ExpiryQueue
jboss.messaging.destination:service=Topic,name=testTopic
jboss.messaging.destination:service=Topic,name=securedTopic
jboss.messaging.destination:service=Topic,name=testDurableTopic
jboss.messaging.destination:service=Queue,name=testQueue
jboss.messaging.destination:service=Queue,name=A
jboss.messaging.destination:service=Queue,name=B
jboss.messaging.destination:service=Queue,name=C
jboss.messaging.destination:service=Queue,name=D
jboss.messaging.destination:service=Queue,name=ex
jboss.messaging.destination:service=Queue,name=PrivateDLQ
jboss.messaging.destination:service=Queue,name=PrivateExpiryQueue
jboss.messaging.destination:service=Queue,name=QueueWithOwnDLQAndExpiryQueue
jboss.messaging.destination:service=Topic,name=TopicWithOwnDLQAndExpiryQueue
jboss.messaging.destination:service=Queue,name=QueueWithOwnRedeliveryDelay
jboss.messaging.destination:service=Topic,name=TopicWithOwnRedeliveryDelay
jboss.messaging.destination:service=Queue,name=testDistributedQueue
jboss.messaging.destination:service=Topic,name=testDistributedTopic
--
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, 3 months
[JBoss JIRA] Created: (JBSER-84) Improve serialization of immutable objects
by Michael Santos (JIRA)
Improve serialization of immutable objects
------------------------------------------
Key: JBSER-84
URL: http://jira.jboss.com/jira/browse/JBSER-84
Project: JBoss Serialization
Issue Type: Feature Request
Reporter: Michael Santos
Assigned To: Clebert Suconic
It is common for objects to contain references to hundreds or thousands of equal immutable object instances, especially java.lang.Number subclasses. Some immutable objects produce a considerable serialized amount of information, such as java.math.BigDecimal. However, there's usually no reason for different instances being used to represent the same value; they only exist due to the way they were produced (parsing &, conversion APIs and JDBC are definitely fine examples of that). Experiments on a particular project have shown replacing all these equal instances by one of them can reduce the serialized size of some objects by half.
Therefore, JBoss Serialization should provide way to allow users to tell it's ok to use the same reference for all these immutable instances and which classes are to be considered immutable and replace them during the writing phase. This would be much more efficient and wouldn't require developers to rewrite their code in order to optimize serialization of some objects. A global way, such as system property, of telling the API to do this by default with the most commonly used Java SE classes would be desirable as well.
--
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, 3 months