You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot find WebSocketServerFactory class (Error) #232
I'm receiving this error when it tries to start javalin. I compile the jar using maven and it has all the dependencies it needs even the WebSocketServerFactory. But I still get this error: https://pastebin.com/H6HYx3SP
I'm using Javalin 1.7.0.
Can someone help me with this because it is driving me crazy as I've tried multiple things and I just don't know what to do anymore.
I can share my pom files but I cannot share the source code because I see the software to people who are interested. But here are the pom files the contain the stuff about dependencies and such,
Please remove any sensitive code and upload an example project which reproduces the error. It's difficult to help when you only have half the information.
Alright, then you have some other code somewhere that uses jetty websockets (might be something you haven't written yourself), and there is a version mismatch.
Excluding the websocket dependency from Javalin (or making sure they're in sync) should fix it.
The only thing I got that uses Jetty is Javalin and I don't understand how there can be a version mismatch as I compile the jar with all the dependencies like it says in the documentation.
Then I'm out of ideas. Your POMs and Java code looks fine, so your best bet is to upload your project. Remove any custom code you think is sensitive, we just care about the part where it breaks.
For what it is worth I wasn't able to get the project to compile until I updated the <repository> in the pom.xml to look like this so the dependency could be resolved:
The code provided doesn't have a typical main method since it's a plugin for something else, but I was able to write a simple main that setup a websocket handler and everything worked as expected.
I wasn't able to reproduce it either, seems to work fine with when adding a custom public static void main. Are you seeing the conflict when trying to load the plugin inside whatever it plugs into?
Activity
ChimpGamer commentedon Jun 4, 2018
I can share my pom files but I cannot share the source code because I see the software to people who are interested. But here are the pom files the contain the stuff about dependencies and such,
Parent: https://pastebin.com/nDcqX4G8
Other: https://pastebin.com/hXLRj8zs
ChimpGamer commentedon Jun 4, 2018
NetworkManagerAPI Pom: https://pastebin.com/uiWCL0EH
I use Intellij IDEA
ChimpGamer commentedon Jun 4, 2018
Hmm, okay. Thanks for trying!
ChimpGamer commentedon Jun 4, 2018
I've tried to do this on 2 different computers with both the same result so I don't think it is the IDE of the .m2 folder.
tipsy commentedon Jun 4, 2018
Please remove any sensitive code and upload an example project which reproduces the error. It's difficult to help when you only have half the information.
ChimpGamer commentedon Jun 4, 2018
That's the only class where I use Javalin.
tipsy commentedon Jun 4, 2018
Alright, then you have some other code somewhere that uses jetty websockets (might be something you haven't written yourself), and there is a version mismatch.
Excluding the websocket dependency from Javalin (or making sure they're in sync) should fix it.
ChimpGamer commentedon Jun 4, 2018
The only thing I got that uses Jetty is Javalin and I don't understand how there can be a version mismatch as I compile the jar with all the dependencies like it says in the documentation.
david-wg2 commentedon Jun 4, 2018
Is this an Android app?
ChimpGamer commentedon Jun 4, 2018
No it isn't it is a BungeeCord plugin. Don't know if you ever heard of it. But it is used for minecraft servers.
david-wg2 commentedon Jun 4, 2018
Could BungeeCord (or one of its dependencies) be using Jetty ? I see someone else is having a similar issue: https://www.spigotmc.org/threads/websocket-how-to-use-websockets-with-spigot.305550/
Edit: Maybe this is yours 😓
ChimpGamer commentedon Jun 4, 2018
If I'm right BungeeCord only uses netty not jetty and that post is regarding Spigot not BungeeCord.
Edit: It's not mine :P
david-wg2 commentedon Jun 4, 2018
Then I'm out of ideas. Your POMs and Java code looks fine, so your best bet is to upload your project. Remove any custom code you think is sensitive, we just care about the part where it breaks.
ChimpGamer commentedon Jun 4, 2018
I've created a Test plugin for BungeeCord with Javalin and its dependencies and I get the same error again. I'm uploading the source now.
ChimpGamer commentedon Jun 4, 2018
https://github.com/ChimpGamer/NMJavalinTest
I hope that's good enough.
david-wg2 commentedon Jun 4, 2018
That's perfect, thanks. I'm currently traveling, but I'll have a look on Wednesday or Thursday if @majorpasza or someone else doesn't solve it first.
ChimpGamer commentedon Jun 4, 2018
Okay, Thank you!
plombardi89 commentedon Jun 5, 2018
For what it is worth I wasn't able to get the project to compile until I updated the
<repository>in thepom.xmlto look like this so the dependency could be resolved:The code provided doesn't have a typical main method since it's a plugin for something else, but I was able to write a simple main that setup a websocket handler and everything worked as expected.
tipsy commentedon Jun 7, 2018
@ChimpGamer did you try changing your repository tag ?
ChimpGamer commentedon Jun 7, 2018
Yea, I already did but still the same issue. I'm a bit confused why this keeps happening.
tipsy commentedon Jun 7, 2018
I wasn't able to reproduce it either, seems to work fine with when adding a custom
public static void main. Are you seeing the conflict when trying to load the plugin inside whatever it plugs into?tipsy commentedon Jun 26, 2018
@ChimpGamer since no one is able to reproduce this, I think I'll close the issue.
tipsy commentedon Sep 13, 2018
@ChimpGamer if you want to give this another look, there is a possible solution in #358.