So i'm trying out sqlite...

Discussion in 'Plugin Development' started by PrivateAlpha, Mar 6, 2011.

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

    PrivateAlpha

    Code:
    11:58:04 [SEVERE] java.lang.ClassNotFoundException: org.sqlite.JDBC
    11:58:04 [SEVERE]       at java.net.URLClassLoader$1.run(Unknown Source)
    11:58:04 [SEVERE]       at java.security.AccessController.doPrivileged(Native Me
    thod)
    11:58:04 [SEVERE]       at java.net.URLClassLoader.findClass(Unknown Source)
    11:58:04 [SEVERE]       at org.bukkit.plugin.java.PluginClassLoader.findClass(Pl
    uginClassLoader.java:30)
    11:58:04 [SEVERE]       at java.lang.ClassLoader.loadClass(Unknown Source)
    11:58:04 [SEVERE]       at java.lang.ClassLoader.loadClass(Unknown Source)
    11:58:04 [SEVERE]       at java.lang.Class.forName0(Native Method)
    11:58:04 [SEVERE]       at java.lang.Class.forName(Unknown Source)
    11:58:04 [SEVERE]       at com.PrivateAlpha.bukkit.Factory.Furnace.IO.Database.c
    onnect(Database.java:80)
    11:58:04 [SEVERE]       at com.PrivateAlpha.bukkit.Factory.Furnace.WatchHandler.
    load(WatchHandler.java:21)
    11:58:04 [SEVERE]       at com.PrivateAlpha.bukkit.Factory.Furnace.FactoryFurnac
    e.onEnable(FactoryFurnace.java:33)
    11:58:04 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:117)
    11:58:04 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:414)
    11:58:04 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:187)
    11:58:04 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:80)
    11:58:04 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftS
    erver.java:61)
    11:58:04 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:204)
    11:58:04 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:191)
    11:58:04 [SEVERE]       at net.minecraft.server.MinecraftServer.d(MinecraftServe
    r.java:131)
    11:58:04 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:246)
    11:58:04 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:366)
    So I get that phat error when i try to run my server with my plugin on it.

    I tried to put the sqlite.jar everywhere i could think of(except within the plugins folder because that would give an error when cbukkit tries to load it) but to no luck so could someone give me some tipes on howto get it working with cbukkit?
     
  2. Offline

    mindless728

    the real question is what are you doing that makes you think you need SQL
     
  3. Offline

    darknesschaos

    does it matter... anyway. is the path in your manifest?
     
  4. Offline

    mindless728

    yes it does as it seems to be rather pointless to even use any sql (including lite) for very simple tasks as it can take longer to go through a db and parse queries than to just read files directly
     
  5. Offline

    darknesschaos

    I understand, but the way I look at it is we should not be the judge, just help when possible. Why does it matter how someone does what they do? Yes, we could advise against the use of things that are unnecessary but in the end, who does it hurt if they actually learn something? I personally wish I could learn sql, but that seems like a lot of effort, oh well.
     
  6. Offline

    mindless728

    fair enough, but i figure we could help out on the headache if he was just using it for a configuration file

    alos, i do know sql and have interfaced it with java before (my last job i worked), but i don't use it for bukkit as it is overkill for anything we do
     
  7. Offline

    PrivateAlpha

    a database for a config? lol
    Also that is your own opinion a very good example of where it is needed is BigBrother

    it was indeed not there...

    i tried this:
    Class-Path: lib/sqlite.jar

    but it did not work... Any help?
    --- merged: Mar 6, 2011 3:33 PM ---
    Yay got it working! thanks BUT now i'd like to know, what do i need to do to make it use the .jar in <main craftbukkit folder>/lib/sqlite.jar instead of the one in plugins/<ff>/sqlite.jar ?
     
  8. Offline

    Samkio

    Back up one.
    Class-Path: ../lib/sqlite.jar
     
  9. Offline

    mindless728

    @PrivateAlpha yeah BB is probably the only plugin that needs SQL, not even my BlockStorage i am working on needs it, and yes we have seen people using sql for configuration files
     
  10. Offline

    Gandalf

    It is a bit pretentious to ask why someone would want to use SQL. For example my plugin http://forums.bukkit.org/threads/se...-both-group-manager-and-permissions-495.6399/ has the option to use MySQL to log into of a text file so it can be accessed and parsed via a web interface.

    Don't judge especially based on such limited information, rather help them out.

    For the OP, you need to fix the path in your MANIFEST.MF
     
  11. Offline

    PrivateAlpha

    Ah thanks =]

    next Q: anyone know how to make it download it if it aint there?
     
  12. Offline

    Gandalf

    You can open a input stream to it, catch a file not found exception, and download it from the internet.
     
  13. Offline

    PrivateAlpha

    Oh, Was hoping Bukkit had an updater =] ohwell
     
  14. Offline

    Gandalf

    It is pretty simple to implement if you so choose, would take about 5-10 minutes of coding.

    Just use buffered reader to download the file, and reload your plugin afterwards.
     
Thread Status:
Not open for further replies.

Share This Page