theonedev/onedev · error · java.lang.IllegalStateException

There is no HTTP Session bound. Without a session Wicket won

Error message

There is no HTTP Session bound. Without a session Wicket won't be able to find the stored page to update its components

What it means

AbstractWebSocketProcessor's constructor requires an HTTP session to locate the stored Wicket page for component updates; when request.getSession(true) yields none, this IllegalStateException aborts the websocket processor creation.

Source

Thrown at server-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java:113

	private final WebSocketSettings webSocketSettings;
	private final IWebSocketConnectionRegistry connectionRegistry;
	private final IWebSocketConnectionFilter connectionFilter;
	private final HttpServletRequest servletRequest;

	/**
	 * Constructor.
	 *
	 * @param request
	 *      the http request that was used to create the TomcatWebSocketProcessor
	 * @param application
	 *      the current Wicket Application
	 */
	public AbstractWebSocketProcessor(final HttpServletRequest request, final WebApplication application)
	{
		final HttpSession httpSession = request.getSession(true);
		if (httpSession == null)
		{
			throw new IllegalStateException("There is no HTTP Session bound. Without a session Wicket won't be " +
					"able to find the stored page to update its components");
		}
		this.sessionId = httpSession.getId();

		String pageId = request.getParameter("pageId");
		resourceName = request.getParameter("resourceName");
		if (Strings.isEmpty(pageId) && Strings.isEmpty(resourceName))
		{
			throw new IllegalArgumentException("The request should have either 'pageId' or 'resourceName' parameter!");
		}
		if (Strings.isEmpty(pageId) == false)
		{
			this.pageId = Integer.parseInt(pageId, 10);
		}
		else
		{
			this.pageId = NO_PAGE_ID;
		}

View on GitHub (pinned to d44925c47c)

Solutions

  1. Ensure the websocket handshake request carries a valid HTTP session (cookies enabled).
  2. Do not use stateful websocket pages without session support.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java:113 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/62cf77cffc69b1b8. Report an issue: GitHub.