[LIB] SQLibrary - Database wrappers for all database engines

Discussion in 'Resources' started by PatPeter, Aug 26, 2011.

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

    krisdestruction

    Getting errors trying to use it

    Code:
    00:47:29 [SEVERE] Error occurred while enabling TerrisLogins v0.0.19 (Is it up to date?)
    java.lang.NoSuchMethodError: lib.PatPeter.SQLibrary.MySQL.<init>(Ljava/util/logging/Logger;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
            at info.terrismc.terrislogins.DataStore.<init>(DataStore.java:38)
            at info.terrismc.terrislogins.TerrisLogins.onEnable(TerrisLogins.java:14)
            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:381)
            at net.diamondmine.reloader.PluginReloader.loadPlugin(PluginReloader.java:216)
            at net.diamondmine.reloader.PluginReloader.reloadPlugin(PluginReloader.java:252)
            at net.diamondmine.reloader.PluginReloader.onCommand(PluginReloader.java:89)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
            at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514)
            at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchServerCommand(CraftServer.java:506)
            at net.minecraft.server.v1_4_R1.DedicatedServer.al(DedicatedServer.java:260)
            at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:225)
            at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
            at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
            at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
     
  2. Offline

    krisdestruction

    After initializing, I still get similar errors. I've tried for a week and PatPeter seems unresponsive. Does anyone else know what the issue is?

    Code:
    java.lang.NoSuchMethodError: lib.PatPeter.SQLibrary.Database.open()Z
    at info.terrismc.terrislogins.TerrisLogins.onEnable(TerrisLogins.java:25)
    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:381)
    at net.diamondmine.reloader.PluginReloader.loadPlugin(PluginReloader.java:216)
    at net.diamondmine.reloader.PluginReloader.reloadPlugin(PluginReloader.java:252)
    at net.diamondmine.reloader.PluginReloader.onCommand(PluginReloader.java:89)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
    at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514)
    at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchServerCommand(CraftServer.java:506)
    at net.minecraft.server.v1_4_R1.DedicatedServer.al(DedicatedServer.java:260)
    at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:225)
    at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
    at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
    at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
     
  3. Offline

    PatPeter

    It's been 5 days, not a week. Bukkit only gave me an Alert for your second post though, and not your first. How odd.

    Change your constructor to MySQL(Logger, String, String, int, String, String, String).

    I assume your second error is dependent on the first.
     
  4. Offline

    krisdestruction

    YES, the man is back. It's actually been almost 2. I believe I posted somewhere else. Regardless, I will double check MySQL for the first one, but I believe that was what I had when I created the MySQL object and put it into the Database superclass.

    This is how I created the MySQL object. hostname, database, username, password have been replaced with dummy values for security reasons.
    Code:
    db = new MySQL( getLogger(), "asdf", "hostname", 3306, "database", "username", "password" );
    This is how I created the SQLite instance. This gave me the second error.
    Code:
    db = new SQLite( getLogger(), "Apartments", "Apartments_table", "plugins/Apartments");
    db.open();
    Just a bump in case it doesn't show up again :)

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

    krisdestruction

  6. Offline

    PatPeter

    Like you I am busy during most weekdays, I apologize.

    Anyway, SQLite constructor is SQLite(Logger logger, String prefix, String directory, String filename, String extension) so it should be:

    SQLite(getLogger(), "[Apartments] ", "Minecraft/plugins/Apartments", "Apartments", ".sqlite")

    Make sure you're using the 4.2 jar, and post the error again next time you get it because it doesn't give enough information to diagnose it.

    SQLibrary
    Released: Version 4.1
    Release Date: Feb 11, 2013
    Download: http://dev.bukkit.org/server-mods/sqlibrary/files/4-sqlibrary-4-1/

    SQLibrary
    Released: Version 4.2
    Release Date: Feb 26, 2013
    Download: http://dev.bukkit.org/server-mods/sqlibrary/files/5-sqlibrary-4-2/

    Users of SQLibrary, I speak to you from beyond the Ethereal realm.

    Or from my computer, one of the two. It was recently discovered that the built-in SQLibrary is compatible with neither other built-in installations of SQLibrary or the SQLibrary.jar. Therefore, I request that you all transition your plugins over to using the SQLibrary.jar. In addition, please post a thread about your plugin here:

    http://dev.bukkit.org/server-mods/sqlibrary/forum/implementing-plugins/

    This forum is meant to showcase all the plugins that use SQLibrary. You can also post help requests here:

    http://dev.bukkit.org/server-mods/sqlibrary/forum/help/

    Lastly, many of you asked me for a tutorial for quite some time, so I've added a basic tutorial to the library's BukkitDev page:

    http://dev.bukkit.org/server-mods/sqlibrary/

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

    krisdestruction

    I will take a look at that after I get back today :)
     
  8. Offline

    krisdestruction

    Still getting errors :( please refer to my help thread
     
  9. Offline

    ZephireNZ

    I'm getting errors, I've posted in a forum thread on the BukkitDev page (posting here too in case you miss it)
     
  10. Offline

    macdja38

    Thank you very much for this, i have been trying various things for about half an hour.
     
Thread Status:
Not open for further replies.

Share This Page