[
https://issues.apache.org/jira/browse/HIVE-29441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072233#comment-18072233
]
Stamatis Zampetakis commented on HIVE-29441:
--------------------------------------------
Thomas gave me a zip with the javax.el part from his local maven repository and
I was able to repro the failure. The main exception/failure that is coming up
is attached in [^dependency-resolution-certificate-exception.txt] and is
caused by an expired certificate:
{noformat}
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Thu Apr 02
01:59:59 CEST 2026
at sun.security.x509.CertificateValidity.valid
(CertificateValidity.java:182)
at sun.security.x509.X509CertImpl.checkValidity (X509CertImpl.java:534)
at sun.security.provider.certpath.BasicChecker.verifyValidity
(BasicChecker.java:190)
at sun.security.provider.certpath.BasicChecker.check (BasicChecker.java:144)
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate
(PKIXMasterCertPathValidator.java:125)
at sun.security.provider.certpath.PKIXCertPathValidator.validate
(PKIXCertPathValidator.java:224)
at sun.security.provider.certpath.PKIXCertPathValidator.validate
(PKIXCertPathValidator.java:144)
at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate
(PKIXCertPathValidator.java:83)
at java.security.cert.CertPathValidator.validate
(CertPathValidator.java:309)
at sun.security.validator.PKIXValidator.doValidate (PKIXValidator.java:313)
at sun.security.validator.PKIXValidator.engineValidate
(PKIXValidator.java:256)
at sun.security.validator.Validator.validate (Validator.java:256)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted
(X509TrustManagerImpl.java:230)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted
(X509TrustManagerImpl.java:132)
at
sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts
(CertificateMessage.java:1302)
at
sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate
(CertificateMessage.java:1195)
at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume
(CertificateMessage.java:1138)
at sun.security.ssl.SSLHandshake.consume (SSLHandshake.java:393)
at sun.security.ssl.HandshakeContext.dispatch (HandshakeContext.java:476)
at sun.security.ssl.HandshakeContext.dispatch (HandshakeContext.java:447)
at sun.security.ssl.TransportContext.dispatch (TransportContext.java:206)
at sun.security.ssl.SSLTransport.decode (SSLTransport.java:172)
at sun.security.ssl.SSLSocketImpl.decode (SSLSocketImpl.java:1506)
at sun.security.ssl.SSLSocketImpl.readHandshakeRecord
(SSLSocketImpl.java:1421)
at sun.security.ssl.SSLSocketImpl.startHandshake (SSLSocketImpl.java:455)
at sun.security.ssl.SSLSocketImpl.startHandshake (SSLSocketImpl.java:426)
...
at
org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.processDependency
(DefaultDependencyCollector.java:365)
at
org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.process
(DefaultDependencyCollector.java:352)
at
org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.collectDependencies
(DefaultDependencyCollector.java:254)
at
org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies
(DefaultRepositorySystem.java:284)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve
(DefaultProjectDependenciesResolver.java:169)
at
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies
(LifecycleDependencyResolver.java:243)
at
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies
(LifecycleDependencyResolver.java:147)
...
{noformat}
The exception is always there as long as we don't use some special internal
Nexus server/mirrors because the repository
(https://maven.java.net/content/repositories/snapshots) that holds the actual
javax.el dependency uses an expired certificate.
In every occurrence of the problem the exception is triggered when trying to
resolve/collect the transitive dependencies for hbase-testing-util. After a bit
of debugging and looking into the [official Maven documentation for dependency
exclusion|https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html#dependency-exclusions]
I understood that my initial statement that exclusion at hbase-testing-util is
redundant is *wrong*; it is clearly stated and confirmed via examples that
exclusions work on per-dependency basis. In other words, it doesn't really
matter that we already define the exclusion on hbase-server that is a
transitive dependency of hbase-testing-util. We have to put explicit exclusions
on every dependency declaration that may fetch problematic artifacts. The
solution in https://github.com/apache/hive/pull/6297 is exactly what is needed
here so I approved it and will merge it shortly.
I was mislead by the output of the dependency:tree where the javax.el didn't
appear but this does not necessarily mean that is not resolved. Maybe there is
a bug in the dependency plugin itself but don't have time to investigate
further. The reported issue is fixed by the PR and exclusion is done correctly
so we can mark this Jira as resolved.
> Avoid resolving dependency org.glassfish:javax.el by excluding
> org.glassfish.web:javax.servlet.jsp from hbase-testing-util
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-29441
> URL: https://issues.apache.org/jira/browse/HIVE-29441
> Project: Hive
> Issue Type: Task
> Reporter: Thomas Rebele
> Assignee: Thomas Rebele
> Priority: Major
> Labels: pull-request-available
> Attachments: javax-el-pkix-exception-trace.txt,
> mvn-dep-tree-hbase-handler.txt
>
>
> The build fails on my machine:
> {code:java}
> $ mvn clean install -pl hbase-handler -DskipTests -Pitests
> -Denforcer.skip=true
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -----------------< org.apache.hive:hive-hbase-handler
> >-----------------
> [INFO] Building Hive HBase Handler 4.3.0-SNAPSHOT
> [INFO] from pom.xml
> [INFO] --------------------------------[ jar
> ]---------------------------------
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b06-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b06-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b06-SNAPSHOT/maven-metadata.xml failed
> to transfer from https://maven.java.net/content/repositories/snapshots during
> a previous attempt. This failure was cached in the local repository and
> resolution will not be reattempted until the update interval of
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error:
> Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b06-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b06-SNAPSHOT/javax.el-3.0.1-b06-SNAPSHOT.pom
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b07-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b07-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b07-SNAPSHOT/maven-metadata.xml failed
> to transfer from https://maven.java.net/content/repositories/snapshots during
> a previous attempt. This failure was cached in the local repository and
> resolution will not be reattempted until the update interval of
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error:
> Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b07-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b07-SNAPSHOT/javax.el-3.0.1-b07-SNAPSHOT.pom
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b08-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b08-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b08-SNAPSHOT/maven-metadata.xml failed
> to transfer from https://maven.java.net/content/repositories/snapshots during
> a previous attempt. This failure was cached in the local repository and
> resolution will not be reattempted until the update interval of
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error:
> Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b08-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b08-SNAPSHOT/javax.el-3.0.1-b08-SNAPSHOT.pom
> Downloading from jvnet-nexus-snapshots:
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b11-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b11-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b11-SNAPSHOT/maven-metadata.xml failed
> to transfer from https://maven.java.net/content/repositories/snapshots during
> a previous attempt. This failure was cached in the local repository and
> resolution will not be reattempted until the update interval of
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error:
> Could not transfer metadata
> org.glassfish:javax.el:3.0.1-b11-SNAPSHOT/maven-metadata.xml from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2.727 s
> [INFO] Finished at: 2026-02-04T15:09:20+01:00
> [INFO]
> ------------------------------------------------------------------------
> [INFO] 0 goals, 0 executed
> [ERROR] Failed to execute goal on project hive-hbase-handler: Could not
> collect dependencies for project
> org.apache.hive:hive-hbase-handler:jar:4.3.0-SNAPSHOT
> [ERROR] Failed to read artifact descriptor for
> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT
> [ERROR] Caused by: The following artifacts could not be resolved:
> org.glassfish:javax.el:pom:3.0.1-b06-SNAPSHOT (absent): Could not transfer
> artifact org.glassfish:javax.el:pom:3.0.1-b06-SNAPSHOT from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [ERROR] Failed to read artifact descriptor for
> org.glassfish:javax.el:jar:3.0.1-b07-SNAPSHOT
> [ERROR] Caused by: The following artifacts could not be resolved:
> org.glassfish:javax.el:pom:3.0.1-b07-SNAPSHOT (absent): Could not transfer
> artifact org.glassfish:javax.el:pom:3.0.1-b07-SNAPSHOT from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [ERROR] Failed to read artifact descriptor for
> org.glassfish:javax.el:jar:3.0.1-b08-SNAPSHOT
> [ERROR] Caused by: The following artifacts could not be resolved:
> org.glassfish:javax.el:pom:3.0.1-b08-SNAPSHOT (absent): Could not transfer
> artifact org.glassfish:javax.el:pom:3.0.1-b08-SNAPSHOT from/to
> jvnet-nexus-snapshots
> (https://maven.java.net/content/repositories/snapshots): status code: 402,
> reason phrase: Payment Required (402)
> [ERROR]
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> {code}
> The dependency chain can be analyzed with {{{}mvn -X{}}}:
> {code:java}
> $ mvn -X clean install -pl hbase-handler -DskipTests -Pitests
> -Denforcer.skip=true | grep "Failed to collect dependencies at"
> [ERROR] : Failed to collect dependencies at
> org.apache.hbase:hbase-testing-util:jar:tests:2.5.6-hadoop3 ->
> org.apache.hbase:hbase-server:jar:tests:2.5.6-hadoop3 ->
> org.glassfish.web:javax.servlet.jsp:jar:2.3.2 ->
> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT
> Caused by: org.eclipse.aether.collection.DependencyCollectionException:
> Failed to collect dependencies at
> org.apache.hbase:hbase-testing-util:jar:tests:2.5.6-hadoop3 ->
> org.apache.hbase:hbase-server:jar:tests:2.5.6-hadoop3 ->
> org.glassfish.web:javax.servlet.jsp:jar:2.3.2 ->
> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)