Add missing SyncValues class with UUID serializer #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Application failed on startup with
NoClassDefFoundError: Could not initialize class dev.slne.surf.chat.core.common.util.SyncValuescaused by missing UUID serializer in kotlinx.serialization. Error occurred duringPreLoginChatTaskwhenIgnoreListRepository.cacheIgnorelistattempted class initialization.Changes
Created
/surf-chat-core/src/main/kotlin/dev/slne/surf/chat/core/common/util/SyncValues.kt:UUIDSerializer: Custom
KSerializer<UUID>that serializes UUIDs as strings. Includes error handling that wrapsIllegalArgumentExceptioninSerializationExceptionwith format expectations.SyncValues object: Provides
serializersModulewith contextual UUID serialization and pre-configuredjsoninstance for immediate use.Usage: Use
SyncValues.jsonfor serializing data with UUID fields, or includeSyncValues.serializersModulein custom Json configurations.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
repo.slne.dev/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
can you fix this
[23.11.2025 10:25:18 ERROR]: Failed to run pre player join task: PreLoginChatTask for player: 1c779cb1-3860-4e23-9cac-7f160b2acc61
java.lang.NoClassDefFoundError: Could not initialize class dev.slne.surf.chat.core.common.util.SyncValues
at surf-chat-server-1.21.10-4.1.5-SNAPSHOT-all.jar/dev.slne.surf.chat.server.database.repository.IgnoreListRepository.cacheIgnorelist$suspendImpl(IgnoreListRepository.kt:17) ~[?:?]
at surf-chat-server-1.21.10-4.1.5-SNAPSHOT-all.jar/dev.slne.surf.chat.server.database.repository.IgnoreListRepository.cacheIgnorelist(IgnoreListRepository.kt) ~[?:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:565) ~[?:?]
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97) ~[kotlin-reflect-2.2.20.jar!/:2.2.20-release-333]
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113) ~[kotlin-reflect-2.2.20.jar!/:2.2.20-release-333]
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:250) ~[kotlin-reflect-2.2.20.jar!/:2.2.20-release-333]
at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:81) ~[kotlin-reflect-2.2.20.jar!/:2.2.20-release-333]
at org.springframework.core.CoroutinesUtils.lambda$invokeSuspendingFunction$3(CoroutinesUtils.java:143) ~[spring-core-6.2.11.jar!/:6.2.11]
at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$4.invokeSuspend(IntrinsicsJvm.kt:270) ~[kotlin-stdlib-2.2.20.jar!/:2.2.20-release-333]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) [kotlin-stdlib-2.2.20.jar!/:2.2.20-release-333]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704) [kotlinx-coroutines-core-jvm-1.10.2.jar!/:?]
Caused by: java.lang.ExceptionInInitializerError: Exception kotlinx.serialization.SerializationException: Serializer for class 'java.util.UUID' is not found.
Please ensure that class is marked as '@serializable' and that the serialization compiler plugin is applied.
[in thread "StandaloneMain"]
at kotlinx.serialization.SerializersKt__SerializersKt.noCompiledSerializer(Serializers.kt:408) ~[kotlinx-serialization-core-jvm-1.9.0.jar!/:1.9.0]
at kotlinx.serialization.SerializersKt.noCompiledSerializer(Unknown Source) ~[kotlinx-serialization-core-jvm-1.9.0.jar!/:1.9.0]
at surf-chat-server-1.21.10-4.1.5-SNAPSHOT-all.jar/dev.slne.surf.chat.core.common.util.SyncValues.(SyncValues.kt:69) ~[?:?]
at surf-chat-server-1.21.10-4.1.5-SNAPSHOT-all.jar/dev.slne.surf.chat.server.ServerMain.(ServerMain.kt:15) ~[?:?]
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483) ~[?:?]
at dev.slne.surf.cloud.api.server.plugin.provider.ProviderLoader.loadClass(ProviderLoader.kt:21) ~[surf-cloud-api-server-1.21.10-1.0.0-SNAPSHOT.jar!/:?]
at dev.slne.surf.cloud.api.server.plugin.provider.ProviderLoader.loadClass$default(ProviderLoader.kt:7) ~[surf-cloud-api-server-1.21.10-1.0.0-SNAPSHOT.jar!/:?]
at dev.slne.surf.cloud.api.server.plugin.bootstrap.StandalonePluginBootstrap.createPlugin$suspendImpl(StandalonePluginBootstrap.kt:11) ~[surf-cloud-api-server-1.21.10-1.0.0-SNAPSHOT.jar!/:?]
at dev.slne.surf.cloud.api.server.plugin.bootstrap.StandalonePluginBootstrap.createPlugin(StandalonePluginBootstrap.kt) ~[surf-cloud-api-server-1.21.10-1.0.0-SNAPSHOT.jar!/:?]
at surf-chat-server-1.21.10-4.1.5-SNAPSHOT-all.jar/dev.slne.surf.chat.server.ServerBootstrap.createPlugin(ServerBootstrap.kt:10) ~[?:?]
at dev.slne.surf.cloud.standalone.plugin.provider.impl....
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.