[rules-users] Url Resource Guvnor connection + ProtocolException
Stephen Masters
stephen.masters at me.com
Wed Jun 5 10:21:21 EDT 2013
There's a pretty good chance that you're being redirected as a result of not being authenticated.
As a tip on diagnosing, try using curl from the server you're deploying on, to see what you get, like so:
Find out what happens with unauthenticated access:
curl http://whatevertheurlis/
And authenticated access:
curl -u admin:admin http://whatevertheurlis/
That might indicate what's going on.
On 5 Jun 2013, at 13:51, abhinay_agarwal <abhinay_agarwal at infosys.com> wrote:
> Hey,
>
> I am trying to reach my guvnor repository using a very simple block of code
>
> UrlResource urlResource = new UrlResource(url);
> urlResource.setBasicAuthentication("enabled");
> urlResource.setUsername("admin");
> urlResource.setPassword("admin");
> kbuilder.add(urlResource, ResourceType.PKG);
>
>
> Now, this code works fine on standalone, but as soon as the code is deployed
> with the application, it throws this exception:
>
> *java.net.ProtocolException: Server redirected too many times (20)*
>
> I know there is some problem with server side coding, but I am not able to
> get it.
>
> I guess, when I am trying to access the guvnor link through my application,
> it gets into an infinite redirection and not able to come out from it.
>
> Might be the Authenticator class of java.net is called and
> getPasswordAuthentication() fails, but since I am not an expertise in this
> locale so facing issue to resolve it.
>
> Any help is welcome.
>
> Regards,
> Abhinay
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Url-Resource-Guvnor-connection-ProtocolException-tp4024145.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list