[
https://issues.jboss.org/browse/DROOLS-147?page=com.atlassian.jira.plugin...
]
Davide Sottara commented on DROOLS-147:
---------------------------------------
The builders you are trying to use are Drools 4 legacy and have long been deprecated, they
are not part of the Drools 5.5 APIs.
In 5.5, the StateLESS session internal implementation does not have a process runtime,
which is causing your NPE.
In fact, Drools and jBPM have been split, so now you would have to import jBPM **5.4.0**
(matching Drools 5.5.0) as one of your dependencies.
If you are making such a radical upgrade, I'd recommend to do a full one. Or even
possibly wait for the upcoming Drools 6, which will make 5.5 obsolete anyway.
I wouldn't consider this a bug at all.
Best
Davide
This said, try this - AT YOUR OWN RISK :) - after adding jbpm as a dependency
rule "Hack Init Process Runtime"
salience 99999999
when
then
((AbstractWorkingMemory) drools.getWorkingMemory()).setKnowledgeRuntime( new
StatefulKnowledgeSessionImpl( (ReteooWorkingMemory) drools.getWorkingMemory() ) );
end
After upgrading the drools jars to 5.5.0 from 5.0.1 we are unable to
execute the rule flows.
--------------------------------------------------------------------------------------------
Key: DROOLS-147
URL:
https://issues.jboss.org/browse/DROOLS-147
Project: Drools
Issue Type: Component Upgrade
Security Level: Public(Everyone can see)
Affects Versions: 5.5.0.Final
Environment: Websphere application server 6.1
Reporter: Prashant Hariharan
Assignee: Mark Proctor
Attachments: rfissue.zip
After upgrading the drools jars to 5.5.0 from 5.0.1 we are unable to execute the rule
flows. The drools engine throws a null pointer exception the stackrace of which is as
follows : The stacktrace of the same can be seen below: Exception executing consequence
for rule "Initialisation For All" in
com.mastek.groupelixir.schemeuw.rules.controller: java.lang.NullPointerException at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297) at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221) at
org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456) at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710) at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:684) at
org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:206)
After some detailed analysis the problem seems to be with the usage of Rule
base,PacakgeBuilder and StatlessSessions as opposed to the set of
KnowledgeBaes,KowledgeBuilders and StatelessKnowledgeSessions for executing the rule
flows. The rule flow,drl and the standalone program has been attached for reference. The
problem is that the application still uses the packagebuilder and it will be difficult to
upgrade it to knowledge builders So is there any workaround for the same?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira