ProcessFailureException and HTTP 401 error during license-check - VMware Tanzu Spring Application Advisor
search cancel

ProcessFailureException and HTTP 401 error during license-check - VMware Tanzu Spring Application Advisor

book

Article ID: 454029

calendar_today

Updated On:

Products

VMware Tanzu Spring Essentials

Issue/Introduction

Running advisor upgrade-plan apply aborts with a ProcessFailureException citing a failed mvnw site command. The error stack trace references a generated license-check module located inside a temporary licenses####/ directory. E.g:

$ advisor upgrade-plan apply
🔎 ProcessFailureException: Command: [ … mvnw site --file …/licenses####/pom.xml]
[ERROR] Failed to read artifact descriptor for
        com.vmware.tanzu.spring.recipes:rewrite-static-analysis:jar:1.7.2
[ERROR]   Caused by: … from/to spring-enterprise-subscription (…tanzu-maven/): status code: 401
. You can find the error in .advisor/errors/<ts>.log - Please open a new support ticket …

Inspecting the detailed log output reveals an underlying HTTP 401 (Unauthorized) status code when attempting to access the subscription repository. 

Environment

Spring Application Advisor 1.6.x

Cause

The CLI mandates downloading a commercial recipe (rewrite-static-analysis) to perform a license check during the apply phase. This check triggers even for trivial or no-op dependency upgrades that do not rewrite any source code. If the commercial subscription token is missing or expired, access to the subscription repository is denied with a 401 status code. The CLI buries this 401 error under a raw Maven stack trace rather than identifying it as an expired token

Resolution

Authenticate to the subscription repository with a valid, unexpired token to allow the commercial recipe download to succeed.

  1. Ensure a valid token is configured in the ~/.m2/settings.xml file under the <server id="spring-enterprise-subscription"> configuration block.

  2. If reading credentials from environment variables inside settings.xml, use the ${env.VAR} format, as plain ${VAR} resolves only against JVM system properties. Alternatively, pass credentials using -D flags or MAVEN_OPTS.

  3. Manually delete the leftover licenses####/ directories from the project root to clean up the workspace.

  4. Rerun the advisor upgrade-plan apply command.