Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调用失败ResponseCode: 404 #137

Open
awei12121 opened this issue Oct 16, 2023 · 1 comment
Open

调用失败ResponseCode: 404 #137

awei12121 opened this issue Oct 16, 2023 · 1 comment

Comments

@awei12121
Copy link

代码:
ObsClient obsClient = new ObsClient(ak, sk,endPoint);
String bucketname = "gadad";
String objectkey = "4.png";
PutObjectResult res = obsClient.putObject(bucketname, objectkey, new File("F:/bug/4.png"));
String objectUrl = res.getObjectUrl();
System.out.println("url:"+objectUrl);
报错:
Exception in thread "main" com.obs.services.exception.ObsException: Error message:Request Error.OBS service Error Message. -- ResponseCode: 404, ResponseStatus: Not Found, RequestId: 0000018B37BA186B47CE0A3CC6268D32, HostId: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSBprWHCBsvTUqaWM2xubIYCYVkWSgAz
at com.obs.services.internal.utils.ServiceUtils.changeFromServiceException(ServiceUtils.java:544)
at com.obs.services.AbstractClient.doActionWithResult(AbstractClient.java:403)
at com.obs.services.AbstractObjectClient.putObject(AbstractObjectClient.java:284)
at com.obs.services.AbstractObjectClient.putObject(AbstractObjectClient.java:321)
at com.obs.services.AbstractObjectClient.putObject(AbstractObjectClient.java:304)
at com.tpri.ne.sync.controller.TestObs.main(TestObs.java:29)

@noaccident noaccident reopened this Oct 26, 2023
@noaccident
Copy link
Collaborator

noaccident commented Oct 27, 2023

404文件找不到;“F:\bug\4.png” 或者再看下路径是否正确

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants