[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426609#comment-16426609 ] Michael Osipov commented on MNG-6388: - [~pioto], pretty smart approach by Red Hat IdM since SPN and FQDN must correlate! I will update Wagon first and will nominate this issue for Maven 3.5.4 [~garydgregory], [~olegk] The way the HttpClient is now does not need any change because looking at [Oracle's implementation|https://github.com/frohoff/jdk8u-jdk/blob/master/src/share/classes/sun/security/x509/X509CertImpl.java#L1549-LL1590] we will never get a byte array for DNS name or IP. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426259#comment-16426259 ] Mike Kelly commented on MNG-6388: - And, I can confirm the snapshot build corrects the issue in my case. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426255#comment-16426255 ] Mike Kelly commented on MNG-6388: - We have two OIDs added, according to Wireshark: * type-id: 1.3.6.1.4.1.311.20.2.3 (id-ms-user-principal-name) * type-id: 1.3.6.1.5.2.2 (id-pkinit-san) The first one is a UTF8String like "HTTP/artifactory.example@example.com" The second is a KRB5PrincipalName, representing basically the same thing as the UTF8 string above. These are both added automatically by FreeIPA's PKI component; it generally seems to require/encourage you to create certs tied to Kerberos Services. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426072#comment-16426072 ] Michael Osipov commented on MNG-6388: - [~pioto], out of curiously, do you embed {{OtherName}} with 1.2.840.113554.1.2.2.1 OID and for what pupose? Anyway, [here|http://home.apache.org/~michaelo/apache-maven-3.5.4-SNAPSHOT-bin.tar.gz] is a snapshot build of Maven with updated dependencies. Please test! I'd still love to see your cert. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425766#comment-16425766 ] Mike Kelly commented on MNG-6388: - Also confirmed that Maven 3.5.2 uses httpclient 4.5.2... so yes, this does seem like the root cause. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425764#comment-16425764 ] Mike Kelly commented on MNG-6388: - [~garydgregory]: OK, but which version is Maven 3.5.3 using? From what I can tell, looks like wagon-http uses the buggy 4.5.3... {noformat} $ unzip -p lib/wagon-http-3.0.0-shaded.jar META-INF/maven/org.apache.httpcomponents/httpclient/pom.properties #Generated by Maven #Sat Jan 21 16:38:45 CET 2017 version=4.5.3 groupId=org.apache.httpcomponents artifactId=httpclient{noformat} Is there a straightforward way to put the newer httpclient into the Maven classpath to verify that fixes things? Or does it require a new release of Wagon, to be incorporated in a new release of Maven? I'd like to verify that replacing it with 4.5.4 or 4.5.2 resolves the issue for me. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425627#comment-16425627 ] Gary Gregory commented on MNG-6388: --- [~pioto]: Note that HttpClient 4.5.5 is out. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425502#comment-16425502 ] Mike Kelly commented on MNG-6388: - Interesting to think this may be a regression related to my TLS cert. FWIW, I'm using a cert signed by our internal PKI (provided by [Red Hat IdM|https://access.redhat.com/products/identity-management]). The way I've generated the cert has two DNS names, and two "Other Name" fields, related to Kerberos. I think we encountered similar issues with HttpClient in our own application a few months ago, which were related to HTTPCLIENT-1836 as well. Our initial fix was downgrade from HttpClient 4.5.3 to 4.5.2. Once 4.5.4 was released, we upgraded to that, which resolved the problem. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16425190#comment-16425190 ] Oleg Kalnichevski commented on MNG-6388: bq. this is an interesting case for HTTPCLIENT-1836. Do we need to roll a small ASN.1 DER parser for both types now? [~michael-o] Please do feel free to raise a change request in JIRA for this issue or better yet contribute a patch Oleg > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424781#comment-16424781 ] Gary Gregory commented on MNG-6388: --- Yeah, there is a comment in the code that says: {code:java} // TODO ASN.1 DER encoded form {code} ... > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423955#comment-16423955 ] Michael Osipov commented on MNG-6388: - HTTPCLIENT-1906 which skip non-DNS and non-IP subjectAltNames. I'd be really interested to see the type of your subjectAltName. > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423892#comment-16423892 ] Michael Osipov commented on MNG-6388: - I know where this crash comes from, I recently commented on the HttpClient issue. Can you enable HTTPClient debugging too or show be a screenshot of the wireshark dump of the cert? I'd like to see wether the file has been correctly transfered from your mirror first. Please enable [these two logging params|https://github.com/apache/maven/blob/master/apache-maven/src/conf/logging/simplelogger.properties#L31-L32] with debug. HTTPCLIENT-1836 is the cause and [here|https://github.com/apache/httpcomponents-client/commit/c58288c9af339343a4433888a73f70669c2556ff#diff-37867f2a85d5bbb38730b5e7aca159cc] is the fix. Can you provide from Wireshark a dump of the type and the byte array as depicted in [here|https://docs.oracle.com/javase/7/docs/api/java/security/cert/X509Certificate.html#getSubjectAlternativeNames()]? It can either be an {{IA5String}} or an {{OCTET STRING}}. [~olegk], [~garydgregory], this is an interesting case for HTTPCLIENT-1836. Do we need to roll a small ASN.1 DER parser for both types now? > Error Fetching Artifacts: "[B cannot be cast to java.lang.String" > - > > Key: MNG-6388 > URL: https://issues.apache.org/jira/browse/MNG-6388 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories >Affects Versions: 3.5.3 > Environment: $ docker run --rm -it maven:3-jdk-8 mvn --version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T19:49:05Z) > Maven home: /usr/share/maven > Java version: 1.8.0_162, vendor: Oracle Corporation > Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre > Default locale: en, platform encoding: UTF-8 > OS name: "linux", version: "3.10.0-693.21.1.el7.x86_64", arch: "amd64", > family: "unix" > > $ mvn -version > Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; > 2018-02-24T14:49:05-05:00) > Maven home: /opt/local/share/java/maven3 > Java version: 1.8.0_161, vendor: Oracle Corporation > Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac" >Reporter: Mike Kelly >Priority: Major > > When using Maven 3.5.3 with Artifactory 5.10.0 configured as a "*" mirror, > downloads & uploads fail with errors like: > {noformat} > [ERROR] Failed to execute goal on project ccc-persistence: Could not resolve > dependencies for project REDACTED:REDACTED:jar:3.47.0-SNAPSHOT: Failed to > collect dependencies at org.flywaydb:flyway-core:jar:3.2.1: Failed to read > artifact descriptor for org.flywaydb:flyway-core:jar:3.2.1: Could not > transfer artifact org.flywaydb:flyway-core:pom:3.2.1 from/to artifactory > (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to > java.lang.String -> [Help 1]{noformat} > I've seen this issue both with the official Docker container, and with Maven > 3.5.3 from MacPorts; in both cases, downgrading back down to 3.5.2 resolved > the issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6388) Error Fetching Artifacts: "[B cannot be cast to java.lang.String"
[ https://issues.apache.org/jira/browse/MNG-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16422701#comment-16422701 ] Mike Kelly commented on MNG-6388: - Here's a complete backtrace from another impacted project, generated with {{mvn -X dependency:go-offline}}: {noformat} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.1:resolve-plugins (resolve-plugins) on project REDACTED: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.RELEASE -> org.apache.maven:maven-archiver:jar:2.6 -> org.apache.maven:maven-core:jar:2.2.1 -> org.apache.maven.wagon:wagon-http:jar:1.0-beta-6 -> org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -> commons-httpclient:commons-httpclient:jar:3.1 -> commons-codec:commons-codec:jar:1.11: Failed to read artifact descriptor for commons-codec:commons-codec:jar:1.11: Could not transfer artifact commons-codec:commons-codec:pom:1.11 from/to artifactory (https://artifactory.REDACTED.com/artifactory/all): [B cannot be cast to java.lang.String -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.1:resolve-plugins (resolve-plugins) on project REDACTED: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.RELEASE -> org.apache.maven:maven-archiver:jar:2.6 -> org.apache.maven:maven-core:jar:2.2.1 -> org.apache.maven.wagon:wagon-http:jar:1.0-beta-6 -> org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -> commons-httpclient:commons-httpclient:jar:3.1 -> commons-codec:commons-codec:jar:1.11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:353) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:198) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290) at org.apache.maven.cli.MavenCli.main (MavenCli.java:194) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.RELEASE -> org.apache.maven:maven-archiver:jar:2.6 -> org.apache.maven:maven-core:jar:2.2.1 -> org.apache.maven.wagon:wagon-http:jar:1.0-beta-6 -> org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -> commons-httpclient:commons-httpclient:jar:3.1 -> commons-codec:commons-codec:jar:1.11 at org.apache.maven.plugins.dependency.resolvers.ResolvePluginsMojo.doExecute (ResolvePluginsMojo.java:162) at org.apache.maven.plugins.dependency.AbstractDependencyMojo.execute (AbstractDependencyMojo.java:143) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute