By the way, RuleAgent is kind of deprecated. You should start using KnowledgeAgent instead.<div><br></div><div>Best,<br clear="all"><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">2010/11/26 Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br><br>As from 5.1 (I believe) Guvnor authenticates requests and you therefore need to provide user id and password in your change set.<br><br>This might help: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-modify-changeset-xml-in-guvnor-td1404619.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/How-to-modify-changeset-xml-in-guvnor-td1404619.html</a><br>


<br>Cheers,<br><br>Mike<br><br><div class="gmail_quote">2010/11/26 Achyutha, Venkata <span dir="ltr">&lt;<a href="mailto:Venkata.Achyutha@t-mobile.com" target="_blank">Venkata.Achyutha@t-mobile.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div><div></div><div class="h5">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">Hi, </span></p>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">This error would be basic one
but it’s very frustrating to me to debug this, few days ago it use to
work.</span></p>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">I deployed guvnor 5.1.1 war into
web logic 10.3, created package with 4 rules, build and deploy, got package
url.</span></p>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">Started using package url in
properties file and passing file to RuleAgent api, suddenly it started giving </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:red">HTTP response
code: 401 for URL.</span></p>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">Any thoughts on this issue would
be greatly appreciated.</span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">Below
is the content of properties file and Client code.</span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:rgb(0, 176, 240)">{url=<a href="http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST" target="_blank">http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST</a> 
, name=myrules, username=weblogic, poll=30, newInstance=true,
localCacheDir=C:\Installed\workspaces\drools\POC\bin,
workspacepath=C://bea/user_projects/domains/posdomain, password=weblogic123,
enableBasicAuthentication=true}</span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black"> </span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">Error:</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:red">RuleAgent(myrules) INFO (Fri Nov 26
15:19:00 IST 2010): Configuring with newInstance=true, secondsToRefresh=30</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:red">RuleAgent(myrules) INFO (Fri Nov 26
15:19:00 IST 2010): Configuring package provider : URLScanner monitoring
URLs: 
<a href="http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST" target="_blank">http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST</a>
with local cache dir of C:\Installed\workspaces\drools\POC\bin</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:red">RuleAgent(myrules) EXCEPTION (Fri Nov 26
15:19:01 IST 2010): Server returned HTTP response code: 401 for URL:
<a href="http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST" target="_blank">http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST</a>.
Stack trace should follow.</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal"><u><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:navy">java.io.IOException</span></u><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:red">: Server returned
HTTP response code: 401 for URL:
<a href="http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST" target="_blank">http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST</a></span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>




<p class="MsoNormal"> </p>

<p class="MsoNormal">Client Code: (getting error at 3<sup>rd</sup> line)</p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">File file = </span><b><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:rgb(127, 0, 85)">new</span></b><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black"> File(</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:rgb(42, 0, 255)">&quot;C:\\guvnor.properties&quot;</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">);              </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>




<p class="MsoNormal"><u><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">properties.load(</span></u><b><u><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:rgb(127, 0, 85)">new</span></u></b><u><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">
FileInputStream(file))</span></u><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">;</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">RuleAgent agent = RuleAgent.<i>newRuleAgent</i>(properties);</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>




<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">RuleBase ruleBase = agent.getRuleBase();        </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;"></span></p>




<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black;background:none repeat scroll 0% 0% silver">WorkingMemory</span><span style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black"> workingMemory =
ruleBase.newStatefulSession();</span></p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)"> </span></p>

<div>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">Thanks</span></p>

<p class="MsoNormal"><span style="color:rgb(31, 73, 125)">Kumar</span><b><span style="font-size:10pt;color:rgb(51, 51, 204)"></span></b></p>

</div>

<p class="MsoNormal"> </p>

</div>

</div>


<br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<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>