By the way, RuleAgent is kind of deprecated. You should start using KnowledgeAgent instead.

Best,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2010/11/26 Michael Anstis <michael.anstis@gmail.com>
Hi,

As from 5.1 (I believe) Guvnor authenticates requests and you therefore need to provide user id and password in your change set.

This might help: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-modify-changeset-xml-in-guvnor-td1404619.html

Cheers,

Mike

2010/11/26 Achyutha, Venkata <Venkata.Achyutha@t-mobile.com>

Hi,

This error would be basic one but it’s very frustrating to me to debug this, few days ago it use to work.

I deployed guvnor 5.1.1 war into web logic 10.3, created package with 4 rules, build and deploy, got package url.

Started using package url in properties file and passing file to RuleAgent api, suddenly it started giving HTTP response code: 401 for URL.

Any thoughts on this issue would be greatly appreciated.

 

Below is the content of properties file and Client code.

{url=http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST  , 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}

 

Error:

RuleAgent(myrules) INFO (Fri Nov 26 15:19:00 IST 2010): Configuring with newInstance=true, secondsToRefresh=30

RuleAgent(myrules) INFO (Fri Nov 26 15:19:00 IST 2010): Configuring package provider : URLScanner monitoring URLs:  http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST with local cache dir of C:\Installed\workspaces\drools\POC\bin

RuleAgent(myrules) EXCEPTION (Fri Nov 26 15:19:01 IST 2010): Server returned HTTP response code: 401 for URL: http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST. Stack trace should follow.

java.io.IOException: Server returned HTTP response code: 401 for URL: http://10.117.39.51:7001/Guvnor5.1.1/org.drools.guvnor.Guvnor/package/com.tmobile.pos.rules/LATEST

 

Client Code: (getting error at 3rd line)

File file = new File("C:\\guvnor.properties");             

properties.load(new FileInputStream(file));

RuleAgent agent = RuleAgent.newRuleAgent(properties);

RuleBase ruleBase = agent.getRuleBase();       

WorkingMemory workingMemory = ruleBase.newStatefulSession();

 

 

Thanks

Kumar

 


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users