Hi everybody,<div><br></div><div>I am using Guvnor 501M2 on JBoss standalone.</div><div><br></div><div>I am accessing the PKG resource from my java code as follows:</div><div><br></div><div><div>  </div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><span class="Apple-style-span" style="white-space: pre;">              ResourceBundle resourceBundle = ResourceBundle.getBundle(&quot;guvnoragent&quot;);
        Properties props = new Properties();
        props.setProperty(&quot;drools.resource.scanner.interval&quot;, resourceBundle.getString(&quot;poll&quot;));
        ResourceChangeScanner service = ResourceFactory.getResourceChangeScannerService();
        ResourceChangeScannerConfiguration rconf = service.newResourceChangeScannerConfiguration(props);
        service.configure( rconf );

        
        //Agent Conf
        KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
        aconf.setProperty(&quot;drools.agent.scanDirectories&quot;, resourceBundle.getString(&quot;scanDir&quot;));
        aconf.setProperty(&quot;drools.agent.scanResources&quot;, resourceBundle.getString(&quot;scanRsc&quot;));


                BufferedReader bfr=null;
                try {
                        bfr = new BufferedReader(new FileReader(new File(&quot;......Changeset.xml&quot;)));
                } catch (Exception e) {
                        ...
                }
                
                //Agent configurato e con Packages guvnor aggiunti
                KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(&quot;AgentPOC&quot;, aconf);
                Resource csReader = ResourceFactory.newReaderResource(bfr);
                <span class="Apple-style-span" style="background-color: rgb(255, 255, 51);">kagent.applyChangeSet(csReader);&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</span></span></div>
</div><div><span class="Apple-style-span" style="white-space: pre;"><br></span></div></blockquote><span class="Apple-style-span" style="white-space: pre;">Here I get the following exception:</span><div><span class="Apple-style-span" style="white-space: pre;"><br>
</span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="white-space: pre;"><b><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="background-color: rgb(255, 255, 102);">Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: <a href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Test/LATEST">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Test/LATEST</a></span></span></b><span class="Apple-style-span" style="font-size: x-small;">
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1187)
        at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:194)
        at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:130)
        at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:574)
        ... 7 more
[2010:06:160 19:06:671:debug] KnowledgeAgent obtaining pkg resource=[UrlResource path=&#39;<a href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Test/LATEST">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Test/LATEST</a>&#39;]
[2010:06:160 19:06:671:exception]
java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage  
        at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:829)
        at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:627)
        at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:513)
        at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:145)
        at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:130)
        at com.reply.alitalia.mm.poc.engine.RuleService.exeRules(RuleService.java:74)
        at Main.main(Main.java:113)</span>
</span></div></blockquote><div><span class="Apple-style-span" style="white-space: pre; "><br></span></div><div><span class="Apple-style-span" style="white-space: pre;"><b>This is why the server is asking Java the JBoss credentials!!!</b></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="white-space: pre;">How can I pass them?</span></div><div><span class="Apple-style-span" style="white-space: pre;">Should I define them in the changeset.xml?</span></div>
<div><span class="Apple-style-span" style="white-space: pre;">If it is so where can I fine the XSD file ???? I guess there is a tag or an attribute like &quot;password&quot; or something</span></div><div><span class="Apple-style-span" style="white-space: pre;">that will contain date that the Agent has to send to the server....</span></div>
<div><span class="Apple-style-span" style="white-space: pre;">Should I remove the password check from JBoss?</span></div><div><span class="Apple-style-span" style="white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="white-space: pre;">Please let me know.</span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="white-space: pre;">As far as I know there are other people on the IRC CHAT with the same issue.</span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="white-space: pre;">Thank you 4 any help u can give me.</span></div><div><span class="Apple-style-span" style="white-space: pre;"><br>
</span></div><div><span class="Apple-style-span" style="white-space: pre;">Bye,</span></div><div><span class="Apple-style-span" style="white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="white-space: pre;">Massi.</span></div>