org.springframework.http.InvalidMediaTypeException: Invalid mime type "null": does not contain '/'

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Spring JIRA by Nazar Vishka, 1 year ago
Invalid mime type "null": does not contain '/'
via Spring JIRA by Nazar Vishka, 1 year ago
Invalid mime type "null": does not contain '/'
via Stack Overflow by RobsterLobster
, 5 months ago
via Stack Overflow by Vlad Kudryavtsev
, 1 year ago
Invalid mime type "xml": does not contain '/'
via Stack Overflow by Hannes Smit
, 4 months ago
Invalid mime type "text/xml; subtype=gml/2.1.2": Invalid token character '/' in token "gml/2.1.2"
via Stack Overflow by Raja Asthana
, 2 years ago
Invalid media type "multipart/mixed;boundary=simple boundary;charset=UTF-8": Invalid token character ' ' in token "simple boundary"
org.springframework.http.InvalidMediaTypeException: Invalid mime type "null": does not contain '/'
at org.springframework.http.MediaType.parseMediaType(MediaType.java:385)
at org.springframework.http.HttpHeaders.getContentType(HttpHeaders.java:722)
at org.springframework.http.server.ServletServerHttpRequest.getHeaders(ServletServerHttpRequest.java:116)
at org.springframework.web.cors.DefaultCorsProcessor.processRequest(DefaultCorsProcessor.java:71)
at org.springframework.web.servlet.handler.AbstractHandlerMapping$CorsInterceptor.preHandle(AbstractHandlerMapping.java:503)
at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:134)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:954)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)

Users with the same issue

Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 6 months ago
2 times, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
1 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.