Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8145093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:33:34+00:00 2026-06-06T13:33:34+00:00

We are using: • Drools Execution Server that came with Drools 5.0.x • Drools

  • 0

We are using:

• Drools Execution Server that came with Drools 5.0.x
• Drools Guvnor 5.2 configured with active directory

The execution server and guvnor run on the same Tomcat and use the same port.

With the execution server you can have a listener for each package within the configuration file. I have two such files, from-file-system.properties that points to a local directory where a drools binary package is manually deployed. This works fine.

But I try to use with-guvnor.properties which points to a package binary on 5.3 Guvnor. Here is the file:

name=ndipiazza
newInstance=true
# Absolute path of the directory containing pc.drl: placeholder replaced by Ant.
url=http://localhost:9109/drools-guvnor/rest/packages/NDD_Test/binary
poll=10

I get the following error:

RuleAgent(ndipiazza) INFO (Mon Jun 18 18:11:32 EDT 2012): Configuring package provider : URLScanner monitoring URLs:  http://localhost:9109/drools-guvnor/rest/packages/NDD_Test/binary
RuleAgent(ndipiazza) WARNING (Mon Jun 18 18:11:34 EDT 2012): Was an error contacting http://localhost:9109/drools-guvnor/rest/packages/NDD_Test/binary. Reponse header: {null=[HTTP/1.1 401 Unauthorized]

Some sort of authorization error very likely related to the active directory configuration within Guvnor 5.2.
This used to work for us just fine with an earlier version of Guvnor.

How can I fix this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:33:36+00:00Added an answer on June 6, 2026 at 1:33 pm

    So we isolated the problem today. Drools Server 5.0.x cannot support a URL endpoint when it has authentication of any sort.

    I reported a bug: https://issues.jboss.org/browse/JBRULES-3554

    Without these changes, this will not work.

    drools-core’s org/drools/agent/HttpClientImpl.java

    These two methods need to have authentication added in (marked by START and END NDD), and obviously switched with your username/password.

    public LastUpdatedPing checkLastUpdated(URL url) throws IOException {
            URLConnection con = url.openConnection();
            HttpURLConnection httpCon = (HttpURLConnection) con;
            try {
    // **** START NDD ***** 
                BASE64Encoder enc = new sun.misc.BASE64Encoder();
                String userpassword = "ad-user" + ":" + "ad-password";
                String encodedAuthorization = enc.encode( userpassword.getBytes() );
                httpCon.setRequestProperty("Authorization", "Basic "+
                      encodedAuthorization);
                // **** END NDD *****             
    
    
    
                httpCon.setRequestMethod( "HEAD" );            
    
    
                String lm = httpCon.getHeaderField( "lastModified" );
                LastUpdatedPing ping = new LastUpdatedPing();
    
                ping.responseMessage = httpCon.getHeaderFields().toString();
    
                if ( lm != null ) {
                    ping.lastUpdated = Long.parseLong( lm );
                } else {
                    long httpLM = httpCon.getLastModified();
                    if ( httpLM > 0 ) {
                        ping.lastUpdated = httpLM;
                    }
                }
    
                return ping;
            } finally {
                httpCon.disconnect();
            }
    
        }
    
        public Package fetchPackage(URL url) throws IOException,
                                            ClassNotFoundException {
            URLConnection con = url.openConnection();
            HttpURLConnection httpCon = (HttpURLConnection) con;
            try {
    
                // **** START NDD ***** 
                BASE64Encoder enc = new sun.misc.BASE64Encoder();
                String userpassword = "ad-user" + ":" + "ad-password";
                String encodedAuthorization = enc.encode( userpassword.getBytes() );
                httpCon.setRequestProperty("Authorization", "Basic "+
                      encodedAuthorization);
                // **** END NDD *****             
    
    
    
    
                httpCon.setRequestMethod( "GET" );
    
                Object o = DroolsStreamUtils.streamIn( httpCon.getInputStream() );
    
                if ( o instanceof KnowledgePackageImp ) {
                    return ((KnowledgePackageImp) o).pkg;
                } else {
                    return (Package) o;
                }
            } finally {
                httpCon.disconnect();
            }
        }
    

    Mystery solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Drools Planner which ships with 21 Jar files in a directory
Using Server.Transfer to show a page that informs the user that the web site
I am facing some issues while serializing objects (I am using JBoss Drools, and
Using Nunit, I want to be able to write a test fixture that will
Using top it's easy to identify processes that are hogging memory and cpu, but
I am using Eclipse with the Drools plugin to create rules. I want to
I am using Drools Planner which takes configuration by XML. The configure method is
The purpose of this quetion is to evaluate the reasonability of using Drools for
I have a project that builds on a framework that uses drools. The model
I am using Drool's resource scanner like so: ResourceChangeScannerConfiguration sconf = ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration(); sconf.setProperty(drools.resource.scanner.interval, 5);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.