大神们帮我看看我的是什么问题,,同样也是oracle数据库的 Build TableMeta ... Exception in thread "main" java.lang.RuntimeException: primaryKey required by active record pattern at com.jfinal.plugin.activerecord.generator.MetaBuilder.buildPrimaryKey(MetaBuilder.java:199) at com.jfinal.plugin.activerecord.generator.MetaBuilder.build(MetaBuilder.java:96) at com.jfinal.plugin.activerecord.generator.Generator.generate(Generator.java:217) at com.sztr.model._JFinalDemoGenerator.main(_JFinalDemoGenerator.java:56)
Exception in thread "main" java.lang.RuntimeException: java.sql.SQLException: 流已被关闭 at com.jfinal.plugin.activerecord.generator.DataDictionaryGenerator.rebuildColumnMetas(DataDictionaryGenerator.java:205) at com.jfinal.plugin.activerecord.generator.DataDictionaryGenerator.generate(DataDictionaryGenerator.java:61) at com.jfinal.plugin.activerecord.generator.Generator.generate(Generator.java:234) at com.sztr.model._JFinalDemoGenerator.main(_JFinalDemoGenerator.java:56) Caused by: java.sql.SQLException: 流已被关闭 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208) at oracle.jdbc.driver.LongAccessor.getBytes(LongAccessor.java:151) at oracle.jdbc.driver.LongAccessor.getString(LongAccessor.java:193) at oracle.jdbc.driver.T4CLongAccessor.getString(T4CLongAccessor.java:422) at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:397) at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515) at com.jfinal.plugin.activerecord.generator.DataDictionaryGenerator.rebuildColumnMetas(DataDictionaryGenerator.java:179) ... 3 more
return "select * from " + tableName + " where rownum < 1";
改成如下:
return "select * from \"" + tableName + "\" where rownum < 1";
最后通过 generator.setDialect(new MyOracleDialect()) 进行方言的切换