java - Jersey - @Consumes doesn't constraint request - IllegalStateException @FormParam -


i'm using jersey, , have resource @consume(mediatype.application_form_urlencoded) annotation. however, when making request endpoint, json body (and content-type application/json), i'm seeing following exception:

"the @formparam utilized when content type of request entity not application/x-www-form-urlencoded"

anyone knows missing? or perhaps code in jersey validates request content-type matches @consumes annotation, can debug it?

p.s. i'm using jersey 2.22.1

the exception stacktrace:

java.lang.illegalstateexception: unable perform operation: resolve on com.jive.services.jiveid.auth.oauth.models.authorizeparams @ org.jvnet.hk2.internal.clazzcreator.create(clazzcreator.java:386) @ org.jvnet.hk2.internal.systemdescriptor.create(systemdescriptor.java:471) @ org.glassfish.jersey.process.internal.requestscope.findorcreate(requestscope.java:162) @ org.jvnet.hk2.internal.utilities.createservice(utilities.java:2072) @ org.jvnet.hk2.internal.servicehandleimpl.getservice(servicehandleimpl.java:114) @ org.jvnet.hk2.internal.servicehandleimpl.getservice(servicehandleimpl.java:88) @ org.glassfish.jersey.server.internal.inject.beanparamvaluefactoryprovider$beanparamvaluefactory.provide(beanparamvaluefactoryprovider.java:118) @ org.glassfish.jersey.server.spi.internal.paramvaluefactorywithsource.provide(paramvaluefactorywithsource.java:71) @ org.glassfish.jersey.server.spi.internal.parametervaluehelper.getparametervalues(parametervaluehelper.java:90) @ org.glassfish.jersey.server.model.internal.javaresourcemethoddispatcherprovider$abstractmethodparaminvoker.getparamvalues(javaresourcemethoddispatcherprovider.java:127) @ org.glassfish.jersey.server.model.internal.javaresourcemethoddispatcherprovider$responseoutinvoker.dodispatch(javaresourcemethoddispatcherprovider.java:160) @ org.glassfish.jersey.server.model.internal.abstractjavaresourcemethoddispatcher.dispatch(abstractjavaresourcemethoddispatcher.java:99) @ org.glassfish.jersey.server.model.resourcemethodinvoker.invoke(resourcemethodinvoker.java:389) @ org.glassfish.jersey.server.model.resourcemethodinvoker.apply(resourcemethodinvoker.java:347) @ org.glassfish.jersey.server.model.resourcemethodinvoker.apply(resourcemethodinvoker.java:102) @ org.glassfish.jersey.server.serverruntime$2.run(serverruntime.java:326) @ org.glassfish.jersey.internal.errors$1.call(errors.java:271) @ org.glassfish.jersey.internal.errors$1.call(errors.java:267) @ org.glassfish.jersey.internal.errors.process(errors.java:315) @ org.glassfish.jersey.internal.errors.process(errors.java:297) @ org.glassfish.jersey.internal.errors.process(errors.java:267) @ org.glassfish.jersey.process.internal.requestscope.runinscope(requestscope.java:317) @ org.glassfish.jersey.server.serverruntime.process(serverruntime.java:305) @ org.glassfish.jersey.server.applicationhandler.handle(applicationhandler.java:1154) @ org.glassfish.jersey.servlet.webcomponent.serviceimpl(webcomponent.java:471) @ org.glassfish.jersey.servlet.webcomponent.service(webcomponent.java:425) @ org.glassfish.jersey.servlet.servletcontainer.service(servletcontainer.java:383) @ org.glassfish.jersey.servlet.servletcontainer.service(servletcontainer.java:336) @ org.glassfish.jersey.servlet.servletcontainer.service(servletcontainer.java:223) @ io.dropwizard.jetty.nonblockingservletholder.handle(nonblockingservletholder.java:49) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1669) @ io.dropwizard.servlets.threadnamefilter.dofilter(threadnamefilter.java:29) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1652) @ io.dropwizard.jersey.filter.allowedmethodsfilter.handle(allowedmethodsfilter.java:43) @ io.dropwizard.jersey.filter.allowedmethodsfilter.dofilter(allowedmethodsfilter.java:38) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1652) @ org.eclipse.jetty.servlets.crossoriginfilter.handle(crossoriginfilter.java:257) @ org.eclipse.jetty.servlets.crossoriginfilter.dofilter(crossoriginfilter.java:220) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1652) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:316) @ org.springframework.web.filter.compositefilter$virtualfilterchain.dofilter(compositefilter.java:107) @ com.jive.services.jiveid.common.extensions.security.lemurcertificatefilter.dofilter(lemurcertificatefilter.java:52) @ org.springframework.web.filter.compositefilter$virtualfilterchain.dofilter(compositefilter.java:112) @ com.jive.services.jiveid.common.extensions.correlationidfilter.dofilterinternal(correlationidfilter.java:51) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.springframework.web.filter.compositefilter$virtualfilterchain.dofilter(compositefilter.java:112) @ com.jive.services.jiveid.common.extensions.security.corsfilter.dofilterinternal(corsfilter.java:27) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.springframework.web.filter.compositefilter$virtualfilterchain.dofilter(compositefilter.java:112) @ org.springframework.web.filter.requestcontextfilter.dofilterinternal(requestcontextfilter.java:99) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.springframework.web.filter.compositefilter$virtualfilterchain.dofilter(compositefilter.java:112) @ org.springframework.web.filter.compositefilter.dofilter(compositefilter.java:73) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:126) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:90) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:114) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:111) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:169) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:64) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:53) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:91) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:213) @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:176) @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:262) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1652) @ org.eclipse.jetty.servlet.servlethandler.dohandle(servlethandler.java:585) @ org.eclipse.jetty.server.handler.contexthandler.dohandle(contexthandler.java:1127) @ org.eclipse.jetty.servlet.servlethandler.doscope(servlethandler.java:515) @ org.eclipse.jetty.server.handler.contexthandler.doscope(contexthandler.java:1061) @ org.eclipse.jetty.server.handler.scopedhandler.handle(scopedhandler.java:141) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:97) @ com.codahale.metrics.jetty9.instrumentedhandler.handle(instrumentedhandler.java:240) @ io.dropwizard.jetty.routinghandler.handle(routinghandler.java:51) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:97) @ org.eclipse.jetty.server.handler.requestloghandler.handle(requestloghandler.java:95) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:97) @ org.eclipse.jetty.server.handler.statisticshandler.handle(statisticshandler.java:159) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:97) @ org.eclipse.jetty.server.server.handle(server.java:499) @ org.eclipse.jetty.server.httpchannel.handle(httpchannel.java:311) @ org.eclipse.jetty.server.httpconnection.onfillable(httpconnection.java:257) @ org.eclipse.jetty.io.abstractconnection$2.run(abstractconnection.java:544) @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:635) @ org.eclipse.jetty.util.thread.queuedthreadpool$3.run(queuedthreadpool.java:555) @ java.lang.thread.run(thread.java:745) 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -