It's the right place :)<br><br>It sounds like a bug (to me) :(<br><br>The core engine developers are trawling through a bunch of urgent bugs for other requirements and may not answer here immediately.<br><br>If you've not heard anything in a week of two, I'd go banging on the door again...<br>
<br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 17 April 2012 16:42, Shur, Bob <span dir="ltr"><<a href="mailto:robert.shur@hp.com">robert.shur@hp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm repeating this post because I didn't get an answer last time. Is this the wrong place to report a bug? If so, where is the right place? I'm trying to understand whether this is really a bug or whether I'm doing something wrong.<br>
<br>
I have what looks to me like a Drools bug on a simple drl with declared classes. I'm using version drools-distribution-5.3.0.Final.<br>
<br>
I'm invoking it with this:<br>
<br>
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();<br>
List<Object> facts = new ArrayList<Object>();<br>
ksession.execute( facts );<br>
<br>
=============================<br>
<br>
I get this crash:<br>
<br>
Exception in thread "main" java.lang.NoClassDefFoundError: com/sample/Cap<br>
at ASMAccessorImpl_129541121334339192620.getValue(Unknown Source)<br>
at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:73)<br>
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:103)<br>
at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)<br>
at org.mvel2.MVEL.executeExpression(MVEL.java:952)<br>
...<br>
<br>
==========================<br>
<br>
Here's the drl file:<br>
<br>
package com.sample<br>
<br>
import com.sample.*;<br>
<br>
declare Item<br>
id : int;<br>
end<br>
<br>
declare Priority<br>
name : String;<br>
priority : int;<br>
end<br>
<br>
declare Cap<br>
item : Item;<br>
name : String<br>
end<br>
<br>
rule "split cart into items"<br>
when<br>
then<br>
insert(new Item(1));<br>
insert(new Item(2));<br>
insert(new Item(3));<br>
end<br>
<br>
rule "Priorities"<br>
when<br>
then<br>
insert(new Priority("A", 3));<br>
insert(new Priority("B", 2));<br>
insert(new Priority("C", 5));<br>
end<br>
<br>
rule "Caps"<br>
when<br>
$i : Item()<br>
$p : Priority($name : name)<br>
then<br>
insert(new Cap($i, $name));<br>
end<br>
<br>
rule "test"<br>
when<br>
$i : Item()<br>
Cap(<a href="http://item.id" target="_blank">item.id</a> == $<a href="http://i.id" target="_blank">i.id</a>)<br>
then<br>
System.out.println("Cap");<br>
end<br>
<br>
====================<br>
<br>
Some observations:<br>
- If I comment out any of the insert lines, the crash goes away<br>
- If I change the first field of class Cap to be id:int instead of item:Item and make the corresponding changes, the crash goes away<br>
<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>
</blockquote></div><br>