Skip to content

Jetty 12 - jetty-ee9-proxy.xml brokenΒ #9794

Closed

Description

@sbordet

Jetty version(s)
12

Description
Currently, jetty-ee9-proxy.xml is broken as it references the non-existing class org.eclipse.jetty.ee9.proxy.ConnectHandler that does not exist because it has been moved to core as org.eclipse.jetty.server.handler.ConnectHandler.

<New class="org.eclipse.jetty.ee9.proxy.ConnectHandler">
  <Set name="handler">
    <New class="org.eclipse.jetty.ee9.servlet.ServletHandler">
      ...
    </New>
  </Set>
</New>

But when trying to fix the class name, we get an ambiguity because class org.eclipse.jetty.server.Handler has 2 methods named setHandler(), one that takes a Handler parameter, and one that takes a Supplier<Handler>, so the <Set> element fails.

Trying to fix that by using <Call> instead of <Set> results in another error because org.eclipse.jetty.ee9.servlet.ServletHandler is not a org.eclipse.jetty.server.Handler but rather a org.eclipse.jetty.ee9.nested.Handler.

Activity

  1. added
    BugFor general bugs on Jetty side
    on May 24, 2023
  2. sbordet commented on May 24, 2023

    @sbordet
    ContributorAuthor

    @gregw two questions:

    • can we remove org.eclipse.jetty.server.Handler.setHandler(Supplier<Handler>) to avoid the ambiguity?
    • How do we compose core Handlers with ee9 nested.Handlers?

    For this particular case, we can restore an ee9 ConnectHandler, but we duplicate all the code.

  3. gregw commented on May 25, 2023

    @gregw
    Contributor

    @sbordet The supplier technique is used to add nested handlers to core handlers.

    XmlConfiguration should be able to work out which method to use by the arg type? Something else is wrong here?

  4. sbordet commented on May 25, 2023

    @sbordet
    ContributorAuthor

    XmlConfiguration should be able to work out which method to use by the arg type? Something else is wrong here?

    It would be difficult, as you would have to navigate the hierarchy of classes and interfaces.

    For some (historical?) reason, we run through all the methods until one succeeds for <Call>, but we bail out immediately in case of ambiguity for <Set>.

  5. gregw commented on May 25, 2023

    @gregw
    Contributor

    @sbordet

    I don't think what it is trying to do can be done. You can't put a core handler between nested handlers.

    It either needs to wrap the entire core context or be inserted between the core context handler and the adaptor handler that converts to a nested handlers chain

  6. gregw commented on May 25, 2023

    @gregw
    Contributor

    @sbordet The nested context handler has a core context handler that is provided by the supplier api. It's handler is the adapter. So you could insert between those two.

  7. github-actions commented on May 25, 2024

    @github-actions

    This issue has been automatically marked as stale because it has been a
    full year without activity. It will be closed if no further activity occurs.
    Thank you for your contributions.

  8. removed
    StaleFor auto-closed stale issues and pull requests
    on May 27, 2024
  9. github-actions commented on Jun 27, 2025

    @github-actions

    This issue has been automatically marked as stale because it has been a
    full year without activity. It will be closed if no further activity occurs.
    Thank you for your contributions.

  10. removed
    StaleFor auto-closed stale issues and pull requests
    on Jul 4, 2025
  11. self-assigned this
    on Jul 4, 2025
  12. added a commit that references this issue on Jul 4, 2025
    3287e5c
  13. moved this to πŸ— In progress in Jetty 12.0.24 (FROZEN)on Jul 4, 2025
  14. added a commit that references this issue on Jul 7, 2025
    f6898c0
  15. moved this from πŸ— In progress to βœ… Done in Jetty 12.0.24 (FROZEN)on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugFor general bugs on Jetty side

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions