首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >VirtualBox - Ubuntu trustAnchors参数必须为非空

VirtualBox - Ubuntu trustAnchors参数必须为非空
EN

Stack Overflow用户
提问于 2018-04-27 20:48:08
回答 3查看 4.2K关注 0票数 6

我需要用maven来做一个与飞机有关的项目。我正在尝试安装这批https://www.aerospike.com/docs/tools/asloader/index.html

所以我使用virtualBox (5.2.8)来创建一个Linux,最后一个版本是Ubuntu18.04LTS。我安装了许多软件包

Java

代码语言:javascript
复制
yvon@yvon-VirtualBox:~/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

代码语言:javascript
复制
yvon@yvon-VirtualBox:~/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"

当我使用这个简单的命令

代码语言:javascript
复制
mvn clean -X 

我得到了这个错误

代码语言:javascript
复制
yvon@yvon-VirtualBox:~/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

我认为这个问题来自于这个错误:,trustAnchors参数必须是非空的

因此,在许多情况下,这个命令解决了sudo update-ca-证书-f的问题。

在我的例子中,这没什么,但问题仍然存在

代码语言:javascript
复制
Updating certificates in /etc/ssl/certs...
133 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

你有办法解决这个问题吗?

伊万

EN

回答 3

Stack Overflow用户

发布于 2018-05-28 14:10:26

在我的例子中(ubuntu18.04,maven 3.5.2) -以下内容帮助解决了这个问题:

代码语言:javascript
复制
sudo rm /etc/ssl/certs/java/cacerts
sudo update-ca-certificates --fresh
票数 16
EN

Stack Overflow用户

发布于 2018-04-28 20:33:09

如果您的程序在参数java -Djavax.net.ssl.trustStorePassword=changeit ...中运行得很好,那么这个解决方案可能与您相关:

代码语言:javascript
复制
/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

请参见:

票数 6
EN

Stack Overflow用户

发布于 2018-07-20 08:09:47

Apache 3.5.2,Ubuntu18.04LTS,OpenJDK 10.0.1 (虚拟盒和笔记本)

我昨天也遇到了同样的问题。在我的例子中,唯一有帮助的是删除旧证书,并手动将证书从oracle 10复制到文件夹中。

代码语言:javascript
复制
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/

希望这能帮上忙。

学分:Tyler Ruppert

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50070086

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档