PreciousStones - Back under the development of phaed

Discussion in 'Inactive/Unsupported Plugins' started by aPunch, Apr 20, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    aPunch

    Ryannober, Avous and kahlilnc like this.
  2. Offline

    Qanthelas

    Just as a heads up in case other people encounter the problem I just ran in to (or if you are thinking 'Hmm, do I really need to run those database update queries before I upgrade?')

    tl;dr Not updating your database with the queries mentioned in the original post before upgrading from 4.0.2 up to the latest 4.2.1 will make your server.log file explode with errors.

    So here's the thing, I herp derped and forgot about the part in the original post about running some queries to update your database. I was updating all my server's plugins (and updating Bukkit to 766) so I just went ahead and dropped in the PreciousStones 4.2.1 file over the old 4.0.2 file. I start up my server and notice that my pstones don't seem to work. I check the log and find that it is suddenly a few megabytes larger than I remember it being. Checking through it, I see a whole ton of errors like this (and note that I'm putting this in pastebin so it doesn't take up like a whole page here in this thread :p):

    http://pastebin.com/Jfrx1LDV

    I am quite impressed with how many times per second it manages to throw its errors :p Anyways, I'll post just a bit of the error here so that if somebody is doing a Ctrl+F search for this error they can find it:

    Code:
    2011-05-19 10:28:53 [INFO] [PreciousStones] version 4.2.1 loaded
    2011-05-19 10:28:53 [INFO] [PreciousStones] < imported 0 unbreakables
    2011-05-19 10:28:53 [SEVERE] javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Duplicate entry '-110-63--183-PhoenixRealms' for key 'uq_ps_fields_1']
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:116)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(DmlBeanPersister.java:76)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(DefaultPersistExecute.java:91)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:527)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:404)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaInsert(DefaultPersister.java:377)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRecurse(DefaultPersister.java:361)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:308)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1577)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1567)
    2011-05-19 10:28:53 [SEVERE]     at net.sacredlabyrinth.Phaed.PreciousStones.managers.ForceFieldManager.saveField(ForceFieldManager.java:96)
    2011-05-19 10:28:53 [SEVERE]     at net.sacredlabyrinth.Phaed.PreciousStones.managers.StorageManager.loadFields(StorageManager.java:336)
    2011-05-19 10:28:53 [SEVERE]     at net.sacredlabyrinth.Phaed.PreciousStones.managers.StorageManager.<init>(StorageManager.java:45)
    2011-05-19 10:28:53 [SEVERE]     at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.onEnable(PreciousStones.java:103)
    2011-05-19 10:28:53 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    2011-05-19 10:28:53 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:676)
    2011-05-19 10:28:53 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:249)
    2011-05-19 10:28:53 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    2011-05-19 10:28:53 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    2011-05-19 10:28:53 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    2011-05-19 10:28:53 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    2011-05-19 10:28:53 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    2011-05-19 10:28:53 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:260)
    2011-05-19 10:28:53 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-19 10:28:53 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '-110-63--183-PhoenixRealms' for key 'uq_ps_fields_1'
    2011-05-19 10:28:53 [SEVERE]     at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source)
    2011-05-19 10:28:53 [SEVERE]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-05-19 10:28:53 [SEVERE]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.Util.getInstance(Util.java:382)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
    2011-05-19 10:28:53 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(ExtendedPreparedStatement.java:164)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.java:74)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(InsertHandler.java:155)
    2011-05-19 10:28:53 [SEVERE]     at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    2011-05-19 10:28:53 [SEVERE]     ... 25 more
    So, now you know - you really REALLY need to update your database (like it says to in the original post) before upgdaring past version 4.0.x.

    For the record, I was able to copy back over my 4.0.2 version of the PreciousStones.jar file to my /plugins directory and that fixed things and I can keep going until I get around to updating my database.
     
  3. Offline

    IOn Vash

    i updated my database and updated the plugin now most of the unbreakables are breakable. some are stull unbreakable but most can be broken now and it looks like its that way by type. like all sand blocks are still unbreakable but dirt and cobblestone and most others are breakable now.

    Its not like they got deleted it says i still have

    1,082,820 in the world
    16, 921 in the nether

    edit: i figured it out you need to place a block in the chunk before it protects the blocks this is a huge problem for my server please fix it as soon as possible. Because i cant run my server with most of it unprotected
     
  4. Offline

    phaed

    Here you go, this build will fix your problem: http://dl.dropbox.com/u/1907324/PreciousStones-v4.2.3.zip
     
  5. Offline

    IOn Vash

    thanks for the fast response
     
  6. Offline

    _knot_

    Hello! I love your plugin! However I am looking to use this on a pvp server. I would like an example of how to make a one time use 'anti protection block' to promote raiding and allow access to chests within city protections.
     
  7. Offline

    phaed

    Cant be done
     
  8. Offline

    monster888

    Hi everybody...
    I tryed to install this plugins but i had few error and i dont know how to fix them.
    The console said : Could not load 'plugins\PreciousStones.jar' in folder 'plugins':
    com.avaje.ebeaninternal.lib.sql.DatasourceException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknow database 'minecraft'

    after this there are a sh!t load of : at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.getDataSource(DataSourceManager.java:210)

    i am not a proffesional in scripting or ... other thing like this!
    (btw i hand copied the error)
    Thks a lots


    PS: i installed the Ps folder in there respective folder : bukkit.yml in My minecraft server folder
    and i put PreciousStones(folder) and PreciousStones.jar in the plugins folder.

    i reinstalled it now so folder aren't modified

    thks a lots
     
  9. Offline

    Maxis010

    You need to create the database "minecraft" on your MySQL server or update the bukkit.yml to use an existing database
    If your bukkit.yml is configured for SQLite you will need to change that to MySQL as SQLite is unable to support PreciousStones at this time
     
  10. Offline

    monster888

    Here is my ''bukkit.yml''
    :
    database:
    username: root
    isolation: SERIALIZABLE
    driver: com.mysql.jdbc.Driver
    password: yourpassword
    url: jdbc:mysql://localhost/minecraft

    dunno wath i must change....

    EDIT:
    MySQL server wont launch.... -_-
     
  11. Offline

    phaed

    I think I need to build a introductory post on MySQL for the kids who think that a database is that .db file they sometimes see on their folders. Having to teach database 101 for each and every noob on this thread is getting pretty annoying.
     
  12. Offline

    monster888

    Yeah it would be nice .... Thks if you do it !
     
  13. Offline

    _knot_

  14. Offline

    piemaker16

    is there a version that doesn't require mysql?
     
  15. Offline

    aPunch

    No.
     
  16. Offline

    GmK

    Has anyone else experienced a potential conflict with LWC?

    On our server it *seems* as if when you try to place a city block near an unprotectable chest which has been protected wiutth LWC, that it looses its protection after you tried to place the city block.

    I am not 100% sure on this, just wondering if other people might be able to replicate that?
     
  17. Offline

    phaed

    Your grammar is not clear. What loses its protection the city block or the chest?
     
  18. Offline

    GmK

    Oh sorry, sometimes I tend to forget my basic grammar ;)

    I meant that the chests lose the protection. I am still testing and trying to confirm, as its not consistent and might have other factors involved.
     
  19. Offline

    Joy

    Saw this spammed just now:

    Code:
    20:45:36 [SEVERE] Could not pass event PLAYER_MOVE to PreciousStones
    java.lang.NullPointerException
            at net.sacredlabyrinth.Phaed.PreciousStones.listeners.PSPlayerListener.onPlayerMove(PSPlayerListener.java:217)
            at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:285)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:302)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:131)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:377)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    20:45:36 [SEVERE] Could not pass event PLAYER_MOVE to PreciousStones
     
  20. Offline

    phaed

    You recently changed block types for one of your pstones, but you have fields in the db that still have the old block type . Clean those out, you should be fine.

    Code:
    delete from ps_fields where type_id = 99
    Database Cleanup. Run these individually to clean out any orphaned data in your database:

    Code:
    DELETE FROM ps_allowed_players
    WHERE NOT EXISTS (
        SELECT *
        FROM ps_fields
        WHERE id = ps_allowed_players.field_id
    )
    
    DELETE FROM ps_snitch_entries
    WHERE NOT EXISTS (
        SELECT *
        FROM ps_fields
        WHERE id = ps_snitch_entries.field_id
    )
    
    DELETE FROM ps_item_stacks
    WHERE NOT EXISTS (
        SELECT *
        FROM ps_cloaked
        WHERE id = ps_item_stacks.cloak_entry_id
    )
    
    DELETE FROM ps_cloaked
    WHERE NOT EXISTS (
        SELECT *
        FROM ps_fields
        WHERE cloak_entry_id = ps_cloaked.id
    )
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  21. Offline

    Ecnalyr

    **** Problem solved by installing 4.2.3, leaving problem below so if someone has a similar problem, they can see how I fixed it. ****

    I had gold blocks set up to protect an area 20 in radius. I recently changed this to 10 in radius. However, all my gold blocks still protect an area of 20 in radius.

    I have placed new blocks and they still protect 20 in radius.

    I have deleted the jar and reinstalled, still 20 in Radius.

    I have typed /ps reload - still 20 in Radius.

    How do I fix this?


    Also, when I obtain "Field Info" I get the following result:

    Dimensions: 21x21x21 (which makes sense for my 10 radius setting)

    Only it is protecting an area equal to my old settings of 20 radius (which would yield 41x41x41). What gives?

    Update:

    I just deleted the database that was associated with PS, then made a different database (including different name just in case), and the same problem still occurs.
     
  22. Offline

    phaed

    This is not a bug, the values on the config apply only to new fields. All you had to do was update the already existing fields in your database to 10 radius, you didn't need to lose all your data:

    SQL:
    Code:
    update ps_fields set radius = 10 where type_id = 41
    
     
  23. Offline

    Ecnalyr

    If it only applied to new fields, then why did it not repair itself when I made a completely new database?

    ^ I am asking because I am curious how it actually functions - it is important to understand that even when I made an entirely different database, the problem was still there.
     
  24. Offline

    phaed

    Hmm.... so you're saying that you have a clean install of PS with default settings file and clean database and set gold blocks to 10 radius, yet they protect an area of 20 radius (41x41x41)?
     
  25. Offline

    eastonch

    Finally got this working. Seems fun. thanks :)
     
  26. Offline

    MrCeaser

    hahaha thanks man ive been trying to get this all the time im gonna give this a try and tell you how it goes

    ok i got it up but when i type any /ps command it immediately says "/ps help - Displays PreciousStones commands"

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  27. Offline

    phaed

    That means you don't have it up, PS crashed with some error. Find it in your logs, post it here.
     
  28. Offline

    MrCeaser

    [INFO] executing 7 of 14 alter table ps_allowed_players add constraint fk_ps_allowed_players_field_1 fore...
    2011-05-23 14:03:56 [INFO] Can not test connection as heartbeatsql is not set
    2011-05-23 14:03:56 [INFO] Closing Connection[PreciousStones.0] psReuse[0] psCreate[7] psSize[6]
    2011-05-23 14:03:56 [INFO] DataSourcePool [PreciousStones] grow; id[PreciousStones.2] busy[3] max[20]
    2011-05-23 14:03:56 [SEVERE] Error: Error executing stmt[alter table ps_allowed_players add constraint fk_ps_allowed_players_field_1 foreign key (field_id) references ps_fields (id)] error[[SQLITE_ERROR] SQL error or missing database (near "constraint": syntax error)] loading PreciousStones v4.2.1 (Is it up to date?)
    javax.persistence.PersistenceException: Error: Error executing stmt[alter table ps_allowed_players add constraint fk_ps_allowed_players_field_1 foreign key (field_id) references ps_fields (id)] error[[SQLITE_ERROR] SQL error or missing database (near "constraint": syntax error)]
    at com.avaje.ebeaninternal.server.ddl.DdlGenerator.runScript(DdlGenerator.java:233)
    at org.bukkit.plugin.java.JavaPlugin.installDDL(JavaPlugin.java:253)
    at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.setupDatabase(PreciousStones.java:154)
    at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.onEnable(PreciousStones.java:85)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:676)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:249)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:260)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.RuntimeException: Error executing stmt[alter table ps_allowed_players add constraint fk_ps_allowed_players_field_1 foreign key (field_id) references ps_fields (id)] error[[SQLITE_ERROR] SQL error or missing database (near "constraint": syntax error)]
    at com.avaje.ebeaninternal.server.ddl.DdlGenerator.runStatement(DdlGenerator.java:281)
    at com.avaje.ebeaninternal.server.ddl.DdlGenerator.runStatements(DdlGenerator.java:246)
    at com.avaje.ebeaninternal.server.ddl.DdlGenerator.runScript(DdlGenerator.java:224)
    ... 13 more
    Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "constraint": syntax error)
    at org.sqlite.DB.newSQLException(DB.java:383)
    at org.sqlite.DB.newSQLException(DB.java:387)
    at org.sqlite.DB.throwex(DB.java:374)
    at org.sqlite.NativeDB.prepare(Native Method)
    at org.sqlite.DB.prepare(DB.java:123)
    at org.sqlite.PrepStmt.<init>(PrepStmt.java:42)
    at org.sqlite.Conn.prepareStatement(Conn.java:404)
    at org.sqlite.Conn.prepareStatement(Conn.java:399)
    at org.sqlite.Conn.prepareStatement(Conn.java:383)
    at com.avaje.ebeaninternal.server.lib.sql.PooledConnection.prepareStatement(PooledConnection.java:426)
    at com.avaje.ebeaninternal.server.lib.sql.PooledConnection.prepareStatement(PooledConnection.java:396)
    at com.avaje.ebeaninternal.server.ddl.DdlGenerator.runStatement(DdlGenerator.java:271)
    ... 15 more

    thats the part of the log where ot errors out

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  29. Offline

    Maxis010

    Precious Stones can not run in SQLite
    SQLITE_ERROR appears 4 times in that error stack so I'd say it's safe to assume you haven't configured Bukkit to use MySQL
     
  30. Offline

    MrCeaser

    im using MySql through godaddy, how do i configure buikkit to use mysql

    ok im using the bukkit.yml thats in the zip of this plugin i fixed my stuff and it connects correctly from what im seeing

    ok everytijme i use the bukkit.yml in the thread it chages it to some other bukkity.yml nd when i start server it changes it back, i filled out my info correctly and everything but it keeps changing it to
    database:
    username: bukkit
    isolation: SERIALIZABLE
    driver: org.sqlite.JDBC
    password: walrus
    url: jdbc:sqlite:{DIR}{NAME}.db
    settings:
    update-folder: update

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  31. Offline

    Ecnalyr

    Yes, that's what happened, until I did all of the above plus use 4.2.3 (you linked to it in another post on this thread).
     
Thread Status:
Not open for further replies.

Share This Page