java.lang.IllegalStateException

Could not get HttpServletRequest URI: Expected hostname at index 5: ws://:0/messaging/realtime?topic=exchangePrivateOrder

Solutions on the web18784

  • Could not get HttpServletRequest URI: Expected hostname at index 5: ws://:0/messaging/realtime?topic=exchangePrivateOrder
  • via GitHub by jyoti-sungard
    , 11 months ago
    Could not get HttpServletRequest URI: Expected hostname at index 5: ws://:0/messaging/realtime?topic=xyz org.springframework.http.server.ServletServerHttpRequest.getURI(ServletServerHttpRequest.java:98)
  • Could not get HttpServletRequest URI: Expected hostname at index 5: ws://:0/spring-atmosphere/pubsub/xyz?
  • Stack trace

    • java.lang.IllegalStateException: Could not get HttpServletRequest URI: Expected hostname at index 5: ws://:0/messaging/realtime?topic=exchangePrivateOrder at org.springframework.http.server.ServletServerHttpRequest.getURI(ServletServerHttpRequest.java:98) at org.springframework.web.util.UriComponentsBuilder.fromHttpRequest(UriComponentsBuilder.java:282) at org.springframework.web.util.WebUtils.isSameOrigin(WebUtils.java:811) at org.springframework.web.cors.DefaultCorsProcessor.processRequest(DefaultCorsProcessor.java:71) at org.springframework.web.servlet.handler.AbstractHandlerMapping$CorsInterceptor.preHandle(AbstractHandlerMapping.java:503) at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:134) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:954) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:135) at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:96) at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:333) at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:171) at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:223) at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:115) at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:68)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.