EchoPet

EchoPet

882k Downloads

SQL exception & stacktrace

mibby opened this issue · 13 comments

commented

Jenkins build 155.

[24/11/2013]---[08:43:50]§4[§cEchoPet§4]§r §c[SEVERE] `Pets` Table generation failed [MySQL DataBase: EchoPets].
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    at com.mysql.jdbc.Util.getInstance(Util.java:382)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
    at io.github.dsh105.echopet.EchoPet.onEnable(EchoPet.java:177)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:382)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugin(CraftServer.java:288)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.java:270)
    at net.minecraft.server.v1_6_R3.MinecraftServer.l(MinecraftServer.java:331)
    at net.minecraft.server.v1_6_R3.MinecraftServer.f(MinecraftServer.java:308)
    at net.minecraft.server.v1_6_R3.MinecraftServer.a(MinecraftServer.java:268)
    at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.java:165)
    at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:409)
    at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)



[24/11/2013]---[08:44:02]§4[§cEchoPet§4]§r §c[SEVERE] Failed to retrieve Pet data for mibby in MySQL Database
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'EchoPets.Pets' doesn't exist
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    at com.mysql.jdbc.Util.getInstance(Util.java:382)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2273)
    at io.github.dsh105.echopet.mysql.SQLPetHandler.createPetFromDatabase(SQLPetHandler.java:126)
    at io.github.dsh105.echopet.data.PetHandler.loadPets(PetHandler.java:60)
    at io.github.dsh105.echopet.listeners.PetOwnerListener$3.run(PetOwnerListener.java:167)
    at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:58)
    at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:530)
    at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:240)
    at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:493)
    at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
commented

Thanks for reporting! It looks like I'm going to have to optimise the storage format for PetData so that it makes the table a lot more compact. I've been meaning to do this for a while.

Sorry I missed you in the channel last night.

commented

@DSH105, I was actually working on a pets and a pet_data split-up, but it didn't quite get materialized. I can rebase off my pull request and work on it again if desired.

commented

@minecrafter I was also considering storing the PetData as a String to reduce the number of columns in the table.

commented

I don't think that bodes to good DB design, @DSH105. It's expensive to serialize and deserialize DB data - just store it separately in a different table.

commented

@mibby
Have you seen this issue appear again recently?

commented

I have this same error...I have jenkins dev build 304 so lastest.

commented

@Smexhy We already have the stacktrace. Please don't post it again.

commented

And when you fix this error?

commented

When I optimise the SQL data saving (or @minecrafter if he wants to have a go).

commented

The problem unfortunately persists so I went through the code in github to see how to create the table myself and see what fields are required. Whilst I seem to have managed to get it working and I see the record being created in the table using the 'features' of the pet... when I come to do /pet call or show,it tells me I have no Pet.

I don't know whether this is a bug of echopet or whether its the way I created the table, so is there the possibility of getting my hands on a SQL script to create the table?

commented

Ehm... as I mentioned above quoting 'I went through the code in github to see how to create the table myself'.... And yes that is what I used....and as I said it worked... record is created and all, but when i run the call command it says I have no pet

commented

I have a potential fix for this issue available. I need to write a migration, however.