Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1883751
Summary: | F33 maven is failing at basic tasks like openliberty: liberty:dev java.lang.ExceptionInInitializerError in plugins | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | space88man <shihping.chan> |
Component: | maven | Assignee: | Christopher Tubbs <ctubbsii> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 33 | CC: | ctubbsii, decathorpe, java-maint-sig, java-sig-commits, mizdebsk, msrb, sochotni |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | maven-3.6.3-5.fc33 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-10-25 01:01:13 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
space88man
2020-09-30 07:00:17 UTC
To reproduce you need a clean ~/.m2/repository. If that directory and the repo target/ has been prepped by a working maven then F33's mvn will generally succeed. "Steps to Reproduce:", above, is incomplete. It should be: 1. git clone https://github.com/openliberty/guide-getting-started.git 2. cd guide-getting-started/finish 3. rm -rf ~/.m2/repository/io/openliberty/ 4. mvn -X liberty:dev Have you tried specifying the exact coordinates of liberty-maven-plugin, as in: mvn -X io.openliberty.tools:liberty-maven-plugin:3.2.3:dev Narrowing down the coordinates like this can help isolate the problem. Thanks for the tip: I have tried again specifying 3.2.3 and am seeing (with the first "Caused by" clause much further down) [DEBUG] Could not find metadata io.openliberty:openliberty-kernel/maven-metadata.xml in local (/btrfs/richard/.m2/repository ) [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/io/openliberty/openliberty-kernel/maven-metadata.xml [DEBUG] Writing tracking file /btrfs/richard/.m2/repository/io/openliberty/openliberty-kernel/resolver-status.properties [WARNING] Could not transfer metadata io.openliberty:openliberty-kernel/maven-metadata.xml from/to central (https://repo.mav en.apache.org/maven2): User-specified log class 'org.codehaus.mojo.pluginsupport.logging.DelegatingLog' cannot be found or i s not useable. org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata io.openliberty:openliberty-kernel/maven-m etadata.xml from/to central (https://repo.maven.apache.org/maven2): User-specified log class 'org.codehaus.mojo.pluginsuppor t.logging.DelegatingLog' cannot be found or is not useable. at org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed (MetadataTransportListener.java:52) at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:369) at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75) at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:644 Caused by: org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.codehaus.mojo.pluginsupport.logging.DelegatingLog' cannot be found or is not useable. at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation (LogFactoryImpl.java:804) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance (LogFactoryImpl.java:541) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance (LogFactoryImpl.java:292) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance (LogFactoryImpl.java:269) at org.apache.commons.logging.LogFactory.getLog (LogFactory.java:655) at org.apache.http.impl.client.BasicAuthCache.<init> (BasicAuthCache.java:63) at org.apache.http.impl.client.BasicAuthCache.<init> (BasicAuthCache.java:81) at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.openConnectionInternal (AbstractHttpClientWagon.java:601) at org.apache.maven.wagon.AbstractWagon.openConnection (AbstractWagon.java:139) at org.apache.maven.wagon.AbstractWagon.connect (AbstractWagon.java:239) at org.eclipse.aether.transport.wagon.WagonTransporter.connectWagon (WagonTransporter.java:342) at org.eclipse.aether.transport.wagon.WagonTransporter.pollWagon (WagonTransporter.java:382) at org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:431) at org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:412) All the other "Caused by": Caused by: org.apache.maven.plugin.MojoExecutionException: Could not get the highest version from the range: [19.0.0.6,) at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:234) at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:158) at io.openliberty.tools.maven.BasicSupport.init (BasicSupport.java:226) at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:119) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) Caused by: org.eclipse.aether.resolution.VersionRangeResolutionException: Unable to resolve version range fram io.openliberty:openliberty-kernel:zip:[19.0.0.6,) at io.openliberty.tools.maven.AbstractLibertySupport.resolveVersionRange (AbstractLibertySupport.java:335) at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:232) at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:158) at io.openliberty.tools.maven.BasicSupport.init (BasicSupport.java:226) at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:119) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) When I use upstream maven [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/io/openliberty/openliberty-kernel/maven-metadata.xml [DEBUG] Writing tracking file /btrfs/richard/.m2/repository/io/openliberty/openliberty-kernel/resolver-status.properties Then it succeeds with [DEBUG] Available versions: [19.0.0.6, 19.0.0.7, 19.0.0.8, 19.0.0.9, 19.0.0.10, 19.0.0.11, 19.0.0.12, 20.0.0.1, 20.0.0.2, 20.0.0.3, 20.0.0.4, 20.0.0.5, 20.0.0.6, 20.0.0.7, 20.0.0.8, 20.0.0.9, 20.0.0.10] [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2 Downloading from central: https://repo.maven.apache.org/maven2/io/openliberty/openliberty-kernel/20.0.0.10/openliberty-kerne Not reproducible under Fedora 32 — these versions work: maven-3.6.1-5.fc32.noarch java-11-openjdk-11.0.8.10-2.fc32.x86_64 The error seems show trouble resolving dependencies of commons-logging. However, it looks like upstream Maven uses jcl-over-slf4j-1.7.29.jar on its path to redirect commons-logging implementation to slf4j (and then provides its own maven-slf4j-provider-3.6.3.jar for the implementation). I do see that the Maven packaging seems to `Requires: commons-logging` and the following command shows the package includes some extra stuff in its lib directory which are not included upstream (notably, `commons-logging`, which shouldn't be there). Here's a complete difference between /usr/share/maven/lib and upstream's lib directory: --- /tmp/upstream-lib-directory.txt 2020-09-30 04:22:03.358919647 -0400 +++ /tmp/usr-share-maven-lib.txt 2020-09-30 04:22:05.535925914 -0400 @@ -1 +1 @@ -cdi-api-1.0.jar +cdi-api-1.1.jar @@ -2,0 +3,2 @@ +commons-codec-1.11.jar +commons-codec.jar @@ -5 +7,2 @@ -guava-25.1-android.jar +commons-logging.jar +guava-27.1-jre.jar @@ -6,0 +10,5 @@ +hawtjni-runtime-1.17.jar +httpclient-4.5.12.jar +httpcomponents_httpclient.jar +httpcomponents_httpcore.jar +httpcore-4.4.13.jar @@ -7,0 +16,2 @@ +jansi-linux.jar +jansi-native-1.8.jar @@ -31,0 +42 @@ +maven-wagon_http-shared.jar @@ -41 +52,2 @@ -wagon-http-3.3.4-shaded.jar +wagon-http-3.3.4.jar +wagon-http-shared-3.4.1.jar I think commons-logging shouldn't be there at all, since jcl-over-slf4j is already present. Oh - that seems to have worked - I removed commons-logging.jar from /usr/share/maven/lib and the goal runs sucessfully. The odd thing is that it works on Fedora 32 and commons-logging.jar is there too. There are a few other differences in F32 as well. It's possible that in F32, other stuff is also on the class path that makes it work, or that the classes are found in jcl-over-slf4j first there... by luck. Either way, it seems like commons-logging shouldn't be there at all, and I'm not sure why it is. I'm also not sure why commons-codec is on there at all, never mind the fact that it's there twice. I'm working on a fix for F33 for the commons-logging issue. Please test it once it is merged and built (a comment should appear here once that happens). FEDORA-2020-51797730bf has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-51797730bf FEDORA-2020-51797730bf has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-51797730bf` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-51797730bf See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-51797730bf has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. |