Problem with H2 and bukkit

Discussion in 'Plugin Development' started by clone11, Aug 20, 2012.

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

    clone11

    Bukkit version: git-Bukkit-1.3.1-R2.0-b2340jnks
    I'm trying to use H2 with my plugin but can not seem to get it to work, i've tried both examples on H2 site using

    Code:
    Class.forName("org.h2.Driver");
    Connection conn = DriverManager.
        getConnection("jdbc:h2:~/test");
    conn.close();
     
    and
     
    import org.h2.jdbcx.JdbcConnectionPool;
     
    JdbcConnectionPool cp = JdbcConnectionPool.
        create("jdbc:h2:~/test", "sa", "sa");
    Connection conn = cp.getConnection();
    conn.close(); cp.dispose();
    The first one throws java.sql.SQLException: No suitable driver found for jdbc:h2:~/test and the second one throws some error about no class defention found for jdbcx.jdbcconnection pool. I am assuming it can not find H2.jar, but i have put it in bukkits root dir and also /lib. Also when testing it without bukkit it works fine.
     
Thread Status:
Not open for further replies.

Share This Page