In the use of the latest jooq version, generate code error
Expected behavior and actual behavior:

Configuration configuration = new Configuration()
.withJdbc(new Jdbc().withDriver("oracle.jdbc.driver.OracleDriver")
.withUser("HNMCC").withPassword("HNMCC").withUrl("jdbc:oracle:thin:localhost:3306:orcl"))
.withGenerator(new Generator()
.withDatabase(new Database()
.withIncludes("other_resource")
.withInputSchema("public"))
.withTarget(new Target()
.withPackageName("org.jooq.util.maven.example")
.withDirectory("target/generated-sources/jooq")));

    try {
        GenerationTool.generate(configuration);
    } catch (Exception e) {
        e.printStackTrace();
    }

Steps to reproduce the problem:

org.jooq.exception.DataAccessException: SQL [select 1 "one"]; ORA-00923: 
未找到要求的 FROM 关键字

at org.jooq_3.10.5.DEFAULT.debug(Unknown Source) ~[?:?]
at org.jooq.impl.Tools.translate(Tools.java:2239) ~[jooq-3.10.5.jar:?]
at 
org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:704)
 ~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:361) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractResultQuery.fetch(AbstractResultQuery.java:317) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.SelectImpl.fetch(SelectImpl.java:2597) ~[jooq-3.10.5.jar:?]
at org.jooq.util.AbstractDatabase$1.start(AbstractDatabase.java:264) 
~[jooq-meta-3.10.5.jar:?]
at org.jooq.impl.ExecuteListeners.start(ExecuteListeners.java:122) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.ExecuteListeners.<init>(ExecuteListeners.java:116) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.ExecuteListeners.get(ExecuteListeners.java:82) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:289) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractResultQuery.fetch(AbstractResultQuery.java:317) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractResultQuery.fetch(AbstractResultQuery.java:408) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.SelectImpl.fetch(SelectImpl.java:2650) ~[jooq-3.10.5.jar:?]
at OracleDatabase.getSchemata0(OracleDatabase.java:299) ~[test-classes/:?]
at org.jooq.util.AbstractDatabase.getSchemata(AbstractDatabase.java:441) 
~[jooq-meta-3.10.5.jar:?]
at org.jooq.util.AbstractDatabase.getSchemata(AbstractDatabase.java:468) 
~[jooq-meta-3.10.5.jar:?]
at org.jooq.util.CatalogDefinition.getSchemata(CatalogDefinition.java:63) 
~[jooq-meta-3.10.5.jar:?]
at org.jooq.util.JavaGenerator.generateCatalogIfEmpty(JavaGenerator.java:345) 
~[jooq-codegen-3.10.0.jar:?]
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:324) 
~[jooq-codegen-3.10.0.jar:?]
at org.jooq.util.GenerationTool.run(GenerationTool.java:639) 
~[jooq-codegen-3.10.0.jar:?]
at org.jooq.util.GenerationTool.generate(GenerationTool.java:200) 
~[jooq-codegen-3.10.0.jar:?]
at TestHnmccServer.test2(TestHnmccServer.java:43) ~[test-classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_144]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
 ~[junit-4.12.jar:4.12]
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 ~[junit-4.12.jar:4.12]
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
 ~[junit-4.12.jar:4.12]
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 ~[junit-4.12.jar:4.12]
at 
org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:73)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at 
org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:83)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at 
org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at 
org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at 
org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) 
~[junit-4.12.jar:4.12]
at 
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at 
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) 
~[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) 
~[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) 
~[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) 
~[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) 
~[junit-4.12.jar:4.12]
at 
org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at 
org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) 
~[junit-4.12.jar:4.12]
at 
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
 ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.junit.runner.JUnitCore.run(JUnitCore.java:137) ~[junit-4.12.jar:4.12]
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
 ~[junit-rt.jar:?]
at 
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
 ~[junit-rt.jar:?]
at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
 ~[junit-rt.jar:?]
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) 
~[junit-rt.jar:?]

Caused by: java.sql.SQLSyntaxErrorException: ORA-00923: 未找到要求的 FROM 关键字

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91) 
~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) 
~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206) 
~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455) 
~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413) 
~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034) ~[ojdbc6.jar:Oracle 
JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194) 
~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
 ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
 ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
 ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
 ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
 ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
 ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
at 
org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:209)
 ~[jooq-3.10.5.jar:?]
at org.jooq.impl.Tools.executeStatementAndGetFirstResultSet(Tools.java:3248) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractResultQuery.execute(AbstractResultQuery.java:262) 
~[jooq-3.10.5.jar:?]
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:347) 
~[jooq-3.10.5.jar:?]
... 49 more

Versions:
   
   - jOOQ:3.10.5
   - Java:1.8
   - Database (include vendor):oracle11g
   - OS:windows10
   - JDBC Driver (include name if inofficial 
   driver):oracle.jdbc.driver.OracleDriver

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to