H2 で DBFlute

Pompei のデータベースをいじったので、ついでに、DBFlute 0.6.1 にして試してみた。まぁ、今まで、Derby をデフォルトにしていたのだけど、Derby って、Jetspeed2 とかぶって面倒なので、これを機に H2 に変更することにしてみた。っで、早速試してみたのだけど、./jdbc.sh を実行したら、

[torque-jdbc-transform] org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement
SET CREATE_BUILD[*] 65; expected AUTOCOMMIT, MVCC, IGNORECASE, PASSWORD, SALT, MODE, COMPRESS_LOB,
DATABASE, COLLATION, CLUSTER, DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE,
HSQLDB.DEFAULT_TABLE_TYPE, CACHE_TYPE, FILE_LOCK, STORAGE, DB_CLOSE_ON_EXIT, ACCESS_MODE_LOG, ASSERT,
ACCESS_MODE_DATA, DATABASE_EVENT_LISTENER_OBJECT, RECOVER, SCHEMA, DATESTYLE, SEARCH_PATH,
SCHEMA_SEARCH_PATH, LOGSIZE; SQL statement:
[torque-jdbc-transform] SET CREATE_BUILD 65 [42001-63]
[torque-jdbc-transform]         at org.h2.message.Message.getSQLException(Message.java:89)
[torque-jdbc-transform]         at org.h2.message.Message.getSQLException(Message.java:93)
[torque-jdbc-transform]         at org.h2.message.Message.getSyntaxError(Message.java:103)
[torque-jdbc-transform]         at org.h2.command.Parser.getSyntaxError(Parser.java:453)
[torque-jdbc-transform]         at org.h2.command.Parser.parseSet(Parser.java:3816)
[torque-jdbc-transform]         at org.h2.command.Parser.parsePrepared(Parser.java:370)
[torque-jdbc-transform]         at org.h2.command.Parser.parse(Parser.java:264)
[torque-jdbc-transform]         at org.h2.command.Parser.parse(Parser.java:240)
[torque-jdbc-transform]         at org.h2.command.Parser.prepare(Parser.java:190)
[torque-jdbc-transform]         at org.h2.engine.Session.prepare(Session.java:165)
[torque-jdbc-transform]         at org.h2.engine.Session.prepare(Session.java:159)
[torque-jdbc-transform]         at org.h2.engine.MetaRecord.execute(MetaRecord.java:64)
[torque-jdbc-transform]         at org.h2.engine.Database.open(Database.java:524)
[torque-jdbc-transform]         at org.h2.engine.Database.<init>(Database.java:191)
[torque-jdbc-transform]         at org.h2.engine.Engine.openSession(Engine.java:50)
[torque-jdbc-transform]         at org.h2.engine.Engine.getSession(Engine.java:98)
[torque-jdbc-transform]         at org.h2.engine.Session.createSession(Session.java:140)
[torque-jdbc-transform]         at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:917)
[torque-jdbc-transform]         at org.h2.Driver.connect(Driver.java:52)
[torque-jdbc-transform]         at java.sql.DriverManager.getConnection(DriverManager.java:525)
[torque-jdbc-transform]         at java.sql.DriverManager.getConnection(DriverManager.java:171)
[torque-jdbc-transform]         at org.apache.torque.task.TorqueJDBCTransformTask.generateXML(TorqueJDBCTransformTask.java:205)
[torque-jdbc-transform]         at org.apache.torque.task.TorqueJDBCTransformTask.doExecute(TorqueJDBCTransformTask.java:170)
[torque-jdbc-transform]         at org.seasar.dbflute.task.bs.DfAbstractTask.execute(DfAbstractTask.java:69)

っていう感じで、怒られる。まぁ、jar 問題かなっと思い、lib/forExecute/h2-2007-12-02.jar を h2-1.0.65.jar と差し替えたら、jdbc.sh はパスしたのでよしとした。次に、./generate.sh を実行したら、

[torque-data-model] Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable
to find resource 'om/java/exentity/ExtendedEntity.vm'
[torque-data-model]     at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:501)
[torque-data-model]     at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
[torque-data-model]     at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
[torque-data-model]     at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:355)
[torque-data-model]     at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:533)
[torque-data-model]     at org.apache.velocity.texen.Generator.getTemplate(Generator.java:324)
[torque-data-model]     at org.apache.velocity.texen.Generator.parse(Generator.java:390)
[torque-data-model]     at org.apache.velocity.texen.Generator.parse(Generator.java:361)
[torque-data-model]     at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
[torque-data-model]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[torque-data-model]     at java.lang.reflect.Method.invoke(Method.java:585)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:260)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:207)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:250)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
[torque-data-model]     at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
[torque-data-model]     at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
[torque-data-model]     at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
[torque-data-model]     at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
[torque-data-model]     at org.apache.velocity.Template.merge(Template.java:296)
[torque-data-model]     at org.apache.velocity.texen.Generator.parse(Generator.java:451)
[torque-data-model]     at org.seasar.dbflute.task.bs.DfAbstractTexenTask.doExecuteAlmostSameAsSuper(DfAbstractTexenTask.java:252)

と怒られる。はて、なぜ、リソースがないといわれるのだろう。一応、そのファイル自体は存在しているな。そもそも、根本的なところで間違いがある可能性もあるので、確認のため、DBFlute 0.5.6 で試したら、普通に実行できて、生成されたソースコードもコンパイルできた。ちょっと時間切れなので、また今度見ることにしよ。

カテゴリー: PAL パーマリンク

コメントを残す

メールアドレスが公開されることはありません。

Time limit is exhausted. Please reload the CAPTCHA.