java.lang.VerifyError - (overrides final method getSchema.()Lorg/jooq/Schema) thrown how?

265 views
Skip to first unread message

hem...@gmail.com

unread,
Sep 22, 2017, 9:18:44 AM9/22/17
to jOOQ User Group
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

unread,
Sep 22, 2017, 9:20:12 AM9/22/17
to jooq...@googlegroups.com
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

--
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 jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hem...@gmail.com

unread,
Sep 22, 2017, 9:58:09 AM9/22/17
to jOOQ User Group
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.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.

hem...@gmail.com

unread,
Sep 22, 2017, 10:03:06 AM9/22/17
to jOOQ User Group
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.

Lukas Eder

unread,
Sep 22, 2017, 10:08:18 AM9/22/17
to jooq...@googlegroups.com
Thanks for your nice words.

Interesting, well there's this issue here which talks about VerifyErrors in jOOQ generated code:

Specifically this comment here might be an interesting hint:

Does that help?

To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.

Lukas Eder

unread,
Sep 22, 2017, 10:09:16 AM9/22/17
to jooq...@googlegroups.com
Given the implementation of the DefaultGenerator, I don't think that'll do it :)

@Deprecated
public class DefaultGenerator extends JavaGenerator {
}


To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.

hem...@gmail.com

unread,
Sep 22, 2017, 10:39:01 AM9/22/17
to jOOQ User Group
: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.

hem...@gmail.com

unread,
Sep 22, 2017, 10:40:43 AM9/22/17
to jOOQ User Group
Tomcat 7.

hem...@gmail.com

unread,
Sep 22, 2017, 10:53:21 AM9/22/17
to jOOQ User Group
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.

Lukas Eder

unread,
Sep 22, 2017, 11:00:58 AM9/22/17
to jooq...@googlegroups.com
Alright, then. Good luck fixing it! :)

To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.

hem...@gmail.com

unread,
Sep 27, 2017, 10:55:12 AM9/27/17
to jOOQ User Group
It was due to a old local jooq version that wasn't committed (rightfully) but was left on the build path of the parent project.

Lukas Eder

unread,
Sep 27, 2017, 11:36:43 AM9/27/17
to jooq...@googlegroups.com
Thanks for the update. That's what I thought originally (but unfortunately, didn't put in these words).

Reply all
Reply to author
Forward
0 new messages