从何处“包含非LDH ASCII字符"?异常来自哪里? [英] From where does the "Contains non-LDH ASCII characters" exception come from?

查看:90
本文介绍了从何处“包含非LDH ASCII字符"?异常来自哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个应用程序(春季木兰),该应用程序在新的一年(2018年)左右开始对我抛出此异常,但对其他任何同事都没有.

I develop an application (spring-magnolia) that around this new year (2018) started to throw for me this exception but not for any other colleagues.

例外是正确的,在已配置的主机名中有一个 _ ,因此域名应该是固定的.尽管如此,它仍然在工作,对于其他人来说,它仍然在工作,没有抛出此异常.我尝试了许多不同的方法,从tomcat设置到使用较旧的JRE(1.7)...甚至从Ubuntu切换到Windows,但都没有留下例外.

The exception is right, there is an _ in the a configured host name, so that domain name should be fixed. Still, it was working before and for the other folks it is still working, not throwing this exception. I tried many different things, from tomcat settings to using an older JRE (1.7)... and even switched from Ubuntu to Windows but the exception wasn't left behind.

我的一位同事正在办公室里使用Mac与我一起工作,我可以查找他的设置以了解引起这种变化的原因,但是我真的不知道我还应该查找哪些工具,环境是相同的(行家,相同的代码,尝试了不同的jdks).

One of my mates is working with me in the office, using Mac, and I could look up his settings to catch what is making this difference, but don't really know what else should I look up as the tools, environment are the same (maven, same code, tried different jdks).

有人能给我一个线索是什么触发了我而不是其他人触发异常,如果我可以将其设置为忽略该异常的地方?

Could someone give me a clue what triggered the exception for me but not for others and if I could set it somewhere to ignore this exception?

Caused by: java.security.cert.CertificateException: Illegal given domain name: xyz_t-bud.rd-services.com
    at sun.security.util.HostnameChecker.matchDNS(Unknown Source)
    at sun.security.util.HostnameChecker.match(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    ... 135 more
Caused by: java.lang.IllegalArgumentException: Contains non-LDH ASCII characters
    at java.net.IDN.toASCIIInternal(Unknown Source)
    at java.net.IDN.toASCII(Unknown Source)
    at javax.net.ssl.SNIHostName.<init>(Unknown Source)
    ... 141 more

推荐答案

很显然,我没有在测试较旧的JDK,因为eclipse并没有采用它.卸载最新的JDK 1.8.0_161 并安装我的同事拥有的JDK,即 1.8.0_111 后,我不再遇到此错误...我确实尝试了这个JDK,但是我没有卸载最新的JDK,因此该项目实际上仍在使用最新的JDK ...

Apparently I wasn't testing with older JDKs, as eclipse wasn't picking it up. After uninstalling the latest JDK 1.8.0_161and installing the JDK that my colleague is having, that is 1.8.0_111 I am no longer getting this error... I did try this JDK before, but I didn't uninstall the latest JDK and so the project was in fact still using the latest JDK...

这篇关于从何处“包含非LDH ASCII字符"?异常来自哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆