What is it you are trying to achieve?<br><br>If the change set contains DRL items the Classes used therein will need to be on your client-side classpath (as explained in Esteban&#39;s blog). If you want to use rules authored in Guvnor and Types declared in (or uploaded to) Guvnor you should use the PKG resource type in your change-set and build the package in Guvnor. I don&#39;t believe you should need to use a custom class loader *unless* you really want only the DRL in your change-set but your model classes only in Guvnor.<br>
<br><div class="gmail_quote">On 25 January 2012 12:27, Voradov <span dir="ltr">&lt;<a href="mailto:madalin100884@yahoo.com">madalin100884@yahoo.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, Esteban, Hi srinivasasanda.<br>
<br>
My opinion regarding the issue posted by srinivasasanda is the following:<br>
<br>
Having the changeset filled with DRL&#39;s taken from local jBoss application<br>
and using it in a java local running knowledge agent which has not added<br>
into the classpath the fact models will fail, of course with that<br>
/&quot;java.lang.RuntimeException: KnowledgeAgent exception while trying to<br>
deserialize KnowledgeDefinitionsPackage&quot;./<br>
<br>
On the other hand, when having changeset.xml set as:<br>
/&lt;add&gt;<br>
        &lt;resource source=&#39;file:D:\rulemaster.drl&#39; type=&#39;DRL&#39; /&gt;<br>
   &lt;/add&gt;/<br>
is working because it seems that the fact models used in defining those<br>
packages are in the classpath.<br>
<br>
REST protocol is used correctly in the changeset.xml.<br>
<br>
The problem with remotely loading pkg\drl files using REST is that you<br>
should somehow specify a custom classloader, like this:<br>
<br>
/KnowledgeBaseConfiguration kbaseConfig =<br>
KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null,<br>
*customClassLoader*);<br>
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);<br>
//kbase with custom classloader<br>
KnowledgeAgentConfiguration aconf =<br>
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();<br>
aconf.setProperty(&quot;drools.agent.useKBaseClassLoaderForCompiling&quot;, &quot;true&quot;);<br>
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(&quot;test<br>
agent&quot;, kbase, aconf);<br>
 kagent.applyChangeSet(ResourceFactory.newFileResource(changeSetFile));/<br>
<br>
My question is: is there any possibility to create the classloader identical<br>
to the remote classloader used by guvnor? if yes, could you please show us<br>
exactly how to load remotelly from guvnor?<br>
<br>
Here, at<br>
<a href="http://ilesteban.wordpress.com/2010/06/22/knowledge-agent-custom-class-loaders/" target="_blank">http://ilesteban.wordpress.com/2010/06/22/knowledge-agent-custom-class-loaders/</a><br>
<a href="http://ilesteban.wordpress.com/2010/06/22/knowledge-agent-custom-class-loaders/" target="_blank">http://ilesteban.wordpress.com/2010/06/22/knowledge-agent-custom-class-loaders/</a><br>
there is described how to create a custom classloader, but it is not<br>
specified how to create it based on the Guvnor&#39;s jar files already existing<br>
there.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/unable-to-update-the-changes-guvnor-rules-to-application-using-changeset-tp3652824p3687543.html" target="_blank">http://drools.46999.n3.nabble.com/unable-to-update-the-changes-guvnor-rules-to-application-using-changeset-tp3652824p3687543.html</a><br>

</font></span><div class="HOEnZb"><div class="h5">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>
</div></div></blockquote></div><br>