I forgot to mention that you will have to change your code a little bit. Instead of passing a KnowledgeBuilderConfiguration to the agent, you will need to add a configuration option to the KnowledgeAgentConfiguration object your are using:<div>
<br></div><div><div>aconf.setProperty("drools.agent.useKBaseClassLoaderForCompiling", "true");</div><div><br></div><div>This way you are telling the agent to use the kbase's internal CL (We may set this as the default value I think).</div>
<div><br></div><div>If you want to try my fix, this is what you need to do:</div><div><br></div><div>- Prerequisites: java 1.5 or grater, maven 3.0.3 or grater and git</div><div>1.- $git clone git://<a href="http://github.com/droolsjbpm/drools.git">github.com/droolsjbpm/drools.git</a> drools (It will download all the sources and place them in "drools" directory")</div>
<div>2.- Get the fix from my repo. Fortunately, the fix is just one file: <a href="https://raw.github.com/esteban-aliverti/drools/61c2110df8c55c67ff532491865b3f28f368e8db/drools-core/src/main/java/org/drools/agent/impl/KnowledgeAgentImpl.java">https://raw.github.com/esteban-aliverti/drools/61c2110df8c55c67ff532491865b3f28f368e8db/drools-core/src/main/java/org/drools/agent/impl/KnowledgeAgentImpl.java</a></div>
<div>3.- Replace the file /drools-core/src/main/java/org/drools/agent/impl/KnowledgeAgentImpl.java in your working copy with the file you downloaded in the previous step.</div><div>4.- $mvn clean install -DskipTests=true (this will compile everything and install the generated artifacts in your local maven repo) This could take some time.</div>
<div>5.- If in your project you are already using maven, then you just need to update the version of your dependencies to 5.4.0-SNAPSHOT. If you are not using maven, then you need to go to your local repo an get the generated drools-core-5.4.0-SNAPSHOT.jar and use it.</div>
<div><br></div><div>Best Regards,</div><div> </div><div><br></div><div><br></div><div>Best Regards,</div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>
- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Tue, Feb 21, 2012 at 7:52 PM, Hrumph <span dir="ltr"><<a href="mailto:Herman.Post@imail.org">Herman.Post@imail.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks Esteban. I’m not too adept with Git but will see what I can do.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Herm<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Esteban [via Drools] [mailto:<a href="http://user/SendEmail.jtp?type=node&node=3764501&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>] <br>
<b>Sent:</b> Tuesday, February 21, 2012 11:10 AM</span></p><div class="im"><br><b>To:</b> Herman Post<br><b>Subject:</b> Re: [rules-users] KnowledgeAgent custom class loader not working for PKG resources<u></u><u></u></div>
<p></p></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I added some comments to the issue and provided a possible solution to it. I'm waiting for the review and comments from the core developers. <u></u><u></u></p>
<div class="im"><div><p class="MsoNormal">In the meantime, if you have some skills with maven and git and you don't want to wait, you can create your own version of drools applying the provided patch to see if everything is ok.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"></p><div class="im">Best Regards, <br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>
Esteban Aliverti<br>
</div><div class="im">- Developer @ <a rel="nofollow" link="external">click here</a>.<br><a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" link="external" target="_blank"><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">NAML</span></a> <u></u><u></u></div>
<p></p></div></div><div class="HOEnZb"><div class="h5">
        
<br><hr align="left" width="300">
View this message in context: <a href="http://drools.46999.n3.nabble.com/KnowledgeAgent-custom-class-loader-not-working-for-PKG-resources-tp3746456p3764501.html" target="_blank">RE: [rules-users] KnowledgeAgent custom class loader not working for PKG resources</a><br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" target="_blank">Drools: User forum mailing list archive</a> at Nabble.com.<br></div></div><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></blockquote></div><br></div>