[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Description: 
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.implementation.jackson -> 
JacksonVersion.class line 43 onwards:

    private JacksonVersion() {
        annotationsVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.annotation.JsonProperty");
        coreVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.core.JsonGenerator");
        databindVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.databind.ObjectMapper");
        xmlVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.dataformat.xml.XmlMapper");
        jsr310Version = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.datatype.jsr310.JavaTimeModule");

 

 

 

 

Portions of My POM trying to resolve the conflict:

...

    
       
            
                com.fasterxml.jackson.core
                jackson-annotations
                2.13.3
            
            
                com.fasterxml.jackson.core
                jackson-core
                

[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Environment: Java 1.8 Maven Project tika-app 2.4.1 jackson 2.13.3 
azure-core 1.30.0  (was: Java 1.8 Maven Pom)

> Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - 
> changing from 2.13.3 to 2.4.1
> -
>
> 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:
>             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.implementation.jackson -> 
> JacksonVersion.class line 43 onwards:
>     private JacksonVersion() {
>         annotationsVersion = 
> 

[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Environment: Java 1.8, Maven Project, tika-app 2.4.1, jackson 2.13.3, 
azure-core 1.30.0  (was: Java 1.8 Maven Project tika-app 2.4.1 jackson 2.13.3 
azure-core 1.30.0)

> Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - 
> changing from 2.13.3 to 2.4.1
> -
>
> 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:
>             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.implementation.jackson -> 
> JacksonVersion.class line 43 onwards:
>     

[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Description: 
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:

            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.implementation.jackson -> 
JacksonVersion.class line 43 onwards:

    private JacksonVersion() {
        annotationsVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.annotation.JsonProperty");
        coreVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.core.JsonGenerator");
        databindVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.databind.ObjectMapper");
        xmlVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.dataformat.xml.XmlMapper");
        jsr310Version = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.datatype.jsr310.JavaTimeModule");

 

 

 

 

Portions of My POM trying to resolve the conflict:

...

    
       
            
                com.fasterxml.jackson.core
                jackson-annotations
                2.13.3
            
            
                com.fasterxml.jackson.core
                jackson-core
                2.13.3
            
         

[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Environment: Java 1.8 Maven Pom  (was: Java 1.8 Maven Pom

    
       
            
                com.fasterxml.jackson.core
                jackson-annotations
                2.13.3
            
            
                com.fasterxml.jackson.core
                jackson-core
                2.13.3
            
            
                com.fasterxml.jackson.core
                jackson-databind
                2.13.3
            
            
                com.fasterxml.jackson.dataformat
                jackson-dataformat-xml
                2.13.3
            
            
                com.fasterxml.jackson.datatype
                jackson-datatype-jsr310
                2.13.3
            
        
    

 

        
        
            com.azure
            azure-core
            1.30.0
            
                
                    com.fasterxml.jackson.core
                    jackson-annotations
                
                
                    com.fasterxml.jackson.core
                    jackson-core
                
                
                    com.fasterxml.jackson.core
                    jackson-databind
                
                
                    com.fasterxml.jackson.dataformat
                    jackson-dataformat-xml
                
                
                    com.fasterxml.jackson.datatype
                    jackson-datatype-jsr310
                
            
        

 

        
        
            com.fasterxml.jackson.core
            jackson-annotations
            2.13.3
            provided
        
        
        
            com.fasterxml.jackson.core
            jackson-core
            2.13.3
            provided
        
        
        
            com.fasterxml.jackson.core
            jackson-databind
            2.13.3
            provided
        
        
        
            com.fasterxml.jackson.dataformat
            jackson-dataformat-xml
            2.13.3
            provided
        
        
        
            com.fasterxml.jackson.datatype
            jackson-datatype-jsr310
            2.13.3
            provided
        

 

        
            org.apache.tika
            tika-app
            2.4.1
            
                
                    com.fasterxml.jackson.core
                    jackson-annotations
                
                
                    com.fasterxml.jackson.core
                    jackson-core
                
                
                    com.fasterxml.jackson.core
                    jackson-databind
                
                
                    com.fasterxml.jackson.dataformat
                    jackson-dataformat-xml
                
                
                    com.fasterxml.jackson.datatype
                    jackson-datatype-jsr310
                
            
        )

> Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - 
> changing from 2.13.3 to 2.4.1
> -
>
> 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 Pom
>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, 

[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Description: 
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:

            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.implementation.jackson -> 
JacksonVersion.class line 43 onwards:

    private JacksonVersion() {
        annotationsVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.annotation.JsonProperty");
        coreVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.core.JsonGenerator");
        databindVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.databind.ObjectMapper");
        xmlVersion = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.dataformat.xml.XmlMapper");
        jsr310Version = 
SemanticVersion.getPackageVersionForClass("com.fasterxml.jackson.datatype.jsr310.JavaTimeModule");

  was:
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 

[jira] [Updated] (TIKA-3817) Azure Graph conflict with Tika-app on jackson (JsonGenerator) version - changing from 2.13.3 to 2.4.1

2022-07-14 Thread Andre Nel (Jira)


 [ 
https://issues.apache.org/jira/browse/TIKA-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andre Nel updated TIKA-3817:

Description: 
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

 

Offending code:

            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();

 

  was:
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 fetting 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