How to use JOOQ in a Project

100 views
Skip to first unread message

Prashant Kumar

unread,
Feb 20, 2014, 11:29:40 PM2/20/14
to jooq...@googlegroups.com
I am new buzz on JOOQ.
I want to access mysql database using jooq
I do have a con fig.xml, jooq-2.5.2.jar jooq-meta-2.5.2.jar, jooq-codegen-2.5.2.jar, mysql-connector-java-5.1.18-bin.jar

but I don't know how to run my project in Ubuntu
when I wrote command
java -cp jooq-2.5.2.jar:jooq-meta-2.5.2.jar:jooq-codegen-2.5.2.jar:mysql-connector-java-5.1.18-bin.jar: org.jooq.util.GenerationTool /.library.xml

it always give me a error message

   Exception in thread "main" java.lang.NoClassDefFoundError: org/jooq/util/jaxb/Configuration
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
    at java.lang.Class.getMethod0(Class.java:2774)
    at java.lang.Class.getMethod(Class.java:1663)
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.jooq.util.jaxb.Configuration
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 6 more

 

 please help me how to use jooq steps by step


JOOQ progress.zip
library.xml
table.sql

Lukas Eder

unread,
Feb 21, 2014, 1:04:23 AM2/21/14
to jooq...@googlegroups.com
Hi,

Please upgrade to the latest version of jOOQ. We no longer support jOOQ 2.5

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+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Message has been deleted

Prashant Kumar

unread,
Feb 21, 2014, 8:45:15 AM2/21/14
to jooq...@googlegroups.com
Hi Lukas Eder,

 thanks for your reply
  I tried this code  with latest version of jooq i.e jooq-3.3.0.zip with necessary modification 
  but  it does work for me.

Lukas Eder

unread,
Feb 22, 2014, 4:13:07 AM2/22/14
to jooq...@googlegroups.com
Hmm, obviously, something is wrong with how your classpath is set up. You said you were executing:

java -cp jooq-2.5.2.jar:jooq-meta-2.5.2.jar:jooq-codegen-2.5.2.jar:mysql-connector-java-5.1.18-bin.jar: org.jooq.util.GenerationTool /.library.xml

How about you replace the above by this:

java -cp jooq-2.5.2.jar:jooq-meta-2.5.2.jar:jooq-codegen-2.5.2.jar:mysql-connector-java-5.1.18-bin.jar:. org.jooq.util.GenerationTool /library.xml

Also, are you sure that jooq-meta-x.x.x.jar is in your local directory?

--

Prashant Kumar

unread,
Feb 25, 2014, 11:16:47 PM2/25/14
to jooq...@googlegroups.com
thanks Lukas Eder
 
the code provided by you worked for me
 
One more thing which i want you to ask is i want to upgrade to jooq-3.3.0
when ever i download jooq-3.3.0 it will provide me jooq-3.3.0.zip my question is where i can find jooq-meta-X.X.X.jar jooq--X.X.X.jar jooq-codegen-X.X.X.jar 
because i am unable to find these jar 

Lukas Eder

unread,
Feb 26, 2014, 4:31:09 AM2/26/14
to jooq...@googlegroups.com
Try unzipping that zip ;-) 
Reply all
Reply to author
Forward
0 new messages