Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.eclipse.jetty.util.log.* has been removed from Jetty #168

Closed
youcangetme opened this issue Aug 4, 2024 · 4 comments
Closed

org.eclipse.jetty.util.log.* has been removed from Jetty #168

youcangetme opened this issue Aug 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@youcangetme
Copy link

Describe the bug

The logging facility in Jetty was never mean to be used directly but somehow it was used in io.obswebsocket.community.client.OBSRemoteControllerBuilder. Since the Jetty team removed this entire package, applications using the newer versions of these libraries conflict and obs-websocket-java fails to start.

Please see here; jetty/jetty.project#4572

Code Sample

obsRemoteController = OBSRemoteController.builder().host(host) // Default host
		.port(port) // Default port
		.password(pword) // Provide your password here
		.connectionTimeout(timeout) // Seconds the client will wait for OBS to respond
		.lifecycle()                              // Add some lifecycle callbacks
        .onReady(this::onReady)                   // Add onReady callback
        .and()                                    // Build the LifecycleListenerBuilder
        .registerEventListener(StudioModeStateChangedEvent.class,
            this::onStudioModeStateChanged)       // Register a StudioModeStateChangedEvent
        .build();   

Expected behavior

The OBS Client starts.

Additional context

Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Log
at org.eclipse.jetty.websocket.client.WebSocketClient.(WebSocketClient.java:70) ~[websocket-client-9.4.49.v20220914.jar:9.4.49.v20220914]
at io.obswebsocket.community.client.OBSRemoteControllerBuilder.(OBSRemoteControllerBuilder.java:26) ~[client-2.0.0.jar:na]
at io.obswebsocket.community.client.OBSRemoteController.builder(OBSRemoteController.java:80) ~[client-2.0.0.jar:na]

@youcangetme youcangetme added the bug Something isn't working label Aug 4, 2024
@nicoasi
Copy link

nicoasi commented Dec 24, 2024

I there a way to use obs-websocket-java nowadays ? I'm trying to use it in my Java 17 maven project but without success because of this...

@youcangetme
Copy link
Author

I use Spring's websockets and go direct to OBS. Use Jackson's JsonNodes to parse that payload until you narrow down the object structure and then you can make it concrete. This library is not supported and it's poorly written in the first place.

@ChristopheCVB
Copy link
Member

I use Spring's websockets and go direct to OBS. Use Jackson's JsonNodes to parse that payload until you narrow down the object structure and then you can make it concrete. This library is not supported and it's poorly written in the first place.

Feel free to write one that is not and open a PR, then I can make you owner of this repo

@youcangetme
Copy link
Author

Feel free to write one that is not and open a PR, then I can make you owner of this repo

Thank you for the offer however I must decline. Gradle is a deal breaker. I don't hate Gradle but I do remove it whenever I encounter it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants