7 Replies Latest reply on Dec 6, 2012 12:54 PM by mister_nono

    Error 401 when a java program calls a guvnor package

    mister_nono Newbie

      Hi,

       

      I'm trying to do this tutorial http://planet.jboss.org/post/jboss_drools_how_to_tuning_guvnor_part_1

       

      After have created the rule, I write the java class named GuvnorTest (as in the tutorial).

       

      I create too the Guvnor.properties file with the line :

       

      url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myNewPackage/LATEST

       

      When this program is run, I must have in the java console :

       

      RuleAgent(default) INFO (Wed Jul 23 20:31:28 CEST 2008): Configuring with newInstance=false, secondsToRefresh=-1

      RuleAgent(default) INFO (Wed Jul 23 20:31:28 CEST 2008): Configuring package provider : URLScanner monitoring URLs: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myNewPackage/LATEST

      RuleAgent(default) INFO (Wed Jul 23 20:31:29 CEST 2008): Applying changes to the rulebase.

      RuleAgent(default) INFO (Wed Jul 23 20:31:29 CEST 2008): Adding package called myNewPackage

      kijanowski.eu.Driver

      kijanowski.eu.Car

       

      ... but I have the following lines :

       

      RuleAgent(default) INFO (Mon Dec 03 14:07:12 CET 2012): Configuring with newInstance=false, secondsToRefresh=-1

      RuleAgent(default) INFO (Mon Dec 03 14:07:12 CET 2012): Configuring package provider : URLScanner monitoring URLs:  http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myNewPackage/LATES

      RuleAgent(default) EXCEPTION (Mon Dec 03 14:07:13 CET 2012): Server returned HTTP response code: 401 for URL: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myNewPackage/LATEST. Stack trace should follow.

      java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myNewPackage/LATEST

       

      In fact, the error with the number 401 is displayed.

       

      How to resolve this ?

       

      Thank.