本文翻译自:Error - trustAnchors parameter must be non-empty

I'm trying to configure my e-mail on Jenkins/Hudson, and I constantly receive the error: 我正在尝试在Jenkins / Hudson上配置我的电子邮件,并且不断收到错误消息:

java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must benon-empty

I've seen a good amount of information online about the error, but I have not gotten any to work. 我已经在网上看到了大量有关该错误的信息,但是我没有得到任何帮助。 I'm using Sun's JDK on Fedora Linux (not OpenJDK). 我在Fedora Linux(不是OpenJDK)上使用Sun的JDK。

Here are a few things I've tried. 这是我尝试过的几件事。 I tried following the advice from this post , but copying the cacerts from Windows over to my Fedora box hosting Jenkins didn't work. 我试着从以下这个建议后 ,但复制从Windows的cacerts到托管詹金斯没有工作,我的Fedora箱。 I tried following this guide as I'm trying to configure Gmail as my SMTP server, but it didn't work either. 在尝试将Gmail配置为SMTP服务器时,我尝试按照本指南进行操作,但是该方法也不起作用。 I also tried to download and move those cacert files manually and move them over to my Java folder using a variation of the commands on this guide . 我还尝试手动下载并移动这些cacert文件,并使用本指南中各种命令将它们移动到Java文件夹中。

I am open to any suggestions as I'm currently stuck right now. 我愿意接受任何建议,因为我目前仍处于停滞状态。 I have gotten it to work from a Windows Hudson server, but I am struggling on Linux. 我已经从Windows Hudson服务器上运行了它,但是我在Linux上苦苦挣扎。


#1楼

参考:https://stackoom.com/question/SSwp/错误-trustAnchors参数必须为非空


#2楼

I ran into this solution from blog post Fixing the trustAnchors problem when running OpenJDK 7 on OS X : 我在博客文章《 解决在OS X上运行OpenJDK 7时的trustAnchors问题》中遇到了这个解决方案:

Fixing the trustAnchors problem when running OpenJDK 7 on OS X. If you're running OpenJDK 7 on OS X and have seen this exception: 在OS X上运行OpenJDK 7时,解决了trustAnchors问题。如果在OS X上运行OpenJDK 7,并已看到此异常:

Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchorsparameter must be non-empty

There's a simple fix. 有一个简单的解决方法。 Just link in the same cacerts file that Apple's JDK 1.6 uses: 只需链接到Apple JDK 1.6使用的cacerts文件中即可:

cd $(/usr/libexec/java_home -v 1.7)/jre/lib/security
ln -fsh /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts

You need to do this for every OpenJDK version you have installed. 您需要为已安装的每个OpenJDK版本执行此操作。 Just change -v 1.7 to the version you want to fix. 只需将-v 1.7更改为要修复的版本即可。 Run /usr/libexec/java_home -V to see all the JREs and JDKs you have installed. 运行/usr/libexec/java_home -V以查看您已安装的所有JRE和JDK。

Perhaps the OpenJDK guys could add this to their install scripts. 也许OpenJDK家伙可以将其添加到他们的安装脚本中。


#3楼

In Ubuntu 12.10 (Quantal Quetzal) or later, the certificates are held in the ca-certificates-java package. 在Ubuntu 12.10 (Quantal Quetzal)或更高版本中,证书保存在ca-certificates-java软件包中。 Using -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts will pick them up regardless of what JDK you're using. 无论使用什么JDK,使用-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts都会选择它们。


#4楼

I ran into this exact problem on OS X, using JDK 1.7, after upgrading to OS X v10.9 (Mavericks). 在升级到OS X v10.9 (Mavericks)之后,我在使用JDK 1.7的OS X上遇到了这个确切的问题。 The fix that worked for me was to simply reinstall the Apple version of Java, available at http://support.apple.com/kb/DL1572 . 对我有用的修补程序是简单地重新安装Apple版本的Java,可从http://support.apple.com/kb/DL1572获得 。


#5楼

I also encountered this on OS X after updating OS X v10.9 (Mavericks), when the old Java 6 was being used and tried to access an HTTPS URL. 当使用旧的Java 6并尝试访问HTTPS URL时,在更新OS X v10.9(Mavericks)之后,我也在OS X上遇到了此问题。 The fix was the inverse of Peter Kriens; 解决的方法是彼得·克林斯(Peter Kriens)的反面。 I needed to copy the cacerts from the 1.7 space to the location linked by the 1.6 version: 我需要将cacerts从1.7空间复制到1.6版本链接的位置:

(as root)
umask 022
mkdir -p /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security
cp $(/usr/libexec/java_home -v 1.7)/jre/lib/security/cacerts \/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security

#6楼

I've had lot of security issues after upgrading to OS X v10.9 (Mavericks): 升级到OS X v10.9 (Mavericks)后,我遇到了很多安全问题:

  • SSL problem with Amazon AWS Amazon AWS的SSL问题
  • Peer not authenticated with Maven and Eclipse 对等方未通过Maven和Eclipse进行身份验证
  • trustAnchors parameter must be non-empty trustAnchors参数必须为非空

I applied this Java update and it fixed all my issues: http://support.apple.com/kb/DL1572?viewlocale=en_US 我应用了此Java更新,并修复了所有问题: http : //support.apple.com/kb/DL1572?viewlocale=zh_CN

错误-trustAnchors参数必须为非空相关推荐

  1. java中如何限制输入非空_项目中的参数限制、非空、以及集合中的验证,你真的会做吗(Java)...

    背景: 在项目管理中,我们通常要对一个个参数做验证, 前端校验,后端加校验,这里为了保证校验的一致性,我们需要将我们的校验写的比较高效率一点,不至于满篇都是is null的进行参数验证,为了成为一个成 ...

  2. MySQL 之 约束 (主键、唯一、非空、自增、外键)

    MySQL 之 约束 (主键.唯一.非空.自增.外键) 目的:使得数据更准确,更完整. 约束的分类: 1.键约束 (1)主键约束 (2)唯一键约束 (3)外键约束 2.非空约束 3.默认值约束 4.自 ...

  3. C++ 中判断非空的错误指针

    最近在写网络上的东西,程序经过长时间的运行,会出现崩溃的问题,经过DUMP文件的查看,发现在recv的地方接收返回值的时候,数据的长度异常的大差不多16亿多字节.而查看分配后的char指针显示为错误的 ...

  4. Java 自定义注解实现springMVC 参数校验非空判断,为空 则返回响应为空信息

    欢迎关注博主公众号:[纯洁的明依]文章由陈晓阳原创. 本人微信:chenxiaoyangzxy. 免费提供本人大量学习资料. 简单概括定义注解的步骤以及作用: 一:明确注解的使用空间(类 方法 等) ...

  5. js校验其他参数(非空、邮箱、url等)

    1.非空校验 isEmpty: function(obj) {return (typeof obj !== 'undefined') && (obj !== null) &&a ...

  6. SpringBoot基于AOP实现自定义非空验证的注解

    为了避免对大量参数进行过多的非空校验,我们可以自定义一个非空验证的注解,因为spring自带的@RequestParam并不能对参数进行非空 准备工作 首先需要创建一个spring boot项目,并引 ...

  7. Kotlin如何避免“!!”(非空断言)

    当我们把Java自动转成Kotlin的时候,代码里会出现很多非空断言!!.或者某些场景下因为IDE提示或编译错误,也让我们自己加上了一些!!. 但使用!!的后果是有可能抛出IllegalArgumen ...

  8. 问题解决:SqlParameterCollection只接受非空的SqlParameter类型对象,不接受SqlParameter[]对象

    做.net个人版机房收费系统时,遇到了这样一个问题: 既然提到了SqlParameter,那就意味着设置参数处出现了问题,但是到底是哪里出了问题呢,之前运行的时候也没有出错呀,怎么现在又出现了这样的错 ...

  9. java 多态判断非空_收藏Java 面试题全梳理

    脚本之家 你与百万开发者在一起 来源 | Java建设者(ID:javajianshe) 作者 |cxuan 如若转载请联系原公众号 Java 基础篇 Java 有哪些特点 并发性的:你可以在其中执行 ...

最新文章

  1. Mycat常见问题与解决方案
  2. .OCX、.dll文件注册命令Regsvr32的使用
  3. ik分词器 分词原理_Solr7.7.2中文分词器
  4. qt combox 向上弹出_一睹芳容!人类首次拍到活的公羊角乌贼 手臂和触须向上飞速穿过水柱...
  5. eCognition易康导出分割结果
  6. BUUCTF-----actf_2019_babyheap (UAF)
  7. SSM整合+分页+Druid+CRU+log4J+junit+事务+Json+Bootstrap入门教程总览目录
  8. Oracle-RAC安装随笔
  9. uedit富文本编辑器
  10. 用python做简单的地理聚类分析案例_用Python做一个简单的翻译工具
  11. C#如何卸载已安装的Windows Service服务
  12. CSDN的私信,手机与电脑发的消息,不能同时显示?
  13. 计算机添加桌面小插件,一款实用的Windows小插件 ——桌面日历DesktopCal
  14. 网络相关知识(重点讲解KB和Kbps,让你理清这两者关系)
  15. Typora:明明保存了,但是却内容丢失了
  16. 迷你计算机主板,打造最强MINI主机 五款高规ITX主板推荐
  17. 小程序需要买ssl数字证书吗
  18. MySQL数据库代理技术
  19. 装机必备检测软件全集
  20. 【机器学习笔记11】高斯混合模型(GMM)【上篇】原理与推导

热门文章

  1. NLB群集的两种操作模式-2
  2. WCF后传系列(2):深入WCF寻址Part 2—自定义寻址报头
  3. jqGrid资料总结
  4. Cobalt Strike 3.13的新功能
  5. 构建自己的PHP框架(MVC)
  6. autolayout中 top layout guide详解
  7. 总结:request.setAttribute()、session.setAttribute()和request.getParameter()的联系与区别
  8. APUE学习笔记:第五章 标准I/O库
  9. F2工作流引擎之 工作流运转模型(三)
  10. YII framework CComponent基础类解读(转)