-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The library doesn't work properly with Tomcat server #51
Comments
@GalynaY Hi, what dependency or configurations are you running this library with? And would you mind sharing some code that leads to the exceptions that you are seeing? |
I run your sample built-in web application so I can deploy it on a tomcat: import java.net.URI; public class WebsocketListener {
}` The simple servlet: ` import javax.servlet.ServletException; @WebServlet(
} and pom:
` |
@GalynaY, thanks for creating this issue. We have added this request to our backlog. We will continue working in the root cause of this problem according to priorities. |
HybridConnectionListener throws exceptions when using it on a tomcat:
19-Jul-2019 13:48:07.248 SEVERE [autoshutdown-pool-1-thread-3] com.microsoft.azure.relay.RelayLogger.throwingException ClientWebSocket(TrackingId:de9dd33c-7433-49c0-978d-07e191f35798_G16_G10, Address:sb://statelink-relay.servicebus.windows.net) is throwing an Exception: javax.websocket.DeploymentException: Cannot use POJO class [com.microsoft.azure.relay.ClientWebSocket] as it is not annotated with @ClientEndpoint at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:124) at com.microsoft.azure.relay.ClientWebSocket.lambda$connectAsync$0(ClientWebSocket.java:121) at com.microsoft.azure.relay.CompletableFutureUtil.lambda$futureToCompletableFuture$1(CompletableFutureUtil.java:62) at com.microsoft.azure.relay.AutoShutdownScheduledExecutor.lambda$submit$0(AutoShutdownScheduledExecutor.java:60) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 19-Jul-2019 13:48:07.250 SEVERE [autoshutdown-pool-1-thread-3] com.microsoft.azure.relay.RelayLogger.throwingException HybridConnectionListener(TrackingId:92aa61bb-a431-4230-aa5f-a56bf29d0960, Address:sb://statelink-relay.servicebus.windows.net) is throwing an Exception: java.util.concurrent.CompletionException: java.lang.RuntimeException: javax.websocket.DeploymentException: Cannot use POJO class [com.microsoft.azure.relay.ClientWebSocket] as it is not annotated with @ClientEndpoint at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292) at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308) at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:700) at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:687) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) at com.microsoft.azure.relay.CompletableFutureUtil.lambda$futureToCompletableFuture$1(CompletableFutureUtil.java:68) at com.microsoft.azure.relay.AutoShutdownScheduledExecutor.lambda$submit$0(AutoShutdownScheduledExecutor.java:60) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: javax.websocket.DeploymentException: Cannot use POJO class [com.microsoft.azure.relay.ClientWebSocket] as it is not annotated with @ClientEndpoint at com.microsoft.azure.relay.RelayLogger.throwingException(RelayLogger.java:77) at com.microsoft.azure.relay.RelayLogger.throwingException(RelayLogger.java:53) at com.microsoft.azure.relay.ClientWebSocket.lambda$connectAsync$0(ClientWebSocket.java:127) at com.microsoft.azure.relay.CompletableFutureUtil.lambda$futureToCompletableFuture$1(CompletableFutureUtil.java:62) ... 8 more
If I add an annotation, receives other ClassNotFoundException and ClassCastException. I'd like to be able to use this library on any server not only jetty
The text was updated successfully, but these errors were encountered: