Repository navigation
Cannot open library #30
Copy link
Copy link
Open
Description
I installed the library jdave to maintain our audio bot in discord with thier newer standards.
I got this error message:
2026-03-07 15:54:59.699 ERROR [JDA MainWS-ReadThread] n.d.j.i.requests.WebSocketClient - There was an error in the WebSocket connection. Trace: [["gateway-prd-arm-us-east1-d-rz0h",{"micros":14452
5,"calls":["id_created",{"micros":293,"calls":[]},"session_lookup_time",{"micros":3105,"calls":[]},"session_lookup_finished",{"micros":10,"calls":[]},"discord-sessions-prd-2-159",{"micros":140785
,"calls":["start_session",{"micros":138152,"calls":["discord-api-rpc-56d9cf585d-fflg4",{"micros":60107,"calls":["get_user",{"micros":14005},"get_guilds",{"micros":4931},"send_scheduled_deletion_m
essage",{"micros":10},"guild_join_requests",{"micros":2},"authorized_ip_coro",{"micros":12},"pending_payments",{"micros":2095},"apex_experiments",{"micros":62585},"sessions_experiments",{"micros"
:7},"user_activities",{"micros":4},"played_application_ids",{"micros":4},"linked_users",{"micros":4},"ad_personalization_toggles_disabled",{"micros":3},"regional_feature_config",{"micros":4}]}]},
"starting_guild_connect",{"micros":53,"calls":[]},"presence_started",{"micros":308,"calls":[]},"guilds_started",{"micros":63,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect"
,{"micros":1,"calls":[]},"presence_connect",{"micros":2180,"calls":[]},"connect_finished",{"micros":2192,"calls":[]},"build_ready",{"micros":12,"calls":[]},"clean_ready",{"micros":2,"calls":[]},"
optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]}]}]}]]
java.lang.ExceptionInInitializerError: null
at club.minnced.discord.jdave.ffi.LibDaveSessionBinding.<clinit>(LibDaveSessionBinding.java:113)
at club.minnced.discord.jdave.DaveSessionImpl.create(DaveSessionImpl.java:26)
at club.minnced.discord.jdave.manager.DaveSessionManager.<init>(DaveSessionManager.java:36)
at club.minnced.discord.jdave.manager.DaveSessionManager.create(DaveSessionManager.java:54)
at club.minnced.discord.jdave.interop.JDaveSession.<init>(JDaveSession.java:16)
at club.minnced.discord.jdave.interop.JDaveSessionFactory.createDaveSession(JDaveSessionFactory.java:12)
at net.dv8tion.jda.internal.audio.AudioConnection.<init>(AudioConnection.java:115)
at net.dv8tion.jda.internal.handle.VoiceServerUpdateHandler.lambda$handleInternally$0(VoiceServerUpdateHandler.java:89)
at net.dv8tion.jda.api.utils.MiscUtil.locked(MiscUtil.java:139)
at net.dv8tion.jda.internal.handle.VoiceServerUpdateHandler.handleInternally(VoiceServerUpdateHandler.java:81)
at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:39)
at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:936)
at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:826)
at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:809)
at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:980)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
Caused by: java.lang.ExceptionInInitializerError: null
at club.minnced.discord.jdave.ffi.LibDaveSessionBinding.<clinit>(LibDaveSessionBinding.java:37)
... 21 common frames omitted
Caused by: java.lang.IllegalArgumentException: Cannot open library: /tmp/jdave11547943059811674748/dave9096768902076792803.so
at java.base/java.lang.foreign.SymbolLookup.libraryLookup(SymbolLookup.java:350)
at java.base/java.lang.foreign.SymbolLookup.libraryLookup(SymbolLookup.java:335)
at club.minnced.discord.jdave.utils.NativeLibraryLoader.getSymbolLookup(NativeLibraryLoader.java:50)
at club.minnced.discord.jdave.ffi.LibDaveLookup.<clinit>(LibDaveLookup.java:16)
... 22 common frames omitted
this are the permission of the file:
root@manage:/home/discord/musicbot# ls -l /tmp/jdave11547943059811674748/dave9096768902076792803.so
-rw------- 1 root root 9570512 Mar 7 15:54 /tmp/jdave11547943059811674748/dave9096768902076792803.so
i guess the error is that the file isn't executable.
However i also cannot edit the tmp directory via default methods
See here:
new File(System.getProperty("user.dir") + "/tmp").mkdir();
System.setProperty("java.io.tmpdir", System.getProperty("user.dir") + "/tmp");Possible to edit the tmp directory?
Or any other solution to this case?
Ty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
creperozelot commentedon Mar 7, 2026
Edit: Locally on my windows machine everything just works fine.
MinnDevelopment commentedon Mar 7, 2026
What linux distribution are you using? You likely have a GLIBC version that is too old for this library. You can use
ldd -r /tmp/jdave11547943059811674748/dave9096768902076792803.soto check for linker errors.creperozelot commentedon Mar 7, 2026
I am using Debian 12
thats the output I got from the command:
MinnDevelopment commentedon Mar 7, 2026
Then I would recommend updating to a newer version or using docker images. This library expects GLIBC 2.38 at the moment as you can see in the output of that command.
creperozelot commentedon Mar 8, 2026
hmm.. okay thank that helps a lot.
As quick question, possible to specify a library path as System Property?
e.g.
creperozelot commentedon Mar 8, 2026
As small addition, I guess it would be helpfull for a small information that this library requires glib 2.38 or higher in order to run properly
Ty in advance
zfcmoe commentedon Mar 9, 2026
@creperozelot I opened a PR that has a workaround for this, if you're willing to build libdave from source (which is surprisingly annoying).
creperozelot commentedon Mar 16, 2026
Thanks, actually it is not necessarily required to compile this from source, since many distributions already provide a third-party version for download, even if it is not included directly in the system packages.
EDIT: As Addition I (or any contributor) will/can close this issue on merge on #31
MinnDevelopment commentedon Mar 29, 2026
I've released 0.1.8 with a new system property for this. You should be able to load it from a path using
-Djdave.library.path=/path/to/libdave.so.