On Wednesday, 5 September 2012 12:45:35 UTC+1, Ben Hood wrote:
Unfortunately I've tried a lot of different configurations for log4j to get it to log something sensible, but alas, I'm struggling to get it to work. I think this is a product of using a maven build that uses logback all over the place instead of log4j, coupled with the general maven classloading issues. I'll try to see if I can convince it to output something, in order to track this down.
So I've managed to reproduce the issue and also have convinced logback to append the JOOQ codegen to it's own file, which I have attached. At the top of the log you will see a bunch of Hibernate stuff (which we still use in our DDL generator, since we haven't gotten around to porting this away yet), which is fairly harmless. In the middle of the file you see the root cause, which is due to a bug in HSQL (it seems to be down to some FK definitions I have just added, because commenting these out seems to solve the HSQL problem, but obviously this has nothing to do with JOOQ). Then you see the JOOQ codegen.
When this HSQL bug occurs, JOOQ completes the codegen, but all of the classes inherit from TableImpl. Is there some kind of setting I need to add to get JOOQ to fail early? This is the config I am using:
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<dependencies>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>${hsqldb.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
</dependencies>
<configuration>
<jdbc>
<driver>${jdbcDriverClass}</driver>
<url>${jdbcUrl}</url>
<user>${jdbcUser}</user>
<password>${jdbcPass}</password>
</jdbc>
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>org.jooq.util.hsqldb.HSQLDBDatabase</name>
<includes>.*</includes>
<excludes />
<inputSchema>PUBLIC</inputSchema>
</database>
<generate>
<relations>true</relations>
<deprecated>false</deprecated>
</generate>
<target>
<packageName>net.lshift.diffa.schema</packageName>
<directory>${basedir}/target/generated-sources/jooq</directory>
</target>
</generator>
</configuration>
</plugin>