org.apache.commons.codec.DecoderException:Illegal hexadecimal character h at index 4

org.apache.commons.codec.DecoderException: Illegal hexadecimal character h at index 4

2019-01-25 17:42:52,838|ERROR|InfoPointThread-27|com.eshore.ecache.helper.CassandraHelper.getCluster(CassandraHelper.java:52)
|poc-216|-1|10850|OcgAux-1-0|failed when decrypt the password^M
com.dcs.common.exception.RtManagerException: org.apache.commons.codec.DecoderException: Illegal hexadecimal character h at index 4
        at com.dcs.common.utils.encode.EncodesUtil.decodeHex(EncodesUtil.java:51)
        at com.eshore.ecache.tools.PasswordUtil.decrypt(PasswordUtil.java:34)
        at com.eshore.ecache.helper.CassandraHelper.getSession(CassandraHelper.java:99)
        at com.eshore.ecache.helper.CassandraHelper.getCluster(CassandraHelper.java:52)
        at com.eshore.ecache.dao.EntityDAO.(EntityDAO.java:61)
        at com.eshore.ecache.dao.EntityDAO.(EntityDAO.java:57)
        at com.eshore.ecache.dao.EntityDAO$EntityDAOHolder.(EntityDAO.java:55)
        at com.eshore.ecache.dao.EntityDAO.getInstance(EntityDAO.java:64)
        at com.eshore.cs.restapi.adaptor.Cassadaptor.(Cassadaptor.java:42)
        at com.eshore.cs.restapi.adaptor.watch.UpdateDog.lick(UpdateDog.java:68)
        at com.eshore.cs.restapi.adaptor.watch.UpdateDog.wang(UpdateDog.java:57)
        at com.eshore.cs.restapi.adaptor.ECacheAdaptor.modifyByJSON(ECacheAdaptor.java:226)
        at com.eshore.cs.restapi.ECache.updateByJSON(ECache.java:80)
        at com.dcs.core.cfgcash.impl.UpdateCashManagerImpl.updateByJSON(UpdateCashManagerImpl.java:53)
        at com.dcs.auxiliary.core.infopoint.thread.InfoPointThread.processInfoFile(InfoPointThread.java:347)
        at com.dcs.auxiliary.core.infopoint.thread.InfoPointThread.runBusiness(InfoPointThread.java:215)
        at com.dcs.procframe.core.thread.ThreadTemplate.run(ThreadTemplate.java:234)
Caused by: org.apache.commons.codec.DecoderException: Illegal hexadecimal character h at index 4
        at org.apache.commons.codec.binary.Hex.toDigit(Hex.java:178)
        at org.apache.commons.codec.binary.Hex.decodeHex(Hex.java:89)
        at com.dcs.common.utils.encode.EncodesUtil.decodeHex(EncodesUtil.java:49)
        ... 16 common frames omitted
2019-01-25 17:42:52,844|INFO|InfoPointThread-27|com.eshore.cs.restapi.adaptor.watch.UpdateDog.lick(UpdateDog.java:95)

这个报的非法的十六进制字母“h”,位置在index4

大家知道十六进制数:一般用数字0到9和字母A到F(或a~f)表示,其中:A~F表示10~15。所以"h"是不属于十六进制数的,这里报错了。我这边是cassandra的配置文件中,密码本该用十六进制的密文,可是这边忘记加密,配置的明文,明文中有个“h”被认为不是十六进制的字母,故报错。将加密后的密码更新到配置文件,问题解决。

 

你可能感兴趣的:(org.apache.commons.codec.DecoderException:Illegal hexadecimal character h at index 4)