java.lang.IllegalStateException: The @FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded

GitHub | jencodingatwork | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 1

    GitHub comment 2251#229712277

    GitHub | 8 months ago | jencodingatwork
    java.lang.IllegalStateException: The @FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded

    3 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalStateException

      The @FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded

      at org.glassfish.jersey.server.internal.inject.FormParamValueFactoryProvider$FormParamValueFactory.ensureValidRequest()
    2. jersey-core-server
      ServerRuntime$2.run
      1. org.glassfish.jersey.server.internal.inject.FormParamValueFactoryProvider$FormParamValueFactory.ensureValidRequest(FormParamValueFactoryProvider.java:183)[jersey-server-2.22.1.jar:na]
      2. org.glassfish.jersey.server.internal.inject.FormParamValueFactoryProvider$FormParamValueFactory.getForm(FormParamValueFactoryProvider.java:167)[jersey-server-2.22.1.jar:na]
      3. org.glassfish.jersey.server.internal.inject.FormParamValueFactoryProvider$FormParamValueFactory.provide(FormParamValueFactoryProvider.java:118)[jersey-server-2.22.1.jar:na]
      4. org.glassfish.jersey.server.spi.internal.ParamValueFactoryWithSource.provide(ParamValueFactoryWithSource.java:71)[jersey-server-2.22.1.jar:na]
      5. org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:90)[jersey-server-2.22.1.jar:na]
      6. org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(JavaResourceMethodDispatcherProvider.java:127)[jersey-server-2.22.1.jar:na]
      7. org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)[jersey-server-2.22.1.jar:na]
      8. org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)[jersey-server-2.22.1.jar:na]
      9. org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)[jersey-server-2.22.1.jar:na]
      10. org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)[jersey-server-2.22.1.jar:na]
      11. org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)[jersey-server-2.22.1.jar:na]
      12. org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)[jersey-server-2.22.1.jar:na]
      12 frames
    3. Jersey Core
      RequestScope.runInScope
      1. org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)[jersey-common-2.22.1.jar:na]
      2. org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)[jersey-common-2.22.1.jar:na]
      3. org.glassfish.jersey.internal.Errors.process(Errors.java:315)[jersey-common-2.22.1.jar:na]
      4. org.glassfish.jersey.internal.Errors.process(Errors.java:297)[jersey-common-2.22.1.jar:na]
      5. org.glassfish.jersey.internal.Errors.process(Errors.java:267)[jersey-common-2.22.1.jar:na]
      6. org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)[jersey-common-2.22.1.jar:na]
      6 frames
    4. jersey-core-server
      ApplicationHandler.handle
      1. org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)[jersey-server-2.22.1.jar:na]
      2. org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)[jersey-server-2.22.1.jar:na]
      2 frames
    5. jersey-container-servlet-core
      WebComponent.serviceImpl
      1. org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471)[jersey-container-servlet-core-2.22.1.jar:na]
      1 frame