-
Notifications
You must be signed in to change notification settings - Fork 864
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
XMLStreamException: ParseError at [row,col]:[1,1] when calling getObjectAttributes #4845
Comments
Can you test using the AWS S3 endpoint directly?
You can enable verbose wirelogging and compare the response XMLs to be sure. As a reminder, we don't guarantee that the SDK will work with third-party solutions. |
Ok, I tested with AWS and it seems to work. The output when enabling verbose wirelogging is:
For MinIO I get the following output:
(the garbled output continues for a bit before the exception is finally thrown) For Wasabi it's basically the same:
It looks like the responses for MinIO and Wasabi are returning the objects themselves. From what I can gather online, it seems as though
So, it seems as though the responses for MinIO and Wasabi are problematic in some sense. However, like I mentioned at the top, for V1 of the SDK these requests work for both MinIO and Wasabi. |
I see that for version 1 of the SDK if a
Am I correct in stating that for V2 of the SDK a GET is performed with a query parameter of
as XML response. Instead, they're sending back the data of the object itself. |
|
Ok, it seems as though MinIO (and probably Wasabi) might not have implemented the get-object-attributes functionality yet. I've seen it mentioned here. As a workaround I've switched to using |
Describe the bug
I'm running into the same exception as outlined in #4136 (that has been closed a while ago) when requesting an object's attributes. I'm attempting to retrieve the MD5Sum via the e-tag field. The block of code (as highlighted in the original issue) triggering the exception is:
I'm not sure where exactly this bug slipped in for version 2, but if I use the latest version 1 of the SDK, and rework the code-sample listed in #4136 to be compatible with V1, then everything works as expected.
Expected Behavior
No exception should be thrown when calling the
getObjectAttributes
method.Current Behavior
I get the following stacktrace:
Reproduction Steps
To reproduce I took the original source-code as outlined in #4136, but modified it a bit to allow for connecting to other servers (in my case I'm connecting to a local MinIO instance for testing purposes):
I then invoked the class with:
Possible Solution
Not sure. Don't know if it is related to the encoding of the XML in the response.
Additional Information/Context
I'm running the example with Azul's JDK:
I've also tested against version 17 of Azul's JDK:
and it still breaks (so not sure if it is a Java 8 issue).
As mentioned at the top, if I rework the code for version 1 of the SDK then I don't run into this exception. So, I suspect it is an issue that slipped in for version 2 of the SDK.
Also, I've tested this against a local MinIO instance as well as Wasabi and it produces the same issue in both cases. I haven't tested against AWS though.
AWS Java SDK version used
2.23.9
JDK version used
Operating System and version
Linux (Ubuntu 18.04 LTS)
The text was updated successfully, but these errors were encountered: