Re: [rules-users] RuleBase.removeRule leads to NoClassDefFoundError

2009-05-29 Thread Christian Nedregaard

Hi.

I work with Steinar.

As he mentioned upgrading to 5.0 is not an option for us.

Now that we have worked around this problem during compilation (by switching
off beta node sharing, see https://jira.jboss.org/jira/browse/JBRULES-2098)
we are starting to see similiar problem during stateless session execution:

java.lang.NoClassDefFoundError:
com/telenor/cos/domain/core/productoffer/rules/subscriptiontype/Rule_Required
SubscriptionTypes_11084_0
at
com.telenor.cos.domain.core.productoffer.rules.subscriptiontype.Rule_RequiredSubscriptionTypes_11084_0Eval0In
voker.evaluate(Unknown Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:77)
at
org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:148)
at
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:110) 
at
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
 
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145) 
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:299)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162) 
at org.drools.reteoo.Rete.assertObject(Rete.java:175) 
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
at
org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:160)

We are seeing the same thing as during compilation: TupleNodes associated
with removed rules seems to have been left orphaned in the rete tree. 

I have not been able to find a workaround for this. If this has been fixed
in 5.0: Does anybody have any pointers or advice that can help us to create
a local patch for 4.0.7 for this? Any help would be much appreciated!

Kind regards
Christian


Steinar Haugen wrote:
 
 Hi Edson,
 Thanks for your reply. Unfortunately, that is not yet an option for us,
 since we're still on JDK 1.4.2.
 

-- 
View this message in context: 
http://www.nabble.com/RuleBase.removeRule-leads-to-NoClassDefFoundError-tp23657476p2368.html
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] RuleBase.removeRule leads to NoClassDefFoundError

2009-05-26 Thread Steinar Haugen
Hi Edson,
Thanks for your reply. Unfortunately, that is not yet an option for us,
since we're still on JDK 1.4.2.
We're working on upgrading to JDK 1.6, but that requires an upgrade of our
different client applications as well (~25 apps with varying degree of
maintenance personell assigned), and will probably not be in place until
earliest Q4 this year (i.e. about six months). Until that time, we'll have
to live with the current situation.
Regards,
Steinar Haugen

2009/5/25 Edson Tirelli tire...@post.com


Hi Steiner,

Did you tried Drools 5? We fixed a couple bugs related to package
 add/remove in the Drools 5 codebase.

[]s
Edson

 2009/5/25 Steinar Haugen steinar.hau...@gmail.com



 We found the reason for this behaviour, it is a bug which we reported in
 Jira:
 https://jira.jboss.org/jira/browse/JBRULES-2098

 See the Jira issue for details, code examples reproducing the issue and
 for
 a workaround.

 Regards,
 Steinar Haugen
 --
 View this message in context:
 http://www.nabble.com/RuleBase.removeRule-leads-to-NoClassDefFoundError-tp23657476p23707100.html
 Sent from the drools - user mailing list archive at Nabble.com.

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
  Edson Tirelli
  JBoss Drools Core Development
  JBoss, a division of Red Hat @ www.jboss.com

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] RuleBase.removeRule leads to NoClassDefFoundError

2009-05-25 Thread Steinar Haugen


We found the reason for this behaviour, it is a bug which we reported in
Jira:
https://jira.jboss.org/jira/browse/JBRULES-2098

See the Jira issue for details, code examples reproducing the issue and for
a workaround.

Regards,
Steinar Haugen
-- 
View this message in context: 
http://www.nabble.com/RuleBase.removeRule-leads-to-NoClassDefFoundError-tp23657476p23707100.html
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] RuleBase.removeRule leads to NoClassDefFoundError

2009-05-25 Thread Edson Tirelli
   Hi Steiner,

   Did you tried Drools 5? We fixed a couple bugs related to package
add/remove in the Drools 5 codebase.

   []s
   Edson

2009/5/25 Steinar Haugen steinar.hau...@gmail.com



 We found the reason for this behaviour, it is a bug which we reported in
 Jira:
 https://jira.jboss.org/jira/browse/JBRULES-2098

 See the Jira issue for details, code examples reproducing the issue and for
 a workaround.

 Regards,
 Steinar Haugen
 --
 View this message in context:
 http://www.nabble.com/RuleBase.removeRule-leads-to-NoClassDefFoundError-tp23657476p23707100.html
 Sent from the drools - user mailing list archive at Nabble.com.

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] RuleBase.removeRule leads to NoClassDefFoundError

2009-05-21 Thread Steinar Haugen

Hi,

We're having a problem with runtime rule administration; i.e. using
RuleBase.addRule and RuleBase.removeRule.

We're using Drools 4.0.7 on Sun JDK 1.4.2_11 and inside Weblogic 8.1 sp 6.

Typically we remove a few rules followed by adding a few rules. In some
cases, we receive a NoClassDefFoundError. Stacktrace is provided in attached
file. 

http://www.nabble.com/file/p23657476/stacktrace.txt stacktrace.txt 

The class referenced (i.e. the one not found) is the removed rule.

Has anyone else seen this behaviour?

This seems like such a basic error that we're wondering if we're doing
something wrong here. We have been unable to find anything about this 

To make matters worse, this actually leads to a deadlock. This is because
lock / unlock in version 4.0.7 is not encapsuled in a try / finally block in
AbstractRuleBase.removeRule(), so whenever an error occurs, the lock is not
released. 

I found a Jira issue regarding this, where this issue is addressed and
apparently fixed in an earlier version:
https://jira.jboss.org:8443/jira/browse/JBRULES-603

This fix has been rolled back, however, so this issue is present in version
4.0.7.

We found a workaround for the deadlock by performing lock / unlock
ourselves, since drools will not lock if it has been performed already. 

In addition, we encapsulate rulebase access with a read/write lock to ensure
that whenever the rulebase is updated, no other operation towards it is
performed.

Regards,
Steinar Haugen



-- 
View this message in context: 
http://www.nabble.com/RuleBase.removeRule-leads-to-NoClassDefFoundError-tp23657476p23657476.html
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users