Digest for jooq-user@googlegroups.com - 10 updates in 1 topic

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Digest for jooq-user@googlegroups.com - 10 updates in 1 topic

http://groups.google.com/group/jooq-user/topics mailing list
[hidden email]: Sep 22 05:54AM -0700

This is probably down to something stupid, but I'm stumped on an issue with
a generated "tables.X.class" throwing a VerifyError.
 
The line is thrown from a
dsl.selectFrom(Tables.MY_TABLE)
.where(Tables.MY_TABLE.MY_COLUMN.eq(queueId))
.fetchOne()); call.
My project is built with maven, and I only have 1 jooq version on the
classpath.
 
[INFO] | | \- org.jooq:jooq-codegen:jar:3.9.3:compile
[INFO] | | +- org.jooq:jooq:jar:3.9.3:compile
[INFO] | | \- org.jooq:jooq-meta:jar:3.9.3:compile
 
Indeed, deleting the generated classes and running results in a
NoClassDefFoundException - so I only have 1 version in the workspace.
 
Is there any specific debugging I should undertake to find how this error
is thrown? Or better still resolve the issue?
 
Cheers for any help.
Lukas Eder <[hidden email]>: Sep 22 03:20PM +0200

Hello,
 
This could be because of generated classes not matching your runtime
library version. Did you generate the classes with version 3.9.3 of the
code generator as well?
 
Best Regards,
Lukas
 
[hidden email]: Sep 22 06:58AM -0700

Hi Lukas. love your work, congrats on Java Champion etc and thanks for the
quick reply.
I have indeed generated the classes wirh 3.9.3.
That's why it's very strange. The generated classes are a dependency of a
dependency of my class which throws the error.
 
On Friday, 22 September 2017 14:20:12 UTC+1, Lukas Eder wrote:
[hidden email]: Sep 22 07:03AM -0700

OK, found it, I am using a <name>org.jooq.util.JavaGenerator</name> rather
than, in other projects,
<generator>
<name>org.jooq.util.DefaultGenerator</name>
:)
 
This will be it.
 
Thanks again.
 
On Friday, 22 September 2017 14:58:09 UTC+1, Matt Grigsby wrote:
Lukas Eder <[hidden email]>: Sep 22 04:08PM +0200

Thanks for your nice words.
 
Interesting, well there's this issue here which talks about VerifyErrors in
jOOQ generated code:
https://github.com/jOOQ/jOOQ/issues/5332
 
Specifically this comment here might be an interesting hint:
https://github.com/jOOQ/jOOQ/issues/5332#issuecomment-236180098
 
Does that help?
 
Lukas Eder <[hidden email]>: Sep 22 04:09PM +0200

Given the implementation of the DefaultGenerator, I don't think that'll do
it :)
 
@Deprecated
public class DefaultGenerator extends JavaGenerator {
}
 
 
 
[hidden email]: Sep 22 07:39AM -0700

:D
 
You are correct. My hopes were quickly dashed.
 
Maybe some clues exist in when I attempt the same code a second time - and
get a different error...
 
Running code a second time:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
com.<package>.Tables
 
Same line as posted above, different exception.
 
On Friday, 22 September 2017 15:09:16 UTC+1, Lukas Eder wrote:
[hidden email]: Sep 22 07:40AM -0700

Tomcat 7.
 
On Friday, 22 September 2017 15:39:01 UTC+1, Matt Grigsby wrote:
[hidden email]: Sep 22 07:53AM -0700

I ran the code on a different machine with the same server setup, and there
were no Exceptions thrown.
To anyone reading: Chalk this up to a nonstandard build environment or
something.
 
On Friday, 22 September 2017 15:40:43 UTC+1, Matt Grigsby wrote:
Lukas Eder <[hidden email]>: Sep 22 05:00PM +0200

Alright, then. Good luck fixing it! :)
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].