Template parameter to select tool installation or credentials is empty

Article ID:210154478
1 minute readKnowledge base

Issue

You created a Job template with a parameter to select a tool installation or credentials but when you instantiate the job from the template the list of tools or credentials is abnormally empty (This problem occurs only if you are located in a folder).

In your browser script console you can see a 400 error like here:

encoded_slash.png

Resolution

The problem occurs only on Apache Tomcat. To fix the issue, you need to define a system property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH with the value true. This is documented in prerequisites to deploy Jenkins on Apache Tomcat. See also Installing Operations Center - Running in Apache Tomcat and Installing Client controllers - Running in Apache Tomcat.

Since Apache Tomcat 8.5.54 the system property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH is deprecated and replaced by the Connector attribute encodedSolidusHandling.

On Linux

In ${CATALINA_HOME}/bin/setenv.sh add the line

CATALINA_OPTS='-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true'

On Windows

In ${CATALINA_HOME}\bin\setenv.bat add the line

set CATALINA_OPTS='-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true'