java.lang.IllegalStateException: 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)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by jyoti-sungard
, 1 year 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)
java.lang.IllegalStateException: 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)
at org.springframework.web.util.UriComponentsBuilder.fromHttpRequest(UriComponentsBuilder.java:282)
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 javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
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)

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.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.