SQLiteJDBC Usage - ClassNotFoundException

Discussion in 'Plugin Development' started by Timberjaw, Jan 18, 2011.

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


    Currently on CraftBukkit build 76.

    I've seen several plugins making use of the sqlitejdbc package, but I cannot for the life of me figure out how to integrate it into my plugin.

    I've added sqlitejdbc-v056.jar to my project in Eclipse, and the plugin builds fine, but when it hits the forName() line, it throws a ClassNotFoundException for org.sqlite.JDBC. I do have sqlitejdbc-v056.jar in the same folder as craftbukkit.jar.

    java.lang.ClassNotFoundException: org.sqlite.JDBC
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at com.bukkit.timberjaw.spawncontrol.SpawnControl.initDB(SpawnControl.java:57)
    I assume I'm just doing something dumb. Any help would be greatly appreciated.
  2. Offline


  3. Offline


    Thanks, that did the trick. I had tried including it via -cp when launching craftbukkit without success, but this makes more sense.
    armed_troop likes this.
  4. Offline


    Man, I was looking all over the place for this. Thanks :)
Thread Status:
Not open for further replies.

Share This Page