I use it with H2 every day. Works great.

You are quite possibly pointing to an empty database as suggested...

Here is my jooq.xml file I use to generate the classes. Note that because the h2 database path is relative, I need to have the working directory set correctly.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.0.4.xsd";>
  <!-- Configure the database connection here -->
  <jdbc>
    <driver>org.h2.Driver</driver>
    <url>jdbc:h2:glhbuildflowtemp/glhbuildflow</url>
    <user>sa</user>
    <password>sa</password>
  </jdbc>

  <generator>
<!-- The default code generator. You can override this one, to generate your own code style
         Defaults to org.jooq.util.DefaultGenerator -->
    <name>org.jooq.util.DefaultGenerator</name>

    <database>
      <!-- The database type. The format here is:
           org.util.[database].[database]Database -->
      <name>org.jooq.util.h2.H2Database</name>

<!-- The database schema (or in the absence of schema support, in your RDBMS this
           can be the owner, user, database name) to be generated -->
      <inputSchema>PUBLIC</inputSchema>

<!-- All elements that are generated from your schema (several Java regular expressions, separated by comma) Watch out for case-sensitivity. Depending on your database, this might be important! -->
      <includes>.*</includes>

<!-- All elements that are excluded from your schema (several Java regular expressions, separated by comma).
              Excludes match before includes -->
      <excludes></excludes>
    </database>

    <generate>
<!-- Primary key / foreign key relations should be generated and used.
           This will be a prerequisite for various advanced features
           Defaults to false -->
      <relations>true</relations>

      <pojos>true</pojos>
      <daos>true</daos>

    </generate>

    <target>
<!-- The destination package of your generated classes (within the destination directory) -->
<packageName>au.com.glhbuildflow.data.jooq</packageName>

      <!-- The destination directory of your generated classes -->
<directory>./GLHBuildFlow/src/main/java</directory>
    </target>
  </generator>


</configuration>



On 8/12/2013 3:30 PM, Christoph Läubrich wrote:
I used JOOQ with h2 in the past with succes, you really should post your configurationfile. Take in mind, if you specify a non exiting (e.g. different path) h2 DB it is normally automatically created (but empty).

Am 07.12.2013 22:48, schrieb bruce buchanan:
ok I have my various files and jars and classpaths all in the right places... invocation of the codegenerator seems to be working...

but it doesnt really seem to find my schema--note below how it finds PUBLIC but PUBLIC seems to be empty, since it says tables fetched = 0?

the JOOQ website doesnt really claim they support H2, but if you say it does, that's good enough for me

meanwhile... thoughts?

thanks



Dec 7, 2013 1:38:07 PM org.jooq.tools.JooqLogger info
INFO: Initialising properties  : /ceo_codegen_cfg.xml
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: License parameters
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   Thank you for using jOOQ and jOOQ's code generator
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Database parameters
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   dialect                : H2
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   target dir             : .
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   target package         : db.jooq
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   includes               : [.*]
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   excludes               : []
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   includeExcludeColumns  : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: DefaultGenerator parameters
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: strategy : class org.jooq.util.DefaultGeneratorStrategy
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   deprecated             : true
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   generated annotation   : true
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   JPA annotations        : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   validation annotations : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   instance fields        : true
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   records                : true
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   pojos                  : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   immutable pojos        : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   interfaces             : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   daos                   : false
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   relations              : true
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:   global references      : true
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO:
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Generation remarks
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Emptying : /Users/bruce/jooq_generator_lab/./db/jooq
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Generating schemata      : Total: 1
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Generating schema        : Public.java
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ----------------------------------------------------------
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Sequences fetched        : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Tables fetched           : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: UDTs fetched             : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: ARRAYs fetched           : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Enums fetched            : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Routines fetched         : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: Packages fetched         : 0 (0 included, 0 excluded)
Dec 7, 2013 1:38:08 PM org.jooq.tools.JooqLogger info
INFO: GENERATION FINISHED!     : Total: 188.952ms
--
You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to