Iam尝试使用Run脚本从sql创建h2 db,sql文件由Recovery工具使用java -cp h2*.jar org.h2.tools.Recover
创建
尝试使用下面的
从sql创建dbjava -cp h2*.jar org.h2.tools.RunScript -url jdbc:h2:./mdata -user sa -script mdata.h2.sql
Exception in thread "main" org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException"; SQL statement: INSERT INTO O_22 VALUES(120, '102567', 'content', '{"contentFormat":"some","binary":false}', READ_CLOB_DB(15507, 6300)) [50000-186]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:641)
at org.h2.command.dml.Insert.insertRows(Insert.java:156)
at org.h2.command.dml.Insert.update(Insert.java:114)
at org.h2.command.CommandContainer.update(CommandContainer.java:78)
at org.h2.command.Command.executeUpdate(Command.java:254)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:184)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
at org.h2.tools.RunScript.process(RunScript.java:260)
at org.h2.tools.RunScript.process(RunScript.java:190)
at org.h2.tools.RunScript.process(RunScript.java:328)
at org.h2.tools.RunScript.runTool(RunScript.java:141)
at org.h2.tools.RunScript.main(RunScript.java:68)
Caused by: java.lang.NullPointerException
at org.h2.store.LobStorageMap.setTable(LobStorageMap.java:281)
at org.h2.value.ValueLobDb.link(ValueLobDb.java:245)
at org.h2.mvstore.db.MVPrimaryIndex.add(MVPrimaryIndex.java:120)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:637)
... 11 more