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

Failed LOG.debug() with MultiPart #11281

Closed
joakime opened this issue Jan 17, 2024 · 0 comments · Fixed by #11313
Closed

Failed LOG.debug() with MultiPart #11281

joakime opened this issue Jan 17, 2024 · 0 comments · Fixed by #11313
Assignees
Labels
Bug For general bugs on Jetty side
Milestone

Comments

@joakime
Copy link
Contributor

joakime commented Jan 17, 2024

Jetty version(s)
12

Jetty Environment
Any

Java version/vendor (use: java -version)
Any

OS type/version
Any

Description
When Logging is set to DEBUG during testing of jetty-server's MultiPart behaviors a few exception show up that indicate a problem logging at DEBUG level due to exceptions during .toString()

SLF4J: Failed toString() invocation on an object of type [org.eclipse.jetty.http.MultiPart$ChunksPart]
Reported exception:
java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.io.Content$Source.getLength()" because the return value of "org.eclipse.jetty.http.MultiPart$Part.getContentSource()" is null
	at [email protected]/org.eclipse.jetty.http.MultiPart$Part.getLength(MultiPart.java:229)
	at [email protected]/org.eclipse.jetty.http.MultiPart$ChunksPart.toString(MultiPart.java:448)
	at [email protected]/org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:291)
	at [email protected]/org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:263)
	at [email protected]/org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:225)
	at [email protected]/org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:160)
	at [email protected]/org.eclipse.jetty.logging.StdErrAppender.format(StdErrAppender.java:162)
	at [email protected]/org.eclipse.jetty.logging.StdErrAppender.emit(StdErrAppender.java:93)
	at [email protected]/org.eclipse.jetty.logging.JettyLogger.emit(JettyLogger.java:631)
	at [email protected]/org.eclipse.jetty.logging.JettyLogger.debug(JettyLogger.java:172)
	at [email protected]/org.eclipse.jetty.http.MultiPart$Part.fail(MultiPart.java:339)
	at [email protected]/org.eclipse.jetty.http.MultiPart$ChunksPart.fail(MultiPart.java:437)
	at [email protected]/org.eclipse.jetty.http.MultiPart$Part.close(MultiPart.java:316)
	at [email protected]/org.eclipse.jetty.util.IO.close(IO.java:444)
	at [email protected]/org.eclipse.jetty.util.IO.close(IO.java:459)
	at [email protected]/org.eclipse.jetty.http.MultiPartFormData$Parts.close(MultiPartFormData.java:166)
	at [email protected]/org.eclipse.jetty.server.handler.MultiPartFormDataHandlerTest.testAsyncMultiPartResponse(MultiPartFormDataHandlerTest.java:264)
2024-01-16 21:54:44.881:DEBUG:oejh.MultiPart:ForkJoinPool-1-worker-4: Error closing part [FAILED toString()]
java.lang.NullPointerException: Cannot invoke "org.eclipse.jetty.io.Content$Source.fail(java.lang.Throwable)" because the return value of "org.eclipse.jetty.http.MultiPart$Part.getContentSource()" is null
	at [email protected]/org.eclipse.jetty.http.MultiPart$Part.fail(MultiPart.java:323)
	at [email protected]/org.eclipse.jetty.http.MultiPart$ChunksPart.fail(MultiPart.java:437)
	at [email protected]/org.eclipse.jetty.http.MultiPart$Part.close(MultiPart.java:316)
	at [email protected]/org.eclipse.jetty.util.IO.close(IO.java:444)
	at [email protected]/org.eclipse.jetty.util.IO.close(IO.java:459)
	at [email protected]/org.eclipse.jetty.http.MultiPartFormData$Parts.close(MultiPartFormData.java:166)
	at [email protected]/org.eclipse.jetty.server.handler.MultiPartFormDataHandlerTest.testAsyncMultiPartResponse(MultiPartFormDataHandlerTest.java:264)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant