[jira] [Commented] (TIKA-3817) Azure Graph conflict with Tika-app on (JsonGenerator) jackson version 2.13.3 - bug changes version to 2.4.1 (Tika's version)

2022-07-14 Thread Tim Allison (Jira)


[ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566884#comment-17566884
 ] 

Tim Allison commented on TIKA-3817:
---

What are we doing wrong at the tika level?  As you point out, Tika 2.4.1 uses 
jackson-core version 2.13.3.

> Azure Graph conflict with Tika-app on (JsonGenerator) jackson version 2.13.3 
> - bug changes version to 2.4.1 (Tika's version)
> 
>
> Key: TIKA-3817
> URL: https://issues.apache.org/jira/browse/TIKA-3817
> Project: Tika
>  Issue Type: Bug
>  Components: app
>Affects Versions: 2.4.1
> Environment: Java 1.8, Maven Project, tika-app 2.4.1, jackson 2.13.3, 
> azure-core 1.30.0
>Reporter: Andre Nel
>Priority: Major
>  Labels: Azure, jackson, tika-app, version
>
> Azure Graph conflict on jackson.
> Both Tika-app 2.4.1 and Azure-core 1.30.0 use jars with classes of the same 
> name JsonGenerator (com.fasterxml.jackson.core.JsonGenerator) when fetching 
> the jackson version, of which jackson-core 2.13.3 is desired and set in the 
> pom. This results in version conflict - where tika changes the jackson 
> version from the desired 2.13.3 to tika's version 2.4.1, which doesn't even 
> exist for jackson and would be far too old a version of jackson.
>  
> ERROR [main] 12:03:19,483 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-annotations' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> ERROR [main] 12:03:19,489 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-core' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> ERROR [main] 12:03:19,489 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-databind' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> INFO  [main] 12:03:19,491 
> com.azure.core.implementation.jackson.JacksonVersion Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
> ERROR [main] 12:03:19,494 
> com.azure.core.implementation.jackson.ObjectMapperShim Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
> Exception in thread "main" java.lang.LinkageError: Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
>     at 
> com.azure.core.implementation.jackson.ObjectMapperShim.createHeaderMapper(ObjectMapperShim.java:138)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.(JacksonAdapter.java:81)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.(JacksonAdapter.java:59)
>     at 
> com.azure.core.util.serializer.JacksonAdapter$SerializerAdapterHolder.(JacksonAdapter.java:114)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter(JacksonAdapter.java:123)
>     at 
> com.azure.identity.implementation.IdentityClient.(IdentityClient.java:104)
>     at 
> com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:158)
>     at 
> com.azure.identity.ClientSecretCredential.(ClientSecretCredential.java:68)
>     at 
> com.azure.identity.ClientSecretCredentialBuilder.build(ClientSecretCredentialBuilder.java:93)
>     at 
> main.java.emailtranslator.EmailTranslator.connectOffice365MicrosoftGraph
>  
> My offending code calling azure-core graph:
>             final ClientSecretCredential clientSecretCredential = new 
> ClientSecretCredentialBuilder()
>             .clientId(clientId)
>             .clientSecret(clientSecret)
>             .tenantId(tenantId)
>             .build();
>             final TokenCredentialAuthProvider tokenCredentialAuthProvider = 
> new TokenCredentialAuthProvider(scopes, clientSecretCredential);
>             final GraphServiceClient graphClient =
>             GraphServiceClient
>             .builder()
>             .authenticationProvider(tokenCredentialAuthProvider)
>             .buildClient();
>             final User me = graphClient.me().buildRequest().get();
>  
> which calls azure-core-1.30.0.jar -> com.azure.core.implemen

[jira] [Commented] (TIKA-3817) Azure Graph conflict with Tika-app on (JsonGenerator) jackson version 2.13.3 - bug changes version to 2.4.1 (Tika's version)

2022-07-14 Thread Tilman Hausherr (Jira)


[ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567061#comment-17567061
 ] 

Tilman Hausherr commented on TIKA-3817:
---

I don't understand this either. We use azure-core ourselves with the same 
version. I have a tika demo project and I added it, it looks like this now:
{code}


org.apache.tika
tika-core
2.4.1


org.apache.tika
tika-parser-pdf-module
2.4.1


com.azure
azure-core
1.30.0


{code}
The dependency graph looks like this:
 !screenshot-1.png! 

> Azure Graph conflict with Tika-app on (JsonGenerator) jackson version 2.13.3 
> - bug changes version to 2.4.1 (Tika's version)
> 
>
> Key: TIKA-3817
> URL: https://issues.apache.org/jira/browse/TIKA-3817
> Project: Tika
>  Issue Type: Bug
>  Components: app
>Affects Versions: 2.4.1
> Environment: Java 1.8, Maven Project, tika-app 2.4.1, jackson 2.13.3, 
> azure-core 1.30.0
>Reporter: Andre Nel
>Priority: Major
>  Labels: Azure, jackson, tika-app, version
> Attachments: screenshot-1.png
>
>
> Azure Graph conflict on jackson.
> Both Tika-app 2.4.1 and Azure-core 1.30.0 use jars with classes of the same 
> name JsonGenerator (com.fasterxml.jackson.core.JsonGenerator) when fetching 
> the jackson version, of which jackson-core 2.13.3 is desired and set in the 
> pom. This results in version conflict - where tika changes the jackson 
> version from the desired 2.13.3 to tika's version 2.4.1, which doesn't even 
> exist for jackson and would be far too old a version of jackson.
>  
> ERROR [main] 12:03:19,483 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-annotations' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> ERROR [main] 12:03:19,489 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-core' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> ERROR [main] 12:03:19,489 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-databind' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> INFO  [main] 12:03:19,491 
> com.azure.core.implementation.jackson.JacksonVersion Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
> ERROR [main] 12:03:19,494 
> com.azure.core.implementation.jackson.ObjectMapperShim Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
> Exception in thread "main" java.lang.LinkageError: Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
>     at 
> com.azure.core.implementation.jackson.ObjectMapperShim.createHeaderMapper(ObjectMapperShim.java:138)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.(JacksonAdapter.java:81)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.(JacksonAdapter.java:59)
>     at 
> com.azure.core.util.serializer.JacksonAdapter$SerializerAdapterHolder.(JacksonAdapter.java:114)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter(JacksonAdapter.java:123)
>     at 
> com.azure.identity.implementation.IdentityClient.(IdentityClient.java:104)
>     at 
> com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:158)
>     at 
> com.azure.identity.ClientSecretCredential.(ClientSecretCredential.java:68)
>     at 
> com.azure.identity.ClientSecretCredentialBuilder.build(ClientSecretCredentialBuilder.java:93)
>     at 
> main.java.emailtranslator.EmailTranslator.connectOffice365MicrosoftGraph
>  
> My offending code calling azure-core graph:
>             final ClientSecretCredential clientSecretCredential = new 
> ClientSecretCredentialBuilder()
>             .clientId(clientId)
>             .clientSecret(clientSecret)
>             .tenantId(tenantId)
>             .build();
>             final TokenCredentialAuthPro

[jira] [Commented] (TIKA-3817) Azure Graph conflict with Tika-app on (JsonGenerator) jackson version 2.13.3 - bug changes version to 2.4.1 (Tika's version)

2022-07-14 Thread Tilman Hausherr (Jira)


[ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567076#comment-17567076
 ] 

Tilman Hausherr commented on TIKA-3817:
---

I notice you're using tika-app, this is meant as a stand-alone application. Why 
not use the dependencies you really need?

> Azure Graph conflict with Tika-app on (JsonGenerator) jackson version 2.13.3 
> - bug changes version to 2.4.1 (Tika's version)
> 
>
> Key: TIKA-3817
> URL: https://issues.apache.org/jira/browse/TIKA-3817
> Project: Tika
>  Issue Type: Bug
>  Components: app
>Affects Versions: 2.4.1
> Environment: Java 1.8, Maven Project, tika-app 2.4.1, jackson 2.13.3, 
> azure-core 1.30.0
>Reporter: Andre Nel
>Priority: Major
>  Labels: Azure, jackson, tika-app, version
> Attachments: screenshot-1.png
>
>
> Azure Graph conflict on jackson.
> Both Tika-app 2.4.1 and Azure-core 1.30.0 use jars with classes of the same 
> name JsonGenerator (com.fasterxml.jackson.core.JsonGenerator) when fetching 
> the jackson version, of which jackson-core 2.13.3 is desired and set in the 
> pom. This results in version conflict - where tika changes the jackson 
> version from the desired 2.13.3 to tika's version 2.4.1, which doesn't even 
> exist for jackson and would be far too old a version of jackson.
>  
> ERROR [main] 12:03:19,483 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-annotations' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> ERROR [main] 12:03:19,489 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-core' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> ERROR [main] 12:03:19,489 
> com.azure.core.implementation.jackson.JacksonVersion Version '2.4.1' of 
> package 'jackson-databind' is not supported (older than earliest supported 
> version - `2.10.0`), please upgrade.
> INFO  [main] 12:03:19,491 
> com.azure.core.implementation.jackson.JacksonVersion Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
> ERROR [main] 12:03:19,494 
> com.azure.core.implementation.jackson.ObjectMapperShim Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
> Exception in thread "main" java.lang.LinkageError: Package versions: 
> jackson-annotations=2.4.1, jackson-core=2.4.1, jackson-databind=2.4.1, 
> jackson-dataformat-xml=unknown, jackson-datatype-jsr310=2.13.3, 
> azure-core=1.30.0, Troubleshooting version conflicts: 
> [https://aka.ms/azsdk/java/dependency/troubleshoot]
>     at 
> com.azure.core.implementation.jackson.ObjectMapperShim.createHeaderMapper(ObjectMapperShim.java:138)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.(JacksonAdapter.java:81)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.(JacksonAdapter.java:59)
>     at 
> com.azure.core.util.serializer.JacksonAdapter$SerializerAdapterHolder.(JacksonAdapter.java:114)
>     at 
> com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter(JacksonAdapter.java:123)
>     at 
> com.azure.identity.implementation.IdentityClient.(IdentityClient.java:104)
>     at 
> com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:158)
>     at 
> com.azure.identity.ClientSecretCredential.(ClientSecretCredential.java:68)
>     at 
> com.azure.identity.ClientSecretCredentialBuilder.build(ClientSecretCredentialBuilder.java:93)
>     at 
> main.java.emailtranslator.EmailTranslator.connectOffice365MicrosoftGraph
>  
> My offending code calling azure-core graph:
>             final ClientSecretCredential clientSecretCredential = new 
> ClientSecretCredentialBuilder()
>             .clientId(clientId)
>             .clientSecret(clientSecret)
>             .tenantId(tenantId)
>             .build();
>             final TokenCredentialAuthProvider tokenCredentialAuthProvider = 
> new TokenCredentialAuthProvider(scopes, clientSecretCredential);
>             final GraphServiceClient graphClient =
>             GraphServiceClient
>             .builder()
>             .authenticationProvider(tokenCredentialAuthProvider)
>             .buildClient();
>             final User me = graphClient.me().buildRequest().get();
>