This is a bit of a big change, but I think it should be seamless: https://github.com/pedestal/pedestal/pull/945
Hi, I’ve just upgraded pedestal to 0.8-beta1 and now I’m having a problem with io.pedestal.service.resources/resource-routes . The message in the exception is:
"java.lang.IllegalArgumentException in Interceptor :io.pedestal.service.resources/create-get-handler/fn - No implementation of method: :response-buffer-size of protocol: #'io.pedestal.service.protocols/ResponseBufferSize found for class: org.eclipse.jetty.ee10.servlet.ServletApiResponse"
I don’t think I made an error, but I could be wrong of course.@hlship, I'm seeing this too in 0.8.0-beta2. I'm taking a stab a moving over to connectors.
It seems to be related to resources. I've moved to using resource-routes which eventually results in a call to https://github.com/pedestal/pedestal/blob/0.8.0-beta-2/service/src/io/pedestal/service/resources/impl.clj#L34 but... the appropriate https://github.com/pedestal/pedestal/blob/0.8.0-beta-2/servlet/src/io/pedestal/http.clj#L56C1-L61C32 is in the deprecated io.pedestal.http which I no longer want to :require because of the deprecation.
If you need a reproduction/issue lemme know.
Sorry yes this happens during execution of requests. Here is context (some values omitted) + stacktrace:
{:ctx {:io.pedestal.interceptor.chain/leave-queue (#Interceptor{:name :io.pedestal.connector.dev/uncaught-exception} #Interceptor{:name :io.pedestal.http.cors/dev-allow-origin} #Interceptor{:name :io.pedestal.http.impl.servlet-interceptor/apply-default-content-type} #Interceptor{:name :io.pedestal.http.impl.servlet-interceptor/ring-response} #Interceptor{:name :io.pedestal.http.impl.servlet-interceptor/stylobate}), :request {:auth-store "omitted", :protocol "HTTP/1.1", :config "<omitted>", :async-supported? true, :cookies {"auth-token" {:value "lHwEznHYwhmLxeueWJgWh"}}, :remote-addr "127.0.0.1", :servlet-response #object[org.eclipse.jetty.ee10.servlet.ServletApiResponse 0x3ae760f7 "ServletApiResponse@3ae760f7{org.eclipse.jetty.ee10.servlet.ServletContextResponse@18cceeef,org.eclipse.jetty.ee10.servlet.ServletContextResponse@18cceeef}"], :servlet #object[io.pedestal.servlet.FnServlet 0x10885e9c "io.pedestal.servlet.FnServlet@10885e9c"], :headers "omitted", :server-port 8080, :servlet-request #object[org.eclipse.jetty.ee10.servlet.ServletApiRequest 0x6303d3f5 "ServletApiRequest@6303d3f5{ServletContextRequest@41062cb4{GET@40671cbb HTTP/1.1}}"], :path-info "/favicon.ico", :url-for #delay[{:status :pending, :val nil} 0x3fa329ce], :uri "/favicon.ico", :server-name "localhost", :query-string nil, :path-params {:path "favicon.ico"}, :body #object[org.eclipse.jetty.ee10.servlet.HttpInput 0x7f0bb054 "HttpInput@2131472468 cs=ServletChannelState@7da0c289{s=HANDLING rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0} cp=org.eclipse.jetty.ee10.servlet.BlockingContentProducer@21c07cf5 eof=false"], :scheme :http, :request-method :get, :context-path ""}, :io.pedestal.http.route/path-params-decoded? true, :bindings {#'io.pedestal.http.route/*url-for* #delay[{:status :pending, :val nil} 0x3fa329ce]}, :io.pedestal.interceptor.chain/terminators (#function[io.pedestal.http.response/terminate-when-response*]), :servlet-response #object[org.eclipse.jetty.ee10.servlet.ServletApiResponse 0x3ae760f7 "ServletApiResponse@3ae760f7{org.eclipse.jetty.ee10.servlet.ServletContextResponse@18cceeef,org.eclipse.jetty.ee10.servlet.ServletContextResponse@18cceeef}"], :route {:path "/*path", :method :get, :path-constraints {:path "(.*)"}, :path-parts [:path], :interceptors [#Interceptor{:name :io.pedestal.service.resources/create-get-handler/fn}], :route-name :io.pedestal.service.resources/get-resource, :path-params [:path], :io.pedestal.http.route.internal/satisfies-constraints? #function[io.pedestal.http.route.internal/add-satisfies-constraints?/fn--57853]}, :servlet #object[io.pedestal.servlet.FnServlet 0x10885e9c "io.pedestal.servlet.FnServlet@10885e9c"], :request-start-time 1752774666747, :servlet-request #object[org.eclipse.jetty.ee10.servlet.ServletApiRequest 0x6303d3f5 "ServletApiRequest@6303d3f5{ServletContextRequest@41062cb4{GET@40671cbb HTTP/1.1}}"], :websocket-channel-source #object[org.eclipse.jetty.ee10.servlet.ServletApiRequest 0x6303d3f5 "ServletApiRequest@6303d3f5{ServletContextRequest@41062cb4{GET@40671cbb HTTP/1.1}}"], :io.pedestal.interceptor.chain/enter-async [#function[io.pedestal.http.impl.servlet-interceptor/start-servlet-async]], :url-for #delay[{:status :pending, :val nil} 0x3fa329ce], :io.pedestal.interceptor.chain/execution-id 5, :servlet-config #object[org.eclipse.jetty.ee10.servlet.ServletHolder$Config 0x6257cde5 "org.eclipse.jetty.ee10.servlet.ServletHolder$Config@6257cde5"]}, :exception #error {
:cause "No implementation of method: :response-buffer-size of protocol: #'io.pedestal.service.protocols/ResponseBufferSize found for class: org.eclipse.jetty.ee10.servlet.ServletApiResponse"
:via
[{:type clojure.lang.ExceptionInfo
:message "java.lang.IllegalArgumentException in Interceptor :io.pedestal.service.resources/create-get-handler/fn - No implementation of method: :response-buffer-size of protocol: #'io.pedestal.service.protocols/ResponseBufferSize found for class: org.eclipse.jetty.ee10.servlet.ServletApiResponse"
:data {:execution-id nil, :stage :enter, :interceptor :io.pedestal.service.resources/create-get-handler/fn, :exception-type :java.lang.IllegalArgumentException, :exception #error {
:cause "No implementation of method: :response-buffer-size of protocol: #'io.pedestal.service.protocols/ResponseBufferSize found for class: org.eclipse.jetty.ee10.servlet.ServletApiResponse"
:via
[{:type java.lang.IllegalArgumentException
:message "No implementation of method: :response-buffer-size of protocol: #'io.pedestal.service.protocols/ResponseBufferSize found for class: org.eclipse.jetty.ee10.servlet.ServletApiResponse"
:at [clojure.core$_cache_protocol_fn invokeStatic "core_deftype.clj" 585]}]
:trace
[[clojure.core$_cache_protocol_fn invokeStatic "core_deftype.clj" 585]
[clojure.core$_cache_protocol_fn invoke "core_deftype.clj" 577]
[io.pedestal.service.protocols$eval60612$fn__60613$G__60603__60618 invoke "protocols.clj" 15]
[io.pedestal.service.resources.impl$should_stream_QMARK_ invokeStatic "impl.clj" 34]
[io.pedestal.service.resources.impl$should_stream_QMARK_ invoke "impl.clj" 30]
[io.pedestal.service.resources.impl$make_streamable_file_body$fn__62612 invoke "impl.clj" 51]
[io.pedestal.service.resources$create_get_handler$fn__62670 invoke "resources.clj" 53]
[io.pedestal.interceptor.impl$wrap_handler$fn__56839 invoke "impl.clj" 26]
[io.pedestal.interceptor.chain$try_stage invokeStatic "chain.clj" 109]
[io.pedestal.interceptor.chain$try_stage invoke "chain.clj" 104]
[io.pedestal.interceptor.chain$execute_enter$fn__57572 invoke "chain.clj" 221]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$with_bindings_STAR_ invokeStatic "core.clj" 1990]
[clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1990]
[clojure.lang.RestFn invoke "RestFn.java" 428]
[io.pedestal.interceptor.chain$execute_enter invokeStatic "chain.clj" 201]
[io.pedestal.interceptor.chain$execute_enter invoke "chain.clj" 191]
[io.pedestal.interceptor.chain$execute_continue invokeStatic "chain.clj" 352]
[io.pedestal.interceptor.chain$execute_continue invoke "chain.clj" 349]
[io.pedestal.interceptor.chain$execute invokeStatic "chain.clj" 414]
[io.pedestal.interceptor.chain$execute invoke "chain.clj" 363]
[io.pedestal.interceptor.chain$execute invokeStatic "chain.clj" 419]
[io.pedestal.interceptor.chain$execute invoke "chain.clj" 363]
[io.pedestal.http.impl.servlet_interceptor$interceptor_service_fn$fn__61974 invoke "servlet_interceptor.clj" 380]
[io.pedestal.servlet.FnServlet service "FnServlet.java" 57]
[jakarta.servlet.http.HttpServlet service "HttpServlet.java" 614]
[org.eclipse.jetty.ee10.servlet.ServletHolder handle "ServletHolder.java" 736]
[org.eclipse.jetty.ee10.servlet.ServletHandler$ChainEnd doFilter "ServletHandler.java" 1622]
[org.eclipse.jetty.ee10.websocket.servlet.WebSocketUpgradeFilter doFilter "WebSocketUpgradeFilter.java" 195]
[org.eclipse.jetty.ee10.servlet.FilterHolder doFilter "FilterHolder.java" 205]
[org.eclipse.jetty.ee10.servlet.ServletHandler$Chain doFilter "ServletHandler.java" 1594]
[org.eclipse.jetty.ee10.servlet.ServletHandler$MappedServlet handle "ServletHandler.java" 1555]
[org.eclipse.jetty.ee10.servlet.ServletChannel dispatch "ServletChannel.java" 823]
[org.eclipse.jetty.ee10.servlet.ServletChannel handle "ServletChannel.java" 440]
[org.eclipse.jetty.ee10.servlet.ServletHandler handle "ServletHandler.java" 470]
[org.eclipse.jetty.ee10.servlet.SessionHandler handle "SessionHandler.java" 717]
[org.eclipse.jetty.server.handler.ContextHandler handle "ContextHandler.java" 1071]
[org.eclipse.jetty.server.Server handle "Server.java" 182]
[org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker run "HttpChannelState.java" 678]
[org.eclipse.jetty.server.internal.HttpConnection onFillable "HttpConnection.java" 416]
[org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded "AbstractConnection.java" 322]
[org.eclipse.jetty.io.FillInterest fillable "FillInterest.java" 99]
[org.eclipse.jetty.io.SelectableChannelEndPoint$1 run "SelectableChannelEndPoint.java" 53]
[org.eclipse.jetty.util.thread.QueuedThreadPool runJob "QueuedThreadPool.java" 981]
[org.eclipse.jetty.util.thread.QueuedThreadPool$Runner doRunJob "QueuedThreadPool.java" 1211]
[org.eclipse.jetty.util.thread.QueuedThreadPool$Runner run "QueuedThreadPool.java" 1166]
[java.lang.Thread run "Thread.java" 833]]}}
:at [io.pedestal.interceptor.chain$throwable__GT_ex_info invokeStatic "chain.clj" 39]}
{:type java.lang.IllegalArgumentException
:message "No implementation of method: :response-buffer-size of protocol: #'io.pedestal.service.protocols/ResponseBufferSize found for class: org.eclipse.jetty.ee10.servlet.ServletApiResponse"
:at [clojure.core$_cache_protocol_fn invokeStatic "core_deftype.clj" 585]}]}} I suspect if you change your code to, somewhere, require io.pedestal.http.jetty.container, it will all work. Because you are going through the FnServlet, and not configuring Jetty directly, this namespace (which maps Jetty classes to Pedestal protocols) is never loaded.
It would be helpful to see any web.xml configuration, and what your startup code looks like.
This is great, exactly the kind of things I want to flesh out during a beta!
Want a git issue for it? Or all good?
Thanks ... it came down to the namespace that provided the extend-protocol was not loaded in your application's case. See https://github.com/pedestal/pedestal/pull/948
Temporary work-around for beta-2: just require io.pedestal.http, even if you don't use anything there.
Does that occur during execution of incoming requests, or at startup?
A stack trace would be helpful.