search cancel

URI is not absolute error when calling Jenkins plugin 2.3.1 by groovy script

book

Article ID: 255804

calendar_today

Updated On:

Products

CA Continuous Delivery Automation - Automation Engine

Issue/Introduction

When running a pipeline job with the Jenkins plugins, settings job references to the targeted  CDA system must be provided as a URL with a login and a password.

This can be done in two different ways, with a similar result.

1. The Jenkins plugins is configured to use a single CDA definition stored as a "Centralized CDA Connection Parameter".
To access these configurations settings in the Jenkins plugin interface go to Dashboard ==> Configure System ==> Centralized CDA Connection Parameter"

https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0.4/CDA%20Guides/Content/3rdParty/Jenkins/jenkinsConfiguringConnectionDetails.htm

This parameters must be set by the Jenkins application administrator.

With these settings 

Each pipeline Job that has the option "Use Centralized CDA Connection Parameters" checked will use these settings to access the targeted CDA system.

https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0.4/CDA%20Guides/Content/3rdParty/Jenkins/JenkinsAppWorkflowPipeline.htm

2. If the user does not check this box he will have to enter the CDA system information (URI, login and password) in the definition of the pipeline job.

If "Use Centralized CDA Connection Parameters" is ticked in the groovy script parameter useCentlCrd: true will show up otherwise it will be set to false.

Error in the console logs:


==========================
java.lang.IllegalArgumentException: URI is not absolute
                   at java.base/java.net.URL.fromURI(URL.java:692)
                   at java.base/java.net.URI.toURL(URI.java:1116)
                   at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:163)
                   at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
Caused: com.sun.jersey.api.client.ClientHandlerException
                   at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
                   at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
                   at com.automic.ws.rest.filter.GenericResponseFilter.handle(GenericResponseFilter.java:35)
                   at com.sun.jersey.api.client.Client.handle(Client.java:652)
===========================

Environment

Release : 12.3

Cause

"Use Centralized CDA Connection Parameters" in Pipeline Job definition box is check, but the "Centralized CDA Connection Parameter" in the plugin definition is not defined.

Resolution

Know issue that will be fixed in the future build.

Workaround:

Change the parameter useCentlCrd: in the groovy script.

Set it to 'false' instead of 'true'.

The line should have this format:

server: 'https://ara.company.com', startAt: 'now', useCentlCrd: false,