Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef6f333

Browse files
atptrosjj3086786
authored andcommitted
add README exception
1 parent 977b448 commit ef6f333

File tree

7 files changed

+109
-8
lines changed

7 files changed

+109
-8
lines changed

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class Main {
102102
* [代理配置](./docs/6-Proxy-CN.md)
103103
* [调试](./docs/7-Debug-CN.md)
104104
* [日志](./docs/8-Log-CN.md)
105-
105+
* [异常](./docs/9-Exception-CN.md)
106106

107107
## 问题
108108
[提交 Issue](https://github.com/aliyun/aliyun-openapi-java-sdk/issues/new),不符合指南的问题可能会立即关闭。

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public class Main {
114114
* [Proxy Configurations](./docs/6-Proxy-EN.md)
115115
* [Debug](./docs/7-Debug-EN.md)
116116
* [Log](./docs/8-Log-EN.md)
117+
* [Exception](./docs/9-Exception-EN.md)
117118

118119

119120
## Issues
@@ -133,4 +134,4 @@ Please make sure to read the [Contributing Guide](CONTRIBUTING.md) before making
133134
## License
134135
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
135136

136-
Copyright 1999-2019 Alibaba Group Holding Ltd.
137+
Copyright 1999-2019 Alibaba Group Holding Ltd.

docs/2-Client-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ access_key_secret = bar
7474
role_arn = role_arn
7575
role_session_name = session_name # 选填
7676

77-
[client3] # 命名为 `client4` 的配置
77+
[client3] # 命名为 `client3` 的配置
7878
type = rsa_key_pair # 认证方式为 rsa_key_pair
7979
public_key_id = publicKeyId # Public Key ID
8080
private_key_file = /your/pk.pem # Private Key 文件
@@ -149,4 +149,4 @@ public class Main {
149149
```
150150

151151
***
152-
[← 安装](1-Installation-CN.md) | 客户端[(English)](2-Client-EN.md) | [连接池 →](3-Pool-CN.md)
152+
[← 安装](1-Installation-CN.md) | 客户端[(English)](2-Client-EN.md) | [连接池 →](3-Pool-CN.md)

docs/8-Log-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[← 调试](7-Debug-CN.md) | 日志[(English)](8-Log-EN.md) | [首页](../README-CN.md)
1+
[← 调试](7-Debug-CN.md) | 日志[(English)](8-Log-EN.md) | [异常](9-Exception-CN.md)
22
***
33

44

@@ -57,4 +57,4 @@ clientConfig.setLogFormat(format)
5757
| {time} | 日志记录时间 |
5858

5959
***
60-
[← 调试](7-Debug-CN.md) | 日志[(English)](8-Log-EN.md) | [首页](../README-CN.md)
60+
[← 调试](7-Debug-CN.md) | 日志[(English)](8-Log-EN.md) | [异常](9-Exception-CN.md)

docs/8-Log-EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[← Debug](7-Debug-EN.md) | Log[(中文)](8-Log-CN.md) |[Home](../README.md)
1+
[← Debug](7-Debug-EN.md) | Log[(中文)](8-Log-CN.md) |[Exception](9-Exception-EN.md)
22

33
***
44

@@ -56,4 +56,4 @@ The following variable substitutions are supported:
5656
| {time} | Log Time |
5757

5858
***
59-
[← Debug](7-Debug-EN.md) | Log[(中文)](8-Log-CN.md) |[Home](../README.md)
59+
[← Debug](7-Debug-EN.md) | Log[(中文)](8-Log-CN.md) |[Exception](9-Exception-EN.md)

docs/9-Exception-CN.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[← 日志](8-Log-CN.md) | 异常[(English)](9-Exception-EN.md) | [首页 →](../README-CN.md)
2+
***
3+
4+
# 问题
5+
6+
| 异常信息 | 解决办法 |
7+
|----------------------|------------------|
8+
| content has not been provided | 升级到最新版本 |
9+
| ExceptionInInitializerError |升级到最新版本|
10+
| NoClassDefFoundError |添加缺少的依赖包|
11+
| SocketTimeoutException has occurred on a socket read or accept. |设置合理的超时时间|
12+
| Specified signature nonce was used already. |升级到最新版本|
13+
| NoSuchMethodError |添加缺少的依赖包|
14+
| MissingSecurityToken | 升级到最新版本 |
15+
| Specified access key is not found |[检查AK的正确性](#Specified-access-key-is-not-found)|
16+
| An invalid XML character (Unicode: 0x8) was found in the element content of the document |[验证xml是否合法](#xml-character)|
17+
| Server response has a bad format type | [更多](#Server-response-has-a-bad-format-type) |
18+
19+
## Specified access key is not found
20+
21+
原因及解决方案:
22+
23+
1. Ak 没有相应的权限,联系对应的管理获取权限
24+
2. Ak 填写错误,请认证检查 AK 是否正确
25+
3. 使用环境不匹配,请确认当前环境下 AK 是真实有效的
26+
27+
## Server response has a bad format type
28+
29+
原因及解决方案:
30+
31+
返回的 http 协议没有指定数据格式
32+
33+
1. 设置 `request.setAcceptFormat(FormatType.JSON)` 如果无法解决在使用第二个方案
34+
2. 使用 `HttpResponse response = client.doAction(request)` 接收返回
35+
36+
## xml character
37+
38+
原因及解决方案:
39+
40+
[官方文档说明](https://www.w3.org/TR/2000/REC-xml-20001006#NT-Char)
41+
42+
以下三段为非法字符,请不要在xml中出现
43+
44+
1. 0x00 - 0x08
45+
2. 0x0b - 0x0c
46+
3. 0x0e - 0x1f
47+
48+
49+
50+
***
51+
[← 日志](8-Log-CN.md) | 异常[(English)](9-Exception-EN.md) | [首页 →](../README-CN.md)

docs/9-Exception-EN.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[← Log](8-Log-EN.md) | Exception[(中文)](9-Exception-CN.md) |[Home →](../README.md)
2+
***
3+
4+
# Questions
5+
6+
| exception | solutions |
7+
|----------------------|------------------|
8+
| content has not been provided | Upgrade to the latest version |
9+
| ExceptionInInitializerError |Upgrade to the latest version|
10+
| NoClassDefFoundError |Add missing dependency packages|
11+
| SocketTimeoutException has occurred on a socket read or accept. |Set a reasonable timeout|
12+
| Specified signature nonce was used already. |Upgrade to the latest version|
13+
| NoSuchMethodError |Add missing dependency packages|
14+
| MissingSecurityToken | Upgrade to the latest version |
15+
| Specified access key is not found |[heck the correctness of AK](#Specified-access-key-is-not-found)|
16+
| An invalid XML character (Unicode: 0x8) was found in the element content of the document |[Verify that the XML is valid](#xml-character)|
17+
| Server response has a bad format type | [more](#Server-response-has-a-bad-format-type) |
18+
19+
## Specified access key is not found
20+
21+
Reasons and solutions:
22+
23+
1. Ak doesn't have permission, contact the administrator to get permission
24+
2. Ak error, check the correctness of AK
25+
3. Environment mismatch, please confirm that AK is valid in the current environment
26+
27+
## Server response has a bad format type
28+
29+
Reasons and solutions:
30+
31+
The response does not specify a data format
32+
33+
1. `request.setAcceptFormat(FormatType.JSON)`. Add this code, if this cannot be fixed then you can use the second solution
34+
2. `HttpResponse response = client.doAction(request)` you could use this code to receive the returned data
35+
36+
## xml character
37+
38+
Reasons and solutions:
39+
40+
[Official documentation](https://www.w3.org/TR/2000/REC-xml-20001006#NT-Char)
41+
42+
The following three kinds of characters are illegal, please don't appear in XML
43+
44+
1. 0x00 - 0x08
45+
2. 0x0b - 0x0c
46+
3. 0x0e - 0x1f
47+
48+
***
49+
[← Log](8-Log-EN.md) | Exception[(中文)](9-Exception-CN.md) |[Home →](../README.md)

0 commit comments

Comments
 (0)