Java library conflict
Posted: 31 Jul 2025, 10:23
I perform server-side authorisation checks via Google accounts. To do this, I use a library from Google https://developers.google.com/api-clien ... t/download
I copy it to the extensions/__lib__ directory.
When the library is running, an error occurs
This happens because the Google library uses guava-31.1-jre.jar, while SmartFoxServer itself uses guava-18.0.jar. In version 20, a new method was added to this library. How can I make the library work?
What I have already done:
1. I looked at previous versions of the Google library, which also had guava > 20.
2. I looked at the new versions of SmartFoxServer. The guava version has not changed there.
I copy it to the extensions/__lib__ directory.
When the library is running, an error occurs
Code: Select all
java.lang.NoSuchMethodError:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NoSuchMethodError
Message: 'long com.google.common.io.ByteStreams.exhaust(java.io.InputStream)'
Description: Error handling event: { USER_LOGIN, Params: [LOGIN_IN_DATA, LOGIN_PASSWORD, SESSION, LOGIN_OUT_DATA, LOGIN_NAME, ZONE] } Listener: com.smartfoxserver.v2.entities.managers.SFSExtensionManager@66748676This happens because the Google library uses guava-31.1-jre.jar, while SmartFoxServer itself uses guava-18.0.jar. In version 20, a new method was added to this library. How can I make the library work?
What I have already done:
1. I looked at previous versions of the Google library, which also had guava > 20.
2. I looked at the new versions of SmartFoxServer. The guava version has not changed there.