{"record":{"id":"17ad90b9ade8d16d","repo":"quarkusio/quarkus","slug":"endpoint-not-found","errorCode":null,"errorMessage":"Endpoint not found: ","messagePattern":"Endpoint not found: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/websockets-next/deployment/src/main/java/io/quarkus/websockets/next/deployment/WebSocketProcessor.java","lineNumber":585,"sourceCode":"    private boolean activateContext(WebSocketsServerBuildConfig.ContextActivation activation, ScopeInfo scope,\n            String endpointId, List<WebSocketEndpointBuildItem> endpoints, BeanResolver beanResolver,\n            Optional<PermissionsAllowedMetaAnnotationBuildItem> metaPermissionsAllowed,\n            boolean securityEnabled, boolean httpUpgradeSecured, SecurityTransformer securityTransformer) {\n        return switch (activation) {\n            case ALWAYS -> true;\n            case AUTO -> needsContext(findEndpoint(endpointId, endpoints).bean, scope, new HashSet<>(), beanResolver,\n                    metaPermissionsAllowed, securityEnabled, httpUpgradeSecured, securityTransformer);\n            default -> throw new IllegalArgumentException(\"Unexpected value: \" + activation);\n        };\n    }\n\n    private WebSocketEndpointBuildItem findEndpoint(String endpointId, List<WebSocketEndpointBuildItem> endpoints) {\n        for (WebSocketEndpointBuildItem endpoint : endpoints) {\n            if (endpoint.id.equals(endpointId)) {\n                return endpoint;\n            }\n        }\n        throw new IllegalArgumentException(\"Endpoint not found: \" + endpointId);\n    }\n\n    private boolean needsContext(BeanInfo bean, ScopeInfo scope, Set<String> processedBeans, BeanResolver beanResolver,\n            Optional<PermissionsAllowedMetaAnnotationBuildItem> metaPermissionsAllowed, boolean securityEnabled,\n            boolean httpUpgradeSecured, SecurityTransformer securityTransformer) {\n        if (processedBeans.add(bean.getIdentifier())) {\n\n            if (scope.equals(bean.getScope())) {\n                // Bean has the given scope\n                return true;\n            } else if (securityEnabled && BuiltinScope.REQUEST.is(scope)\n                    && bean.isClassBean()\n                    && bean.hasAroundInvokeInterceptors()\n                    && hasSecurityAnnNotOnHttpUpgrade(bean.getTarget().get().asClass(), metaPermissionsAllowed,\n                            httpUpgradeSecured, securityTransformer)) {\n                // The given scope is RequestScoped, the bean is class-based, has an aroundInvoke interceptor associated and is annotated with a security annotation\n                return true;\n            }","sourceCodeStart":567,"sourceCodeEnd":603,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/websockets-next/deployment/src/main/java/io/quarkus/websockets/next/deployment/WebSocketProcessor.java#L567-L603","documentation":"findEndpoint resolves an endpoint by its id from the list of deployed WebSocketEndpointBuildItems and throws IllegalArgumentException when no match exists. This surfaces at runtime (e.g. when opening a connection or activating the endpoint context) for an unknown id.","triggerScenarios":"Calling WebSocketConnection.ConnectionOpenOptions with an endpointId that no deployed endpoint declares, or programmatic lookup/activation with a mistyped or renamed id.","commonSituations":"Renaming an endpoint class or its endpointId and forgetting call sites that reference the old id; typos in the id string; endpoint not deployed due to a build-time exclusion so its id is missing at runtime.","solutions":["Use the exact id of a deployed endpoint: the fully-qualified class name, or the endpointId/clientId attribute value","Check the deployment logs or the endpoint registry for available ids","Fix call sites after renaming an endpoint (IDE 'find usages' on the id string)"],"exampleFix":"// before\nconnectionManager.open(WebSocketConnection.ConnectionOpenOptions.builder()\n    .endpointId(\"com.example.OldEndpoint\").build());\n// after\nconnectionManager.open(WebSocketConnection.ConnectionOpenOptions.builder()\n    .endpointId(\"com.example.NewEndpoint\").build());","handlingStrategy":"validation","validationCode":"// Validate the endpoint id exists before opening a connection\nvoid safeOpen(String endpointId) {\n  Set<String> known = Set.of(\"com.example.ChatSocket\", \"com.example.EchoSocket\"); // or a registry\n  if (!known.contains(endpointId))\n    throw new IllegalArgumentException(\"Unknown endpointId: \" + endpointId);\n}","typeGuard":null,"tryCatchPattern":"try {\n  connectionManager.open(opts.endpointId(id));\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().startsWith(\"Endpoint not found\")) {\n    throw new IllegalStateException(\"Check endpointId against deployed endpoints\", e);\n  }\n  throw e;\n}","preventionTips":["Reference endpoint ids via constants, not inline strings","Update ids everywhere (tests, clients, Dev UI) when renaming endpoint classes","Confirm the endpoint actually deployed (no build-time exclusions/conditions removed it)"],"tags":["websocket","runtime","endpoint-id","lookup"],"backgroundTag":"resource-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}