NoSuchMethodException when deploying custom handler

Solution Verified - Updated -

Issue

  • We see an exception like the following when trying to deploy a custom Undertow request handler:
java.lang.NoSuchMethodException: com.CustomHandler.<init>(io.undertow.server.HttpHandler)
    at java.lang.Class.getConstructor0(Class.java:3082)
    at java.lang.Class.getConstructor(Class.java:1825)
    at org.wildfly.extension.undertow.deployment.ConfiguredHandlerWrapper.wrap(ConfiguredHandlerWrapper.java:55)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content