<div><br></div> Looks like a bug in the merging algorithm for types. Can any of you please open a JIRA with a small test case and/or instructions on how to reproduce plz?<div><br></div><div> Thank you,</div><div> Edson<br>
<br><div class="gmail_quote">On Fri, Dec 9, 2011 at 6:34 PM, jmgreen <span dir="ltr"><<a href="mailto:john.green@hp.com">john.green@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 was able to work around this problem by filtering out the KnowledgePackage<br>
containing my NormalizedEvent. In Drools 5.2.0 there was no problem adding<br>
this KnowledgePackage multiple times but apparently 5.3.0 doesn't cope with<br>
it well. I'm still not sure if that is a feature or a defect in 5.3.0.<br>
In any event doing the following make the exception go away.<br>
<br>
I'm still curious if this is a feature or a defect in 5.3.0. Any thoughts<br>
or opinions regarding are welcome.<br>
<div class="im"><br>
<br>
String globals = readDrlfile("globals.drl");<br>
String newRules = readDrlfile("rulesToAdd.drl");<br>
knowledgeBuilder.add(ResourceFactory.newReaderResource(new<br>
StringReader(globals + newRules)));<br>
if (knowledgeBuilder.hasErrors()) {<br>
throw exception ...<br>
}<br>
// No exception so compile succeeded --- BTW, it's using JANINO<br>
</div> Collection<KnowledgePackage> pkgs =<br>
knowledgeBuilder.getKnowledgePackages();<br>
<br>
pkgs=filterOutAnyPackageThatHasNoRulesAndNameMatchingNormalizeEventPackageName(pkgs);<br>
knowledgeBase.addKnowledgePackages(pkgs); // NO ERROR ANYMORE<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-5-3-0-Final-throws-RuntimeDroolsException-Unable-to-merge-resource-attribute-for-type-den-tp3573815p3574420.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-5-3-0-Final-throws-RuntimeDroolsException-Unable-to-merge-resource-attribute-for-type-den-tp3573815p3574420.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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>