문제

I'm trying to use SQLData with a Sqlite database, but get an exception here:

    private SQLDataReaderTest() {
    try {
        Class.forName("org.sqlite.JDBC");
        connection = DriverManager.getConnection("jdbc:sqlite:ressources/data/TestDB.rdb");

        java.util.Map map = connection.getTypeMap();
        map.put("TestDB.customer", Class.forName("SQLDataTest"));
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    } catch (SQLException e) {
        e.printStackTrace();
    }
}

Testing brings up:

java.sql.SQLException: not yet implemented
at org.sqlite.Conn.getTypeMap(Conn.java:297)
at de.devision.model.SQLDataReaderTest.<init>(SQLDataReaderTest.java:20)
at de.devision.model.SQLDataReaderTest.getInstance(SQLDataReaderTest.java:31)

Line 20 is the connection.getTypeMap() part. The connection etc. do work fine, as everything works without the UDT.

Can anybody see what I'm doing wrong?

도움이 되었습니까?

해결책

The exception states that the sqlite driver does not implement this feature (getTypeMap()). You are doing nothing wrong, you are just using a database and or driver which does not (yet) support this.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top