problems with ap 3.0 writing to db

  • Hello
    I've ap 3.0 installed and everything seemed ok, except that when i try to create my spawn area i get no error but in the server logs i see this;


    SQLString: INSERT INTO areas(name, startChunkpositionX, startChunkpositionY, startChunkpositionZ, startBlockpositionX, startBlockpositionY, startBlockpositionZ, endChunkpositionX, endChunkpositionY, endChunkpositionZ, endBlockpositionX, endBlockpositionY, endBlockpositionZ, playerID) VALUES ('spawn', '2', '0', '4', '9', '43', '2', '8', '1', '7', '5', '26', '6', '1')
    java.sql.SQLException: attempt to write a readonly database
    at org.sqlite.NativeDB.throwex(NativeDB.java:210)
    at org.sqlite.NativeDB._exec(Native Method)
    at org.sqlite.Stmt.executeUpdate(Stmt.java:152)
    at lua.wrapper.LuaDatabase.queryupdate(SourceFile:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(Unknown Source)
    at org.luaj.vm2.lib.jse.JavaMethod.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
    at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
    at lua.CallbackManager.triggerCallback(SourceFile:27)
    at D.e.a(SourceFile:1354)
    at D.e.messageReceived(SourceFile:108)
    at de.jiw.network.kernel.KernelAdapter.dispatch(KernelAdapter.java:188)
    at de.jiw.network.message.RawPacket.run(RawPacket.java:54)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    ... (1) ChunkAdditions saved to DB!
    ... (2) ChunkAdditions saved to DB!
    SQLString: INSERT INTO rights ('areaID', 'playerID', 'group') VALUES ('0', '1', 'Owner')
    java.sql.SQLException: attempt to write a readonly database
    at org.sqlite.NativeDB.throwex(NativeDB.java:210)
    at org.sqlite.NativeDB._exec(Native Method)
    at org.sqlite.Stmt.executeUpdate(Stmt.java:152)
    at lua.wrapper.LuaDatabase.queryupdate(SourceFile:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(Unknown Source)
    at org.luaj.vm2.lib.jse.JavaMethod.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
    at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
    at lua.ScriptEventList.triggerEvent(SourceFile:20)
    at lua.ScriptEventManager.triggerEvent(SourceFile:32)
    at D.b.a(SourceFile:192)
    at D.b.messageReceived(SourceFile:140)
    at de.jiw.network.kernel.KernelAdapter.dispatch(KernelAdapter.java:188)
    at de.jiw.network.message.RawPacket.run(RawPacket.java:54)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)


    so I checked in the directory of /scripts/AreaProtection and changed the scriptdatabase.db to all rights (chmod 777) but it continues to give the error that unable to write to readonly database.


    Please help !


    thanks

  • java.sql.SQLException: attempt to write a readonly database

    check the permissions on the folder where ap is contained. the directory and its contents should be owned by the same user that executed the game server.


    If you extracted the plugin under the root account then you may have to fix the ownership.


    chown -R user:group risingworld will recursively set the user and group you want on the entire game.


    Also, did you restart the server or issue the reloadplugins command after running chmod?

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!