org.glassfish.jersey.message.internal.HeaderValueException: Unable to parse "Content-Type" header value: "application/json, app/json"

Java.net JIRA | Dassburger | 4 years ago
  1. 0

    AngularJS Client, JAX-RS Jersey Rest Service - application/json client request throwing 'Error parsing media type'

    dolinked.com | 12 months ago
    org.glassfish.jersey.message.internal.HeaderValueException: Unable to parse "Content-Type" header value: "application/x-www-form-urlencoded;application/json;"
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    AngularJS Client, JAX-RS Jersey Rest Service - application/json client request throwing 'Error parsing media type'

    Stack Overflow | 3 years ago | Satya
    org.glassfish.jersey.message.internal.HeaderValueException: Unable to parse "Content-Type" header value: "application/x-www-form-urlencoded;application/json;"
  4. 0

    AngularJS: AngularJS Client, JAX-RS Jersey Rest Service - application/json client request throwing 'Error parsing media type' - ngroutes.com

    ngroutes.com | 1 year ago
    org.glassfish.jersey.message.internal.HeaderValueException: Unable to parse "Content-Type" header value: "application/x-www-form-urlencoded;application/json;"

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.text.ParseException

      Expected separator ';' instead of ','

      at org.glassfish.jersey.message.internal.HttpHeaderReader.nextSeparator()
    2. Jersey Core
      MediaTypeProvider.fromString
      1. org.glassfish.jersey.message.internal.HttpHeaderReader.nextSeparator(HttpHeaderReader.java:115)
      2. org.glassfish.jersey.message.internal.HttpHeaderReader.readParameters(HttpHeaderReader.java:249)
      3. org.glassfish.jersey.message.internal.HttpHeaderReader.readParameters(HttpHeaderReader.java:242)
      4. org.glassfish.jersey.message.internal.MediaTypeProvider.valueOf(MediaTypeProvider.java:107)
      5. org.glassfish.jersey.message.internal.MediaTypeProvider.fromString(MediaTypeProvider.java:87)
      6. org.glassfish.jersey.message.internal.MediaTypeProvider.fromString(MediaTypeProvider.java:59)
      6 frames
    3. JavaEE 7
      MediaType.valueOf
      1. javax.ws.rs.core.MediaType.valueOf(MediaType.java:179)
      1 frame
    4. Jersey Core
      InboundMessageContext.getMediaType
      1. org.glassfish.jersey.message.internal.InboundMessageContext$5.apply(InboundMessageContext.java:431)
      2. org.glassfish.jersey.message.internal.InboundMessageContext$5.apply(InboundMessageContext.java:427)
      3. org.glassfish.jersey.message.internal.InboundMessageContext.singleHeader(InboundMessageContext.java:311)
      4. org.glassfish.jersey.message.internal.InboundMessageContext.getMediaType(InboundMessageContext.java:427)
      4 frames
    5. jersey-container-servlet-core
      ServletContainer.doFilter
      1. org.glassfish.jersey.servlet.WebComponent.filterFormParameters(WebComponent.java:482)
      2. org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:303)
      3. org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)
      4. org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:525)
      5. org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:473)
      6. org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:410)
      6 frames
    6. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
      7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      8. org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      9. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      10. org.mortbay.jetty.Server.handle(Server.java:324)
      11. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
      12. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
      13. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
      14. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      15. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      16. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
      16 frames
    7. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
      1 frame