webentwicklung-frage-antwort-db.com.de

VirtualBox - Ubuntu - Maven - Fehler Der Parameter "trustAnchors" darf nicht leer sein

Für ein Projekt mit Aerospike muss ich maven verwenden. Ich versuche, diese Gruppe zu installieren https://www.aerospike.com/docs/tools/asloader/index.html

Ich arbeite an Windows 7 . Also verwende ich virtualBox (5.2.8), um eine Linux-Maschine mit der letzten Version von Ubuntu 18.04 LTS ..__ zu erstellen 

Java

[email protected]:~/aerospike-loader$ Java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

Maven

[email protected]:~/aerospike-loader$ mvn --version
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /usr/lib/jvm/Java-11-openjdk-AMD64
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-20-generic", Arch: "AMD64", family:"unix"

Wenn ich diesen einfachen Befehl verwende

mvn clean -X 

ich erhalte diesen Fehler

[email protected]:~/aerospike-loader$ mvn clean -X
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /usr/lib/jvm/Java-11-openjdk-AMD64
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-20-generic", Arch: "AMD64", family: "unix"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method Java.lang.ClassLoader.defineClass(Java.lang.String,byte[],int,int,Java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[DEBUG] Created new class realm maven.api
...[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /home/yvon/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/share/maven/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/yvon/.m2/toolchains.xml
[DEBUG] Using local repository at /home/yvon/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/yvon/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.aerospike:aerospike-load:jar:2.2: (none)
[DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.aerospike:aerospike-load:jar:2.2
[DEBUG] Tasks:   [clean]
[DEBUG] Style:   Regular
[DEBUG] =======================================================================
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Aerospike DSV Loader 2.2
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://nexus.opendaylight.org/content/repositories/public/
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://nexus.opendaylight.org/content/repositories/public/
Downloading from opendaylight-mirror: https://nexus.opendaylight.org/content/repositories/public/org/Apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[DEBUG] Writing tracking file /home/yvon/.m2/repository/org/Apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom.lastUpdated
[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/org/Apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[DEBUG] Writing tracking file /home/yvon/.m2/repository/org/Apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.402 s
[INFO] Finished at: 2018-04-27T22:36:01+02:00
[INFO] Final Memory: 8M/256M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.Apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.Apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.Apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to opendaylight-mirror (https://nexus.opendaylight.org/content/repositories/public/): Java.lang.RuntimeException: Unexpected error: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
org.Apache.maven.plugin.PluginResolutionException: Plugin org.Apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.Apache.maven.plugins:maven-clean-plugin:jar:2.5
...
Caused by: org.Eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.Apache.maven.plugins:maven-clean-plugin:jar:2.5
...
Caused by: org.Eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.Apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to opendaylight-mirror (https://nexus.opendaylight.org/content/repositories/public/): Java.lang.RuntimeException: Unexpected error: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
...
Caused by: org.Eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.Apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to opendaylight-mirror (https://nexus.opendaylight.org/content/repositories/public/): Java.lang.RuntimeException: Unexpected error: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
....
Caused by: org.Apache.maven.wagon.TransferFailedException: Java.lang.RuntimeException: Unexpected error: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
   ...
Caused by: javax.net.ssl.SSLException: Java.lang.RuntimeException: Unexpected error: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
...
Caused by: Java.lang.RuntimeException: Unexpected error: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
....
Caused by: Java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
...
[ERROR] 
[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/PluginResolutionException

Ich denke, dass das Problem von diesem Fehler stammt: Der Parameter trustAnchors darf nicht leer sein

In vielen Fällen löst dieser Befehl das Problem Sudo Update-CA-Zertifikate -f

In meinem Fall ist das in Ordnung, aber das Problem ist immer noch vorhanden

Updating certificates in /etc/ssl/certs...
133 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Haben Sie eine Idee, um dieses Problem zu lösen?

Yvon

5
Dahu29

In meinem Fall (ubuntu 18.04, maven 3.5.2) half folgendes , Dieses Problem zu beseitigen:

Sudo rm /etc/ssl/certs/Java/cacerts
Sudo update-ca-certificates --fresh
15
Aydin K.

Wenn Ihr Programm mit dem Parameter Java -Djavax.net.ssl.trustStorePassword=changeit ... einwandfrei läuft, könnte diese Problemumgehung für Sie relevant sein:

/usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/Java/cacerts

/var/lib/dpkg/info/ca-certificates-Java.postinst configure

Sehen: 

5
Mikael Gueck

Apache Maven 3.5.2, Ubuntu 18.04 LTS, OpenJDK 10.0.1 (virtuelle Box und Notebook)

Ich hatte gestern das gleiche Problem. Das einzige, was in meinem Fall geholfen hat, war das alte Zertifikat zu entfernen und das Zertifikat manuell aus dem Oracle JDK 10 in den Ordner zu kopieren. 

1. Donwload Oracle JDK 10

2. Unpack the archive

3. Sudo rm /etc/ssl/certs/Java/cacerts

4. Sudo cp jdk-10-0-2/lib/security/cacerts /etc/ssl/certs/Java/

Hoffe das hilft jemandem.

Credits: Tyler Ruppert

1
NeXT405