javax.servlet.ServletException: Content-Type was 'text/x-gwt-rpc; charset=utf-8'. Expected 'application/json'.

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 Icesoft by SrArcos, 1 year ago
Content-Type was 'text/x-gwt-rpc; charset=utf-8'. Expected 'application/json'.
via Stack Overflow by Alen
, 1 year ago
Content-Type was '(null)'. Expected 'text/x-gwt-rpc'.
via techforumnetwork.com by Unknown author, 1 year ago
Content-Type was '(null)'. Expected 'text/x-gwt-rpc'.
via Stack Overflow by displayname
, 1 year ago
Content-Type was 'application/x-www-form-urlencoded'. Expected 'text/x-gwt-rpc'.
via iswwwup.com by Unknown author, 2 years ago
Content-Type was 'multipart/form-data; boundary=----webkitformboundaryfafzb7tzbpq9rkjl'. Expected 'text/x-gwt-rpc'.
via Stack Overflow by koszti
, 1 year ago
Content-Type was 'text/plain; charset=utf-8'. Expected 'text/x-gwt-rpc'.
javax.servlet.ServletException: Content-Type was 'text/x-gwt-rpc; charset=utf-8'. Expected 'application/json'.
at com.google.gwt.user.server.rpc.RPCServletUtils.checkContentTypeIgnoreCase(RPCServletUtils.java:427)
at com.google.gwt.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

Users with the same issue

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.