[rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue

Davide Sottara dsotty at gmail.com
Wed Dec 18 02:41:54 EST 2013


Adarsh,
CR1 is "candidate release 1" and is available from the JBoss Maven
Repositories. 5.6.0.Final will probably be released this week.
There are quite a few internal differences between 5.3 and 5.6, but as
far as I know the APIs have remained the same,
so it should be possible to switch almost effortlessly. Others may be
able to comment on their upgrade experience.
Ruleflows, however, have been informally deprecated in favor of proper
bpmn business processes for a while, so not much
was added there, but they should still be supported in 5.6. 
Also remember that even 5.6, while a bit more robust from that
perspective, is not guaranteed to be 100% thread safe.
Davide


On 12/17/2013 07:00 AM, adarsh.chaini at hsbcib.com wrote:
> Davide,
>
> Thanks for your reply on this.What does  CR1stands for in 5.6.0.CR1and
>  can someone point me to the  release life cycle timelines?.
>  Also the important aspect is  are 5.6.0.CR1and *5.5.0.Final*
>  versions backward compatible to 5.3.0.Final and  fully regressed ?
>
>  Is there any documentation that  describes the major changes  like
> this .We are mostly using the rule engine  with the rule flow aspects
> of the product
>
> Thanks and regards,
>
> *Adarsh CHAINI *
>
>
> From: 	Davide Sottara <dsotty at gmail.com>
> To: 	rules-users at lists.jboss.org
> Date: 	14/12/2013 19:56
> Subject: 	Re: [rules-users] Drools KB Object hierarchy Serilisation
> and Deserialisation thread safety issue
> Sent by: 	rules-users-bounces at lists.jboss.org
>
>
> ------------------------------------------------------------------------
>
>
>
> As far as I know, older versions of Drools were not guaranteed to be
> thread-safe,
> and the whole (de)serialization subsystem has been upgraded since
> 5.3.0.Final.
> Could you try a later version such as 5.5.0.Final or 5.6.0.CR1?
>
> Bugs and issues are usually reported using JIRA (community) or
> Bugzilla (product)
> You can find more information on how to report/contribute here:_
> __http://www.jboss.org/contribute_
> or in the drools documentation, chapter 1.2
>
> Davide
>
> On 12/13/2013 12:39 PM, _adarsh.chaini at hsbcib.com_
> <mailto:adarsh.chaini at hsbcib.com>wrote:
> Hi,
>
> We  have found that  some of the drools classes are not thread safe
> and hence causing the whole KB serialisation  and deserialisation
>  issues  in a highly concurrent  distributed cluster.
>
> The below is an example of one of the instances we have come across
> where  the  usage of a  non thread safe collection as instance
> variables has caused the issue.
>
> Could someone look into this and advise:
>
> 1) If this has been reported /identified and logged somewhere  as an
> issue already
> 2)If  there has been  any fix to problems like this in  later versions
> of * 5.3.0.Final ?.*
> 3)If not fixed already what  is the process to initiate a fix.
>
> Caused by: java.io.InvalidObjectException: Illegal mappings count: -1
>        *at java.util.HashMap.readObject(**_HashMap.java:1130_**)*
>        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:43_)
>        at java.lang.reflect.Method.invoke(_Method.java:601_)
>        at
> java.io.ObjectStreamClass.invokeReadObject(_ObjectStreamClass.java:1004_)
>        at
> java.io.ObjectInputStream.readSerialData(_ObjectInputStream.java:1891_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1796_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)*
>        at
> org.jbpm.workflow.core.DroolsAction.readExternal(**_DroolsAction.java:61_**)*
>        at
> org.jbpm.workflow.core.impl.DroolsConsequenceAction.readExternal(_DroolsConsequenceAction.java:49_)
>        at
> java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at
> org.drools.rule.JavaDialectRuntimeData.readExternal(_JavaDialectRuntimeData.java:182_)
>        at
> java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at java.util.HashMap.readObject(_HashMap.java:1155_)
>        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:43_)
>        at java.lang.reflect.Method.invoke(_Method.java:601_)
>        at
> java.io.ObjectStreamClass.invokeReadObject(_ObjectStreamClass.java:1004_)
>        at
> java.io.ObjectInputStream.readSerialData(_ObjectInputStream.java:1891_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1796_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at
> org.drools.rule.DialectRuntimeRegistry.readExternal(_DialectRuntimeRegistry.java:59_)
>        at
> java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at org.drools.rule.Package.readExternal(_Package.java:197_)
>        at
> java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at java.util.HashMap.readObject(_HashMap.java:1155_)
>        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:43_)
>        at java.lang.reflect.Method.invoke(_Method.java:601_)
>        at
> java.io.ObjectStreamClass.invokeReadObject(_ObjectStreamClass.java:1004_)
>        at
> java.io.ObjectInputStream.readSerialData(_ObjectInputStream.java:1891_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1796_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at
> org.drools.common.AbstractRuleBase.readExternal(_AbstractRuleBase.java:270_)
>        at
> org.drools.reteoo.ReteooRuleBase.readExternal(_ReteooRuleBase.java:223_)
>        at
> org.drools.impl.KnowledgeBaseImpl.readExternal(_KnowledgeBaseImpl.java:116_)
>        at
> java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_)
>        at
> java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_)
>        at
> java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_)
>        at
> java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_)
>        at
> com.hsbc.gbm.dsl.domain.DSLRuleSet$Serializer.createInstance(_DSLRuleSet.java:328_)
>        at
> com.hsbc.gbm.dsl.domain.DSLRuleSet$Serializer.createInstance(_DSLRuleSet.java:1_)
>        at
> com.hsbc.gbm.dsl.domain.AbstractSerializer.deserialize(_AbstractSerializer.java:144_)
>
> Thanks and regards,
> *
> Adarsh CHAINI *
> SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc
> 8 Canada Square, London E14 5HQ, UK
> _______________________________________________
>
>
> 	
> Phone	Int: (0)79914720 Ext: +44 (0)20 79914720
> Mobile	+44(0)7595530105
> Email	_adarsh.chaini at hsbcib.com_ <mailto:adarsh.chaini at hsbcib.com>
>
>
>
>
> _______________________________________________
> Protect our environment - please only print this if you have to!
>
>
>
>
>
> ************************************************************
> HSBC Bank plc may be solicited in the course of its placement efforts
> for a new issue, by investment clients of the firm for whom the Bank
> as a firm already provides other services. It may equally decide to
> allocate to its own proprietary book or with an associate of HSBC
> Group. This represents a potential conflict of interest. HSBC Bank plc
> has internal arrangements designed to ensure that the firm would give
> unbiased and full advice to the corporate finance client about the
> valuation and pricing of the offering as well as internal systems,
> controls and procedures to identify and manage conflicts of interest.
>
> HSBC Bank plc
> Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
> Registered in England - Number 14259
> Authorised by the Prudential Regulation Authority and regulated by the
> Financial Conduct Authority and the Prudential Regulation Authority
> ************************************************************
> ----------------------------------------- SAVE PAPER - THINK BEFORE
> YOU PRINT! This transmission has been issued by a member of the HSBC
> Group "HSBC" for the information of the addressee only and should not
> be reproduced and/or distributed to any other person. Each page
> attached hereto must be read in conjunction with any disclaimer which
> forms part of it. Unless otherwise stated, this transmission is
> neither an offer nor the solicitation of an offer to sell or purchase
> any investment. Its contents are based on information obtained from
> sources believed to be reliable but HSBC makes no representation and
> accepts no responsibility or liability as to its completeness or
> accuracy.
>
> _______________________________________________
> rules-users mailing list
> _rules-users at lists.jboss.org_ <mailto:rules-users at lists.jboss.org>
> _https://lists.jboss.org/mailman/listinfo/rules-users_
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> ************************************************************
> HSBC Bank plc may be solicited in the course of its placement efforts
> for a new issue, by investment clients of the firm for whom the Bank
> as a firm already provides other services. It may equally decide to
> allocate to its own proprietary book or with an associate of HSBC
> Group. This represents a potential conflict of interest. HSBC Bank plc
> has internal arrangements designed to ensure that the firm would give
> unbiased and full advice to the corporate finance client about the
> valuation and pricing of the offering as well as internal systems,
> controls and procedures to identify and manage conflicts of interest.
>
> HSBC Bank plc
> Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
> Registered in England - Number 14259
> Authorised by the Prudential Regulation Authority and regulated by the
> Financial Conduct Authority and the Prudential Regulation Authority
> ************************************************************
> ----------------------------------------- SAVE PAPER - THINK BEFORE
> YOU PRINT! This transmission has been issued by a member of the HSBC
> Group "HSBC" for the information of the addressee only and should not
> be reproduced and/or distributed to any other person. Each page
> attached hereto must be read in conjunction with any disclaimer which
> forms part of it. Unless otherwise stated, this transmission is
> neither an offer nor the solicitation of an offer to sell or purchase
> any investment. Its contents are based on information obtained from
> sources believed to be reliable but HSBC makes no representation and
> accepts no responsibility or liability as to its completeness or
> accuracy.
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131218/a7af9147/attachment-0001.html 


More information about the rules-users mailing list