Jenkins not creating build.xml in jobs after upgrading to JDK 17

I figured this out. As we are running Tomcat on Windows as a service, we need to use the Tomcat9w.exe tool to manage JDK Options. This is mentioned within the catalina.bat file (which I finally read!) as it mentions that other methods such as setenv.bat and other local customizations have no effect.

In the tool, there is a Java tab where I add my --add-opens statements, which I was able to do. I added those in the format:
–add-opens=java.lang=ALL-UNNAMED
–add-opens=java.util=ALL-UNNAMED

(this is also were to add the:
“-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true” type of options as well.)

Once I made the change and saved, I restarted the service and confirmed the log shows the parameters loading and my problem is now solved. All jobs are creating build.xml files without error using JDK17.

I hate answering my own questions, but I had to find the specific solution for our specific requirement, but there were many pointers along the way that helped. Hopefully, this will help the next person experiencing something similar.

2 Likes