slackapi / slackapi/java-slack-sdk

slack-api-client 1.x is not compatible with tyrus-standalone-client 2.x

Open
#720 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependencies enhancement project:slack-api-client
Dominant language
Java
Stars
602
Forks
232
Avg merge
4d 9h
Merged PRs (30d)
7

Description

When I use in my project:

tyrus-standalone-client  2.0.0
slack-api-client 1.7.0

i receive:


***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    com.slack.api.socket_mode.impl.SocketModeClientTyrusImpl.connect(SocketModeClientTyrusImpl.java:170)

The following method did not exist:

    'javax.websocket.Session org.glassfish.tyrus.client.ClientManager.connectToServer(java.lang.Object, java.net.URI)'

The method's class, org.glassfish.tyrus.client.ClientManager, is available from the following locations:

    jar:file:/home/tomaszlos/.gradle/caches/modules-2/files-2.1/org.glassfish.tyrus.bundles/tyrus-standalone-client/2.0.0/87902cd5c919b93cffa063fb0212366165aa74ed/tyrus-standalone-client-2.0.0.jar!/org/glassfish/tyrus/client/ClientManager.class

The class hierarchy was loaded from the following locations:

    org.glassfish.tyrus.client.ClientManager: file:/home/tomaszlos/.gradle/caches/modules-2/files-2.1/org.glassfish.tyrus.bundles/tyrus-standalone-client/2.0.0/87902cd5c919b93cffa063fb0212366165aa74ed/tyrus-standalone-client-2.0.0.jar
    org.glassfish.tyrus.core.BaseContainer: file:/home/tomaszlos/.gradle/caches/modules-2/files-2.1/org.glassfish.tyrus.bundles/tyrus-standalone-client/2.0.0/87902cd5c919b93cffa063fb0212366165aa74ed/tyrus-standalone-client-2.0.0.jar
    org.glassfish.tyrus.core.ExecutorServiceProvider: file:/home/tomaszlos/.gradle/caches/modules-2/files-2.1/org.glassfish.tyrus.bundles/tyrus-standalone-client/2.0.0/87902cd5c919b93cffa063fb0212366165aa74ed/tyrus-standalone-client-2.0.0.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.glassfish.tyrus.client.ClientManager

But When I change tyrus-standalone-client to 1.17 all works fine.

Java Runtime version

openjdk version "11.0.10" 2021-01-19

OS info

20.04.1-Ubuntu

Expected result:

the slack API lib should handle newer versions of tyrus-standalone-client.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with slack-api-client 1.7.0 and tyrus-standalone-client 2.0.0, then inspect SocketModeClientTyrusImpl.java around line 170 and the dependency declarations. Compare the working Tyrus 1.17 setup with the newer version; done means Socket Mode starts successfully with the newer client without breaking the supported configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.