Exception:
Exception in thread “main” java.lang.IllegalArgumentException : URLDecoder: Illegal hex characters in escape (%) pattern – For input string: “u9”
at java.net.URLDecoder .decode( URLDecoder.java:194 )
at com.hbzx.controller . PayResultController.main ( PayResultController.java:253 )
reasons:
Java call URLDecoder.decode (STR, “UTF-8”); the main reason for throwing the above exception is that% is a special character in the URL and needs special escape,
Solution: replace the% sign in the string with% 25
solve:
url = url.replaceAll("%(?![0-9a-fA-F]{2})", "%25");
String urlStr = URLDecoder.decode(url, "UTF-8");
D-page address: https://blog.csdn.net/afgasdg/article/details/40304817
Read More:
- java.lang.IllegalArgumentException : URI scheme is not “file” error resolution
- java.lang.IllegalArgumentException: Address 127.0.0.1:5672:5672 seems to contain an unquoted IPv6
- java.lang.IllegalArgumentException: column ‘_id’ does not exist
- java.lang.IllegalArgumentException: Receiver not registered:
- Springboot startup error: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTempla
- java.lang.IllegalArgumentException: Index for header ‘XXX‘ is 1 but CSVRecord only has 1 value
- java.lang.IllegalArgumentException : URI is not absolute error
- Error java.lang.IllegalArgumentException: Validation failed for query for method public abstract
- java.lang.IllegalArgumentException : could not get next sequenced ID for sequence name: Visitor solution
- java.lang.IllegalArgumentException: error at ::0 can‘t find referenced pointcut anyMethod
- Realize the simplest recursive call, simulate exception in thread “main” java.lang.stackoverflowerror exception
- Request processing failed;nested exception is java.lang.*
- java.lang.IllegalStateException Exception: cause analysis and solution
- JMeter running error response code: non HTTP response code: java.lang.illegalargumentexception find and solve
- keytool error: java.lang.Exception: Failed to establish chain from reply
- How to Fix:java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- Spring nested exception is java.lang.NoClassDefFoundError: org/springframework/core/MethodClassKey
- java.lang.Throwable: Substituted for the exception com.bea.xml.SchemaTypeLoaderException which lack
- Mybatis exception error setting driver on unpoleddatasource. Cause: java.lang.ClassNotFoundException :