-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi guys,
I am running wildfly an application that uses the jsr for the
websockets provided. I have a unit test and I use the ContainerManager
to inject a client and send a message to a specific endpoint. I am
getting a runtime exception:
java.lang.RuntimeException: Could not find an implementation class.
at
javax.websocket.ContainerProvider.getWebSocketContainer(ContainerProvider.java:73)
at
org.javaee7.websocket.binary.test.WebsocketByteBufferEndpointTest.connectToServer(WebsocketByteBufferEndpointTest.java:98)
at
org.javaee7.websocket.binary.test.WebsocketByteBufferEndpointTest.testEndpointByteBuffer(WebsocketByteBufferEndpointTest.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Point here is that I have included the undertow core and jsr in my
classpath. The application is deployed as war in wildfly. There is a
sample in openshift that performs the same but uses jsr specific
implementation from Glassfish tyrus.In my test I start wildfly using
the Arquillian + to save the burden I start it with the full profile.
I have a @ClientEndpoint class with an @OnOpen that i inject it to the
contaner the following way:
WebSocketContainer wSocketContainer =
ContainerProvider.getWebSocketContainer();
wSocketContainer.connectToServer(MyEndpointClient.class, new
URI("ws://localhost:8080/myapp/"+endpoint));
regards
Nick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iF4EAREIAAYFAlJ2SnwACgkQM4d5SPwi8Etl6QD9EcyBxfNgDQOcBrK+PIb//RzQ
Q2TTVJcuD5WptNN0VcQA/i4D1Z+Ywhc63PzrMQgwSFzDw5Aw4GPFUzbNua7hwcsk
=WDy2
-----END PGP SIGNATURE-----