javax.ws.rs.WebApplicationException: java.lang.IllegalArgumentException: Error parsing media type 'blah'

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 Java.net JIRA by chandankr, 1 year ago
java.lang.IllegalArgumentException: Error parsing media type 'blah'
via Java.net JIRA by mahoney266, 8 months ago
java.lang.IllegalArgumentException: Error parsing media type 'application\json; charset=UTF-8'
via GitHub by manuviswam
, 2 years ago
java.lang.IllegalArgumentException: Error parsing media type 'foo'
via Atlassian JIRA by Lucas Timm [Atlassian], 1 year ago
java.lang.IllegalArgumentException: Error parsing media type ', application/xml'
via Atlassian JIRA by Lucas Timm [Atlassian], 1 year ago
java.lang.IllegalArgumentException: Error parsing media type ', application/xml'
via Java.net JIRA by raja04, 1 year ago
java.lang.IllegalArgumentException: Error parsing media type 'application/'
javax.ws.rs.WebApplicationException: java.lang.IllegalArgumentException: Error parsing media type 'blah'
at com.sun.jersey.core.header.reader.HttpHeaderReaderImpl.getNextCharacter(HttpHeaderReaderImpl.java:163)
at com.sun.jersey.core.header.reader.HttpHeaderReaderImpl.next(HttpHeaderReaderImpl.java:124)
at com.sun.jersey.core.header.reader.HttpHeaderReader.nextSeparator(HttpHeaderReader.java:112)
at com.sun.jersey.core.impl.provider.header.MediaTypeProvider.valueOf(MediaTypeProvider.java:90)
at com.sun.jersey.core.impl.provider.header.MediaTypeProvider.fromString(MediaTypeProvider.java:77)
at javax.ws.rs.core.MediaType.valueOf(MediaType.java:119)
at com.sun.jersey.server.impl.model.HttpHelper.getContentType(HttpHelper.java:89)
at com.sun.jersey.server.impl.model.HttpHelper.getContentType(HttpHelper.java:77)
at com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters(WebComponent.java:830)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:405)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.traceNextValve(HttpRequestOperationCollectionValve.java:112)
at com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:94)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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