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

Library fails while constructing ErrorResponse #354

Closed
simonedavico opened this issue Mar 1, 2016 · 8 comments
Closed

Library fails while constructing ErrorResponse #354

simonedavico opened this issue Mar 1, 2016 · 8 comments
Assignees

Comments

@simonedavico
Copy link

I was trying to contact my Minio instance specifying a wrong address earlier, and it seems like error reporting is broken. ErrorResponse.parseXml throws some exception about the xml being malformed.

Stack trace:

! org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not 4 (position: START_DOCUMENT seen 4... @1:1) 
! at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519) ~[xpp3-1.1.4c.jar:na]
! at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) ~[xpp3-1.1.4c.jar:na]
! at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) ~[xpp3-1.1.4c.jar:na]
! at com.google.api.client.xml.Xml.parseElementInternal(Xml.java:245) ~[google-http-client-xml-1.20.0.jar:1.20.0]
! at com.google.api.client.xml.Xml.parseElement(Xml.java:222) ~[google-http-client-xml-1.20.0.jar:1.20.0]
! at io.minio.messages.XmlEntity.parseXml(XmlEntity.java:62) ~[minio-1.0.1.jar:1.0.1]
! at io.minio.messages.ErrorResponse.parseXml(ErrorResponse.java:134) ~[minio-1.0.1.jar:1.0.1]
! at io.minio.messages.ErrorResponse.<init>(ErrorResponse.java:60) ~[minio-1.0.1.jar:1.0.1]
! at io.minio.MinioClient.execute(MinioClient.java:522) ~[minio-1.0.1.jar:1.0.1]
! at io.minio.MinioClient.executeGet(MinioClient.java:635) ~[minio-1.0.1.jar:1.0.1]
! at io.minio.MinioClient.getObject(MinioClient.java:836) ~[minio-1.0.1.jar:1.0.1]
! at io.minio.MinioClient.getObject(MinioClient.java:769) ~[minio-1.0.1.jar:1.0.1]
@balamurugana
Copy link
Member

! at io.minio.MinioClient.execute(MinioClient.java:522) ~[minio-1.0.1.jar:1.0.1]

I see errorResponse = new ErrorResponse(new StringReader(errorXml)); fails due to wrong xml format/content from http body.

Is it possible to provide what http body content it got?

@simonedavico
Copy link
Author

Of course, if you can suggest me how to retrieve it. minio-java doesn't implement any kind of logging, right?

@harshavardhana
Copy link
Member

Of course, if you can suggest me how to retrieve it. minio-java doesn't implement any kind of logging, right?

@simonedavico - there is way, just enable s3Client.traceOn(stream) it would log all the request and response headers.

@simonedavico
Copy link
Author

Thank you! I will investigate the issue ASAP and report here.

@harshavardhana
Copy link
Member

Thank you! I will investigate the issue ASAP and report here.

Checking back on this were you able to investigate this further?

@simonedavico
Copy link
Author

Sorry, not yet. I've been very busy with my thesis in the last few months, and completely forgot about the issue. I will try to do it in the next few days.

@harshavardhana
Copy link
Member

Sorry, not yet. I've been very busy with my thesis in the last few months, and completely forgot about the issue. I will try to do it in the next few days.

No problem @simonedavico, all the best on your thesis :-)

@harshavardhana
Copy link
Member

Closing this since there hasn't been any update, please re-open if it happens again.

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

3 participants