[INACTIVE][DEV] Persistence v0.76 - Data-Driven Bukkit [677]

Discussion in 'Inactive/Unsupported Plugins' started by NathanWolf, Jan 29, 2011.

  1. Offline


    Persistence - Data-Driven Bukkit

    Persistence is a developer API and framework- NOT a game or admin plugin.

    If you've come here looking for plugin/admin support for Spells, Wand, NetherGate or any other plugin that uses Persistence- please turn around and go back to that thread. Thank you for your cooperation!

    If you're a dev, then check the Persistence wiki for information on using the Persistence framework.

    View changelog on github
    Duccis likes this.
  2. Offline


    Umm... If you'd LOOK at the screenshot it says all my system specs. Ubuntu 10.04 is used. I have tried downloading the plugin multiple time but it gives me the same errors again and again. I have been using this Persistence.jar without trouble for a while. I tried using a few different versions of Persistence.jar from before as well as the latest and they all give the same error because elmakers.com is unreachable. I have tried to ping elmakers.com and it always give 101 error (not available).

    That's weird, I deleted my lib/ directory and it worked without errors this time. Could it be possible that the sql or mysql lib files were the cause of my errors? I still can;t reach elmakers.com though which is weird too.

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


    Hey, sorry- I have not even had time to work on my own plugins. Honestly, I doubt I'm going to get to this- I apologize. After Persistence 0.75 releases, I may get time, but...

    Now's as good a time to mention as any that I'm fairly positive, at this point, that Bukkit is not going to use Persistence's persistence engine. I think they're going with something off-the-shelf.

    So, really, if you're having trouble getting going with Persistence, you may just want to call it quits at this point :(

    (I, myself, am going to keep using it, at least until I'm sure the internal system does what I want, it's integrated nicely, stable, etc- I'm definitely going to keep supporting Persistence, but I just don't have time to debug code... sorry)

    If you had some other plugin loading mysql drivers from a lib folder, that could certainly break things. Persistence has its own internal mysql libs, the ones recommended by Bukkit in the Maven repo. I can't vouch for anything else.

    If you had a really old version of Persistence that used those libs, I think it's ok to have them in there- unless something else is loading them for some reason.

    Please go post in the CrowdControl thread. There are instructions there on how to set up permissions- using the Permissions plugin and PermisisonsSupport.jar, or not.

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


    Download is down just so you know
    NathanWolf likes this.
  5. Offline


    Links fixed! Should be back to their old URLs now, which was their permanent home- DNS is all better now, server is up, should be good. Let me know if you find anymore broken links- thanks for your patience :)
  6. Offline


    I'm sorry to hear that. Well, at least you have told us, so we can start working on alternatives. Thanks.
  7. Offline


    Persistence.jar download goes to:

    Not Found
    The requested URL /plugins/releases/Persistence.jar was not found on this server.
    Apache/2.2.3 (CentOS) Server at elmakers.dyndns.org Port 80
    Has all day for me.
    NathanWolf likes this.
  8. Offline


    Oooh, sorry! dnydns stopped working a bit ago, and I missed this thread in my update- should be fixed now. Here is the permanent link:

  9. Offline


    Great plugin!
    But I really need to the functionallity to search for entries. (Like SELECT in SQL)
    For Example: I want to get all BlockData with the same Location.
  10. Offline


    as of 8:33pm Australia Central (11:03 zulu) the download link is broken :(

    P.s. No error like above just: "Internet explorer cannot display the webpage."
  11. Offline


    Please update to/test against latest RB for releases.
  12. Offline


    Tested against 677.

    We can kill this thread if you want- there's really nothing useful here, per se- definitely nothing that's not available via github or the wiki, anyway.
  13. Offline


    Hey, I'm developing a plugin that uses Persistence to store some data, and I'm having trouble getting started.

    I'm getting a null pointer exception as I try to load my plugin, with no data yet stored. I wasn't able to load the sample plugin to compare with what I've done - if I'm reading github right, it looks like the project is empty? I'm a github newb (and a Java newb) so it wouldn't surprise me if I was doing something wrong.

    Here's the log from running on my test server:
    02:03:47 [INFO] Preparing spawn area: 97%
    02:03:48 [SEVERE] null loading Herding v0.1 (Is it up to date?)
            at com.elmakers.mine.craftbukkit.persistence.core.PersistedField.getFieldFromMethod(PersistedField.java:376)
            at com.elmakers.mine.craftbukkit.persistence.core.PersistedField.<init>(PersistedField.java:48)
            at com.elmakers.mine.craftbukkit.persistence.core.PersistedField.tryCreate(PersistedField.java:264)
            at com.elmakers.mine.craftbukkit.persistence.core.PersistedClass.bind(PersistedClass.java:110)
            at com.elmakers.mine.craftbukkit.persistence.Persistence.createPersistedClass(Persistence.java:377)
            at com.elmakers.mine.craftbukkit.persistence.Persistence.getPersistedClass(Persistence.java:434)
            at com.elmakers.mine.craftbukkit.persistence.Persistence.getPersistedClass(Persistence.java:362)
            at com.elmakers.mine.craftbukkit.persistence.Persistence.getAll(Persistence.java:101)
            at me.thetinyman.Herding.Herding.readHerdsFromPersistence(Herding.java:149)
            at me.thetinyman.Herding.Herding.onEnable(Herding.java:142)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:578)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:115)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:93)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    02:03:48 [INFO] Persistence version 0.61 is enabled
    Here's Herding.readHerdsFromPersistence. By the way, unloadedHerds IS instantiated - it's initialized with the class, and this is being called in onEnable.

            Persistence.getInstance().getAll(unloadedHerds, HerdDto.class);
    And here's the HerdDto class (sorry about the name, it matches the scheme we use at work :-P)
    package me.thetinyman.Herding.Herds;
    import java.util.ArrayList;
    import org.bukkit.craftbukkit.entity.CraftAnimals;
    import org.bukkit.entity.CreatureType;
    import com.elmakers.mine.bukkit.persistence.annotation.PersistClass;
    import com.elmakers.mine.bukkit.persistence.annotation.PersistField;
    import com.elmakers.mine.bukkit.persistence.dao.LocationData;
    @PersistClass(name = "herdDto", schema = "Herding")
    public class HerdDto
        @PersistField(id=true, auto=true)
        public long _herdId;
        public CreatureType _creatureType;
        public ArrayList<LocationData> _memberLocations;
        public LocationData _alphaLocation;
        public HerdDto(CreatureType creatureType, ArrayList<CraftAnimals> members, CraftAnimals alpha)
            ArrayList<LocationData> memberLocatons = new ArrayList<LocationData> ();
            for(CraftAnimals member : members)
                memberLocatons.add(new LocationData(member.getLocation()));
            initialize(creatureType,memberLocatons,new LocationData(alpha.getLocation()));
        public HerdDto(CreatureType creatureType, ArrayList<LocationData> memberLocations, LocationData alphaLocation)
            initialize(creatureType, memberLocations, alphaLocation);
        private void initialize(CreatureType creatureType,
                ArrayList<LocationData> memberLocations, LocationData alphaLocation)
            _memberLocations = memberLocations;
            _creatureType = creatureType;
            _alphaLocation = alphaLocation;
        public CreatureType getCreatureType()
            return _creatureType;
        public ArrayList<LocationData> getMemberLocations()
            return _memberLocations;
        public LocationData getAlphaLocation()
            return _alphaLocation;
        public  String toString()
            return "unloaded " + getCreatureType().toString() + " herd with " + _memberLocations.size() + " members and an alpha at " + _alphaLocation.getLocation().toString();
    Do you see anything obvious that I'm doing wrong?

    Thanks for your help! :-D
  14. Offline


    I have to say, your code looks right to me! This error message with "getFieldFromMethod" in it indicates that Persistence is doing something wrong, judging by your source code. That should only get called if you're marking up getters/setters, not fields.

    Now, here's where I have to ask you how far along you are :)

    Reportedly, Bukkit now has their own persistence engine- so if you're just getting started, it might make more sense to use that, rather than the Persistence plugin.

    However, if you still want to continue here I can take a look- if I don't get back to you in a timely manner, I'd suggest trying to implement getters/setters for your fields- something like Eclipse can do this for you in one click. Marking up the getters/setters *should* work, that's how I normally do it.

    Marking up fields is supposed to work as well, but since I never do it myself (I never have public fields myself, for any reason, but that's a personal preference thing)- anyway, since I don't do it, it doesn't get tested- so it may be broken.

    Also, if you're continuing with Persistence, it may interest you to know that the code, as of 0.75, is now "community sourced"- if you're interested in participating, I've set up a github organizatoin to take over my code, including Persistence.
  15. Offline


    @NathanWolf : As you wish, I'll leave it here then.
  16. Offline


    Ahh, I didn't realize that the persistence framework in CraftBukkit was done. I'll try to figure out how that works, then - I was searching for the word "Persistence" in the Javadocs, but didn't have any luck. I'll spend some more time hunting for that.

    I agree about the public fields, by the way - I would have started there, but I assumed that using the fields directly would be a bit easier at this early stage of development.

    Thanks for the quick reply!
  17. Offline


  18. Offline


    Please .. where a need to put SQLite.jar ? I have one in my mc_server/lib folder .. this still pops-up :(

    [SEVERE] Persistence: No data store providers found!
    2011-06-01 02:08:23 [SEVERE] Persistence: Please install a data store provider, such as SQLitePlugin.jar
    2011-06-01 02:08:23 [INFO] Persistence version 0.76 failed to initialize
    2011-06-01 02:08:23 [SEVERE] java.lang.NullPointerException
    2011-06-01 02:08:23 [SEVERE]     at com.elmakers.mine.bukkit.utilities.PluginUtilities.<init>(PluginUtilities.java:67)
    I just want to install NetherGate on my #RB 803. Thank you for any help.
  19. Offline


    You need the SQLite.jar that comes with Persistence and NetherGate- that's a Bukkit plugin, not (just) the drivers- it goes in /plugins, along with everything else.

    Fair warning: NetherGate is no longer supported, really!

Share This Page