<div dir="ltr">Thanks Genene.<div><br></div><div>In fact I was able to get the cause of my issue. I created a ticket with the explanation and a pull request with a possible solution.</div><div><br></div><div><a href="https://issues.jboss.org/browse/DROOLS-243">https://issues.jboss.org/browse/DROOLS-243</a><br>
</div><div><br></div><div>Thanks,</div><div><br></div><div>Demian</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 27, 2013 at 12:26 PM, Genene Geda <span dir="ltr">&lt;<a href="mailto:ggeda@ghx.com" target="_blank">ggeda@ghx.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi-,<br>
I think I had similar issue and resolved by looking at one of these:<br>
<br>
1. How the changes set is loaded:<br>
<br>
Resource changeset = ResourceFactory.newFileResource(changeSetFilePath);<br>
                        //.newClassPathResource(changeSetPath);<br>
<br>
2.If the package not yet built,  In GUVNOR, I go to &#39;knowledgebase&#39;/ click on you package/click on the &#39;edit&#39; tab on the right/ click build package  ( I also do create snapshot but may not be necessary ).<br>

<br>
See if it helps.<br>
<span class="HOEnZb"><font color="#888888"><br>
G-<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of calcacuervo<br>

Sent: Monday, August 26, 2013 10:26 PM<br>
To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
Subject: [rules-users] Problem with PKG from guvnor<br>
<br>
Hi Guys,<br>
<br>
I am having a problem using Drools 5.5.<br>
<br>
Basically, I have a ksession in stream mode.<br>
<br>
I have a rule with an event, like this<br>
<br>
when<br>
        myfact: EventA( main &gt; 21 ) over window:length (1)<br>
        myfact2 : EventA( main &lt;= 21 , this before myfact ) over window:length (2)<br>
<br>
I also use a KnowledgeAgent and apply a changeset.<br>
<br>
If I declare this rule directly from the changeset, as a Classpath resource, with resource type DRL, it seems to work fine (the kbase compiles!).<br>
<br>
But If I have the rule in a guvnor package, and I put the PKG link in my changeset, I am getting an error:<br>
<br>
Caused by: java.lang.NullPointerException<br>
        at<br>
org.drools.base.evaluators.BeforeEvaluatorDefinition$BeforeEvaluator.getInterval(BeforeEvaluatorDefinition.java:268)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
        at<br>
org.drools.rule.constraint.EvaluatorConstraint.getInterval(EvaluatorConstraint.java:100)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
        at<br>
org.drools.reteoo.builder.BuildUtils.gatherTemporalRelationships(BuildUtils.java:326)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
        at<br>
org.drools.reteoo.builder.BuildUtils.calculateTemporalDistance(BuildUtils.java:292)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
        at<br>
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:119)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
        at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:113)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
        at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:445)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
<br>
It seems that that getOperator() is null in this evaluation:<br>
            if ( this.getOperator().isNegated() ) {<br>
<br>
I debugged a bit, and it seems the evaluator comes in serialized from guvnor&#39;s package.But in case of getting directly the classpath resource, it compiles the package and it gets the real operator ok (Operator = &#39;before&#39;)<br>

<br>
Do you have any idea of why it could be happening? May I be doing something wrong? Is this a bug in guvnor?<br>
<br>
Thanks in advance!<br>
<br>
Demian<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Problem-with-PKG-from-guvnor-tp4025687.html" target="_blank">http://drools.46999.n3.nabble.com/Problem-with-PKG-from-guvnor-tp4025687.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>