CoreProtect

CoreProtect

1M Downloads

1.21.3 Error

NickCloudAT opened this issue ยท 9 comments

commented

Using the latest RC from Patreon on Paper 1.21.3 (1.21.3-7) I currently get this error when killing a creature:

[12:55:55 WARN]: java.io.NotSerializableException: org.bukkit.craftbukkit.attribute.CraftAttribute
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1200)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
[12:55:55 WARN]:        at java.base/java.util.ArrayList.writeObject(ArrayList.java:948)
[12:55:55 WARN]:        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[12:55:55 WARN]:        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[12:55:55 WARN]:        at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1072)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1529)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1451)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1194)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
[12:55:55 WARN]:        at java.base/java.util.ArrayList.writeObject(ArrayList.java:948)
[12:55:55 WARN]:        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[12:55:55 WARN]:        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[12:55:55 WARN]:        at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1072)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1529)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1451)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1194)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
[12:55:55 WARN]:        at java.base/java.util.ArrayList.writeObject(ArrayList.java:948)
[12:55:55 WARN]:        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[12:55:55 WARN]:        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[12:55:55 WARN]:        at java.base/java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1072)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1529)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1451)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1194)
[12:55:55 WARN]:        at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:358)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.database.statement.EntityStatement.insert(EntityStatement.java:28)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.database.logger.EntityKillLogger.log(EntityKillLogger.java:50)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.consumer.process.EntityKillProcess.process(EntityKillProcess.java:24)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.consumer.process.Process.processConsumer(Process.java:206)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.consumer.Consumer.run(Consumer.java:133)
[12:55:55 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[12:55:55 WARN]: java.sql.SQLException: Illegal operation on empty result set.
[12:55:55 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121)
[12:55:55 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[12:55:55 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:81)
[12:55:55 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:55)
[12:55:55 WARN]:        at com.mysql.cj.jdbc.result.ResultSetImpl.checkRowPos(ResultSetImpl.java:541)
[12:55:55 WARN]:        at com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1304)
[12:55:55 WARN]:        at com.mysql.cj.jdbc.result.ResultSetImpl.getInt(ResultSetImpl.java:852)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.hikari.pool.HikariProxyResultSet.getInt(HikariProxyResultSet.java)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.database.logger.EntityKillLogger.log(EntityKillLogger.java:59)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.consumer.process.EntityKillProcess.process(EntityKillProcess.java:24)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.consumer.process.Process.processConsumer(Process.java:206)
[12:55:55 WARN]:        at CoreProtect-CE-23.0-RC1b.jar//net.coreprotect.consumer.Consumer.run(Consumer.java:133)
[12:55:55 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)

I know that this release is not made for 1.21.3, just wanted to report it.

commented

+1
same spam error here

commented

+1

commented

+1 same spam error here

If you're receiving an error, please provide the error message.

commented

Please provide steps to replicate that exact error.

commented

The error is logged whenever a player kills a mob.

commented

The error is logged whenever a player kills a mob.

Tested killing a mob, and not seeing an NotSerializableException on my end.

I used Paper for this, but my CoreProtect Database was from 1.21.1 (if this is useful).
I definitely get this error whenever I kill a mob, or even if one just dies.. It's highly peculiar that you dont get this error o.O

commented

The error is logged whenever a player kills a mob.

Tested killing a mob, and not seeing an NotSerializableException on my end.

commented

I'm back on 1.21.1 so I can't test, but I'm pretty sure I got it at least when killing a sheep with an iron sword.

I checked CraftBukkit's source and CraftAttribute (implements Attribute) doesn't seem to implement Serializable, but I don't know enough about the whole Bukkit ecosystem to know why ObjectOutputStream is able to handle other Attribute implementations and not this one. I did see something about OOS being deprecated, but I wasn't sure what the migration path was outside of Item implementations.

commented

Actually, it might be because Attribute was changed to an interface from an enum, which makes the entire inheritance tree no longer serializable: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/attribute/Attribute.java.