JetBrains / teamcity-hashicorp-vault-plugin

TeamCity plugin to support HashiCorp Vault
Apache License 2.0
28 stars 18 forks source link

java.lang.LinkageError and java.lang.NoClassDefFoundError when testing IAM connection #56

Open pieter-lautus opened 2 years ago

pieter-lautus commented 2 years ago

I tried to set up a Vault Connection using IAM Authentication. When I clicked "Test Connection", I got a popup with the error:

java.lang.LinkageError: loader constraint violation: when resolving method 'void org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init>(com.fasterxml.jackson.databind.ObjectMapper)' the class loader jetbrains.buildServer.plugins.classLoaders.PluginStandaloneClassLoader @178aded3 of the current class, org/springframework/vault/client/VaultResponses, and the class loader org.apache.catalina.loader.ParallelWebappClassLoader @14d1b094 for the method's defining class, org/springframework/http/converter/json/MappingJackson2HttpMessageConverter, have different Class objects for the type com/fasterxml/jackson/databind/ObjectMapper used in the signature (org.springframework.vault.client.VaultResponses is in unnamed module of loader jetbrains.buildServer.plugins.classLoaders.PluginStandaloneClassLoader @178aded3, parent loader org.apache.catalina.loader.ParallelWebappClassLoader @14d1b094; org.springframework.http.converter.json.MappingJackson2HttpMessageConverter is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @14d1b094, parent loader java.net.URLClassLoader @20398b7c)

Subsequents attempts to click "Test Connection" give a different error message:

java.lang.NoClassDefFoundError: Could not initialize class org.springframework.vault.client.VaultResponses

This occurred on TeamCity Enterprise 2022.04.4 (build 108763) using version 0.1.113 of this plugin and Temurin JDK 11.0.16+8 (AdoptOpenJDK).

pieter-lautus commented 2 years ago

Notably, Test Connections works fine when I use an Approle to authenticate