Skip to content

Cannot find WebSocketServerFactory class (Error) #232

Closed

Description

@ChimpGamer

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.

Activity

  1. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    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

  2. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    NetworkManagerAPI Pom: https://pastebin.com/uiWCL0EH

    I use Intellij IDEA

  3. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    Hmm, okay. Thanks for trying!

  4. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    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.

  5. tipsy commented on Jun 4, 2018

    @tipsy
    Member

    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.

  6. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    image

    That's the only class where I use Javalin.

  7. tipsy commented on Jun 4, 2018

    @tipsy
    Member

    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.

  8. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    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.

  9. david-wg2 commented on Jun 4, 2018

    @david-wg2
    Contributor

    Is this an Android app?

  10. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    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.

  11. david-wg2 commented on Jun 4, 2018

    @david-wg2
    Contributor

    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 😓

  12. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    If I'm right BungeeCord only uses netty not jetty and that post is regarding Spigot not BungeeCord.

    Edit: It's not mine :P

  13. david-wg2 commented on Jun 4, 2018

    @david-wg2
    Contributor

    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.

  14. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    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.

  15. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author
  16. david-wg2 commented on Jun 4, 2018

    @david-wg2
    Contributor

    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.

  17. ChimpGamer commented on Jun 4, 2018

    @ChimpGamer
    Author

    Okay, Thank you!

  18. plombardi89 commented on Jun 5, 2018

    @plombardi89
    Contributor

    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:

            <repository>
                <id>md_5-snapshots</id>
                <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            </repository>

    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.

  19. tipsy commented on Jun 7, 2018

    @tipsy
    Member

    @ChimpGamer did you try changing your repository tag ?

  20. ChimpGamer commented on Jun 7, 2018

    @ChimpGamer
    Author

    Yea, I already did but still the same issue. I'm a bit confused why this keeps happening.

  21. tipsy commented on Jun 7, 2018

    @tipsy
    Member

    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?

  22. tipsy commented on Jun 26, 2018

    @tipsy
    Member

    @ChimpGamer since no one is able to reproduce this, I think I'll close the issue.

  23. tipsy commented on Sep 13, 2018

    @tipsy
    Member

    @ChimpGamer if you want to give this another look, there is a possible solution in #358.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions