org.springframework.http.InvalidMediaTypeException: Invalid mime type "xml": 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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

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"
via Stack Overflow by RobsterLobster
, 5 months ago
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 '/'
org.springframework.http.InvalidMediaTypeException: Invalid mime type "xml": does not contain '/'
at org.springframework.http.MediaType.parseMediaType(MediaType.java:385)
at org.springframework.http.HttpHeaders.getContentType(HttpHeaders.java:722)
at org.springframework.web.client.HttpMessageConverterExtractor.getContentType(HttpMessageConverterExtractor.java:114)
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:85)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:835)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:819)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:599)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:557)
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:384)

Users with the same issue

Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 7 months ago
2 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago

Write tip

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