My Oracle Support Banner

Error: "Handshake Error" When Trying to Connect a WebSocket in Prime Projects for Event Notifications (Doc ID 2487123.1)

Last updated on JUNE 04, 2019

Applies to:

Oracle Prime Cloud Service - Version 18.9 and later
Information in this document applies to any platform.

Symptoms

On : 18.9 version, Cloud: Administration

When attempting to connect to a websocket via Java code the following error occurs.

ERROR

javax.websocket.DeploymentException: Handshake error.
at org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:679)
at org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:717)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:871)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:516)
at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:360)
at WebsocketClient.(WebsocketClient.java:95)
at WebsocketClient.main(WebsocketClient.java:44)
Caused by: org.glassfish.tyrus.client.RedirectException: Received HTTP response status code: 302 and redirect processing is not enabled.
at org.glassfish.tyrus.client.TyrusClientEngine.handleRedirect(TyrusClientEngine.java:403)
at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:284)
at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(GrizzlyClientFilter.java:346)
at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(GrizzlyClientFilter.java:315)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Unknown Source)


STEPS

The issue can be reproduced at will with the following steps:

  1. Use sample code provide in https://docs.oracle.com/cd/E80480_01/English/integration/prime_rest_api/D132856.html > Example Java Websocket Client
  2. Update the endpoints with the specific information
      public static String websocketEndpoint = "prime.com/primeapi/primeevents/";
      private static String userName = "user@user.com";
      private static String passWord = "password";
  3. Try to connect
  4. Notice Error

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.