• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Fixed SQLite problem with pk (core) beta 12

Status
Not open for further replies.

minecraftere

Verified Member
I just updated Pk and when i start the server i get this:

it say somthing with Database is locked. Hope you can help me.

[Bending] [16:40:56 WARN]: java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked)

[Bending] [16:40:56 WARN]: at org.sqlite.DB.newSQLException(DB.java:383)

[Bending] [16:40:56 WARN]: at org.sqlite.DB.newSQLException(DB.java:387)

[Bending] [16:40:56 WARN]: at org.sqlite.DB.throwex(DB.java:374)

[Bending] [16:40:56 WARN]: at org.sqlite.NestedDB.prepare(NestedDB.java:134)

[Bending] [16:40:56 WARN]: at org.sqlite.DB.prepare(DB.java:123)

[Bending] [16:40:56 WARN]: at org.sqlite.Stmt.executeQuery(Stmt.java:121)

[Bending] [16:40:56 WARN]: at org.sqlite.MetaData.getTables(MetaData.java:1117)

[Bending] [16:40:56 WARN]: at com.projectkorra.rpg.storage.Database.tableExists(Database.java:104)

[Bending] [16:40:56 WARN]: at com.projectkorra.rpg.DBConnection.init(DBConnection.java:39)

[Bending] [16:40:56 WARN]: at com.projectkorra.rpg.ProjectKorraRPG.onEnable(ProjectKorraRPG.java:31)

[Bending] [16:40:56 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)

[Bending] [16:40:56 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:333)

[Bending] [16:40:56 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:412)

[Bending] [16:40:56 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:352)

[Bending] [16:40:56 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:313)

[Bending] [16:40:56 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:742)

[Bending] [16:40:56 WARN]: at org.bukkit.Bukkit.reload(Bukkit.java:301)

[Bending] [16:40:56 WARN]: at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)

[Bending] [16:40:56 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181)

[Bending] [16:40:56 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:643)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1105)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:940)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:26)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:53)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13)

[Bending] [16:40:56 WARN]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

[Bending] [16:40:56 WARN]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:684)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:625)

[Bending] [16:40:56 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:528)

[Bending] [16:40:56 WARN]: at java.lang.Thread.run(Thread.java:745)

[Bending] [16:40:56 INFO]: [ProjectKorraRPG] Creating pk_avatars table.

[Bending] [16:40:59 WARN]: java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked)

[Bending] [16:40:59 WARN]: at org.sqlite.DB.newSQLException(DB.java:383)

[Bending] [16:40:59 WARN]: at org.sqlite.DB.newSQLException(DB.java:387)

[Bending] [16:40:59 WARN]: at org.sqlite.DB.throwex(DB.java:374)

[Bending] [16:40:59 WARN]: at org.sqlite.NestedDB.prepare(NestedDB.java:134)

[Bending] [16:40:59 WARN]: at org.sqlite.DB.prepare(DB.java:123)

[Bending] [16:40:59 WARN]: at org.sqlite.Stmt.execute(Stmt.java:113)

[Bending] [16:40:59 WARN]: at com.projectkorra.rpg.storage.Database.modifyQuery(Database.java:73)

[Bending] [16:40:59 WARN]: at com.projectkorra.rpg.DBConnection.init(DBConnection.java:46)

[Bending] [16:40:59 WARN]: at com.projectkorra.rpg.ProjectKorraRPG.onEnable(ProjectKorraRPG.java:31)

[Bending] [16:40:59 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)

[Bending] [16:40:59 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:333)

[Bending] [16:40:59 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:412)

[Bending] [16:40:59 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:352)

[Bending] [16:40:59 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:313)

[Bending] [16:40:59 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:742)

[Bending] [16:40:59 WARN]: at org.bukkit.Bukkit.reload(Bukkit.java:301)

[Bending] [16:40:59 WARN]: at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)

[Bending] [16:40:59 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181)

[Bending] [16:40:59 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:643)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1105)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:940)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:26)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:53)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13)

[Bending] [16:40:59 WARN]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

[Bending] [16:40:59 WARN]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:684)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:625)

[Bending] [16:40:59 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:528)

[Bending] [16:40:59 WARN]: at java.lang.Thread.run(Thread.java:745)
 

jedk1

New Member
Hmm, either
a) try restart the server and see if it fixes it
b) take a backup of the 'projectkorra.db', then delete the file. If this works, replace the new database with the backup and try.
c) Im out of ideas here, normally restarting the server fixes any database issues i have :p
 

minecraftere

Verified Member
Hmm, either
a) try restart the server and see if it fixes it
b) take a backup of the 'projectkorra.db', then delete the file. If this works, replace the new database with the backup and try.
c) Im out of ideas here, normally restarting the server fixes any database issues i have :p
it didnt worked but i tried to remove all the other projectkorra plugins like pkitem and pkrpg and it was Pkrpg that have problems with connect with the database. So i cannot use Pkrpg :(
 

jedk1

New Member
it didnt worked but i tried to remove all the other projectkorra plugins like pkitem and pkrpg and it was Pkrpg that have problems with connect with the database. So i cannot use Pkrpg :(
you tried starting a fresh with the database?
 

Mist

Staff member
Administrator
The database locks when too many queries are being run at once. To my knowledge, this happens when you use the /reload command. You should NEVER use the /reload command (for this very reason)
 

minecraftere

Verified Member
The database locks when too many queries are being run at once. To my knowledge, this happens when you use the /reload command. You should NEVER use the /reload command (for this very reason)
This only happen with ProjectKorraRPG the others plugins work fine with /reload
 

jedk1

New Member
This only happen with ProjectKorraRPG the others plugins work fine with /reload
As a rule of thumb, mist is right in saying you shoul never use /reload. Using /reload can cause many many issues with your server, as
A) some plugins arent designed to be reloaded
B) reloading makes your server laggy compared to a restart.
 
Status
Not open for further replies.
Top