NoClassDefFoundError for Issue Tab Module

Hello,

I am trying to create a WebSocket connection within my Jira Server Plugin. I am using the following WebSocket Framework to accomplish this - GitHub - TooTallNate/Java-WebSocket: A barebones WebSocket client and server implementation written in 100% Java.

I have added the dependency

<dependency>
  <groupId>org.java-websocket</groupId>
  <artifactId>Java-WebSocket</artifactId>
  <version>1.5.1</version>
  <scope>provided</scope>
</dependency>

And have included it in <Import-Package>

org.java_websocket.*;resolution:="optional";version="1.5.1",

Yet I am still getting the following error when attempting to view the Issua Tab I created

Detected an error (NoClassDefFoundError) instantiating the module for plugin ‘io.bigpanda.jira.server’ for module ‘bigpanda-issue-tab’: org/java_websocket/client/WebSocketClient

I think you just need to change the scope to compile - provided is for classes provided by Jira - compile will include the dependency in your plugin jar.

2 Likes

Thanks Richard! That did the trick!

@Julio-BigPanda Hi Julio, I have been searching for a long while for a real solution regarding web socket implementation in a server plugin.
I would really appreciate if you could guide me in the right direction, as you seem to have figured this out. I am stuck at the part that how can I use this class in the plugin to get a proper ws server, like what plugin module should i use this with. Any help will be really appreciated.

best regards,
Abhinav