Reputation: 79
I know the same question title has been used but this is a different one. I tried to integrate the implementation of spring boot keyvault into my own project by copying all the jars without using a maven pom.
I met the errors shown at the bottom of this post. I can solve the SLF4j multiple binding error by removing an SLF4J error but java.lang.VerifyError remains there. This error is probably caused by jar conflicts but I am totally at a loss how to troubleshoot the issue. The original application can run without issues even with all the newly added jars that are used for spring boot keyvault solution. The Spring boot keyvalut solution also works if it is not integrated into my application.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/****/Documents/japserpublic-master/japserpublic-master/TestJasperReports2/keyVaultLib/slf4j-simple-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/****/Documents/japserpublic-master/japserpublic-master/TestJasperReports2/keyVaultLib/slf4j.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
Exception in thread "main" java.lang.VerifyError: Stack map does not match the one at exception handler 77
Exception Details:
Location:
com/fasterxml/jackson/databind/deser/std/StdDeserializer._parseDate(Lcom/fasterxml/jackson/core/JsonParser;Lcom/fasterxml/jackson/databind/DeserializationContext;)Ljava/util/Date; @77: astore
Reason:
Type 'com/fasterxml/jackson/core/JsonParseException' (current frame, stack[0]) is not assignable to 'com/fasterxml/jackson/core/exc/StreamReadException' (stack map, stack[0])
Current Frame:
bci: @69
flags: { }
locals: { 'com/fasterxml/jackson/databind/deser/std/StdDeserializer', 'com/fasterxml/jackson/core/JsonParser', 'com/fasterxml/jackson/databind/DeserializationContext' }
stack: { 'com/fasterxml/jackson/core/JsonParseException' }
Stackmap Frame:
bci: @77
flags: { }
locals: { 'com/fasterxml/jackson/databind/deser/std/StdDeserializer', 'com/fasterxml/jackson/core/JsonParser', 'com/fasterxml/jackson/databind/DeserializationContext' }
stack: { 'com/fasterxml/jackson/core/exc/StreamReadException' }
Bytecode:
0x0000000: 2bb6 0035 aa00 0000 0000 0081 0000 0003
0x0000010: 0000 000b 0000 007a 0000 0081 0000 0081
0x0000020: 0000 0034 0000 0041 0000 0081 0000 0081
0x0000030: 0000 0081 0000 0071 2a2b b600 11b6 0012
0x0000040: 2cb6 006b b02b b600 4742 a700 223a 052c
0x0000050: 2ab4 0002 2bb6 006e 126f 03bd 0004 b600
0x0000060: 70c0 002d 3a06 1906 b600 4c42 bb00 7159
0x0000070: 21b7 0072 b02a 2cb6 0073 c000 71b0 2a2b
0x0000080: 2cb6 0074 b02c 2ab4 0002 2bb6 0025 c000
0x0000090: 71b0
Exception Handler Table:
bci [69, 74] => handler: 77
bci [69, 74] => handler: 77
Stackmap Table:
same_frame(@56)
same_frame(@69)
same_locals_1_stack_item_frame(@77,Object[#367])
append_frame(@108,Long)
chop_frame(@117,1)
same_frame(@126)
same_frame(@133)
at com.fasterxml.jackson.datatype.jsr310.JavaTimeModule.<init>(JavaTimeModule.java:118)
at com.azure.core.implementation.serializer.jackson.JacksonAdapter.initializeObjectMapper(JacksonAdapter.java:258)
at com.azure.core.implementation.serializer.jackson.JacksonAdapter.<init>(JacksonAdapter.java:74)
at com.azure.core.implementation.serializer.jackson.JacksonAdapter.createDefaultSerializerAdapter(JacksonAdapter.java:108)
at com.azure.identity.implementation.IdentityClient.<clinit>(IdentityClient.java:60)
at com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:50)
at com.azure.identity.ManagedIdentityCredential.<init>(ManagedIdentityCredential.java:33)
at com.azure.identity.DefaultAzureCredential.<init>(DefaultAzureCredential.java:37)
at com.azure.identity.DefaultAzureCredentialBuilder.build(DefaultAzureCredentialBuilder.java:18)
at utilities.Test.main(Test.java:34)
Upvotes: 2
Views: 9237
Reputation: 1
Only add jackson-databind maybe not work. I add all confict jackson jar to solve this exception.
Upvotes: 0
Reputation: 166
Adding the following to pom.xml fixed the issue for me
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.8</version>
</dependency>
</dependencies>
</dependencyManagement>
Upvotes: 0
Reputation: 1430
Print your dependencies tree, and find out which lib related to the conflict jar and try to omit the old version. For maven: Maven dependency resolution (conflicted)
Upvotes: 3