{"record":{"id":"a66bf7b1a9f5c580","repo":"theonedev/onedev","slug":"org-apache-wicket-wicketruntimeexception-a66bf7","errorCode":null,"errorMessage":"org.apache.wicket.WicketRuntimeException","messagePattern":"org\\.apache\\.wicket\\.WicketRuntimeException","errorType":"exception","errorClass":"org.apache.wicket.WicketRuntimeException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebResponse.java","lineNumber":167,"sourceCode":"\t}\n\n\t@Override\n\tpublic void sendError(int sc, String msg)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (msg == null)\n\t\t\t{\n\t\t\t\thttpServletResponse.sendError(sc);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thttpServletResponse.sendError(sc, msg);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tthrow new WicketRuntimeException(e);\n\t\t}\n\t}\n\n\t@Override\n\tpublic String encodeURL(CharSequence url)\n\t{\n\t\tArgs.notNull(url, \"url\");\n\n\t\tUrlRenderer urlRenderer = getUrlRenderer();\n\n\t\tUrl originalUrl = Url.parse(url);\n\n\t\t/*\n\t\t  WICKET-4645 - always pass absolute url to the web container for encoding\n\t\t  because when REDIRECT_TO_BUFFER is in use Wicket may render PageB when\n\t\t  PageA is actually the requested one and the web container cannot resolve\n\t\t  the base url properly\n\t\t */","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebResponse.java#L149-L185","documentation":"ServletWebResponse.sendError wraps IOException from HttpServletResponse.sendError into a WicketRuntimeException; the container failed while reporting the HTTP error, e.g. because the response was already committed or the connection dropped.","triggerScenarios":"Thrown at server-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebResponse.java:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the response was already committed before calling sendError.","Log and treat as a transport-level failure; retry logic rarely helps."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}