Results 1 to 5 of 5
- 11-01-2012, 12:57 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 16
- Rep Power
- 0
[Java 7 SE+MySQL+NetBeans 7.2.1+jooq 2.4.2]NoClassDefFound error
Dear Sirs and Madams!
I have included jooq 2.4.2 sql query builder into my project and in this project I have CDatabaseManager singleton class, which is responsible for all data operations. Now, I try to execute query with jooq with code:Once I try to execute this method, I get:Java Code:public static ArrayList<String> getMultimediaExtensions(final String category) throws SQLException { ArrayList<String> results=new ArrayList<>(); Factory create=null; try { if(CDatabaseManager.openConnection(CDatabaseManager.host(), CDatabaseManager.dbName(), CDatabaseManager.username(), CDatabaseManager.password(), CDatabaseManager.port(), CDatabaseManager.sslEnabled())) { create=new Factory(CDatabaseManager.dbConnection(), SQLDialect.MYSQL); Result<Record> r=(Result<Record>)create.select().from("testMultimediaTable").fetch(); } } catch(SQLException | DataAccessException ex) { System.out.println(ex.getMessage()); } finally { if(!CDatabaseManager.closeConnection()) { results=null; } } return results; } // getMultimediaExtensionsNow, is it mandatory to create xml database map for jooq or not? I've included both mysql connectior jar and jooq jar's into my project, why do I get this error? And db connection is established succesfully, since I can see it in MySQL Workbench!Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jooq/exception/DataAccessException
at ha.configurator.gui.CFrameMain.getMultimediaRecord s(CFrameMain.java:360)
at ha.configurator.gui.CFrameMain.keyPressed(CFrameMa in.java:275)
at java.awt.Component.processKeyEvent(Component.java: 6463)
at java.awt.Component.processEvent(Component.java:628 2)
at java.awt.Container.processEvent(Container.java:222 9)
at java.awt.Window.processEvent(Window.java:2022)
at java.awt.Component.dispatchEventImpl(Component.jav a:4861)
at java.awt.Container.dispatchEventImpl(Container.jav a:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719 )
at java.awt.Component.dispatchEvent(Component.java:46 87)
at java.awt.KeyboardFocusManager.redispatchEvent(Keyb oardFocusManager.java:1895)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEv ent(DefaultKeyboardFocusManager.java:762)
at java.awt.DefaultKeyboardFocusManager.preDispatchKe yEvent(DefaultKeyboardFocusManager.java:1027)
at java.awt.DefaultKeyboardFocusManager.typeAheadAsse rtions(DefaultKeyboardFocusManager.java:899)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent (DefaultKeyboardFocusManager.java:727)
at java.awt.Component.dispatchEventImpl(Component.jav a:4731)
at java.awt.Container.dispatchEventImpl(Container.jav a:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719 )
at java.awt.Component.dispatchEvent(Component.java:46 87)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:723)
at java.awt.EventQueue.access$200(EventQueue.java:103 )
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 693)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:97)
Caused by: java.lang.ClassNotFoundException: org.jooq.exception.DataAccessException
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.j ava:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:4 23)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 56)
... 37 more
Sincerely,
Marko
- 11-01-2012, 02:33 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: [Java 7 SE+MySQL+NetBeans 7.2.1+jooq 2.4.2]NoClassDefFound error
You have the jooq.jar on your runtime classpath?
That's where I would be checking.Please do not ask for code as refusal often offends.
- 11-01-2012, 02:43 PM #3
Member
- Join Date
- Apr 2012
- Posts
- 16
- Rep Power
- 0
- 11-01-2012, 03:00 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: [Java 7 SE+MySQL+NetBeans 7.2.1+jooq 2.4.2]NoClassDefFound error
Not sure.
Does Netbeans include all the jars contained in the folder, or is it treating the folder as if it was a directory containing classes?
I would include the jars individually and see if that works.Please do not ask for code as refusal often offends.
- 11-02-2012, 12:31 PM #5
Member
- Join Date
- Apr 2012
- Posts
- 16
- Rep Power
- 0
Similar Threads
-
NoClassDefFound error using PDFBox
By Aminaz in forum New To JavaReplies: 1Last Post: 04-29-2012, 10:38 AM -
Jave Code Error : "main" java.lang.NoClassDefFound
By Shujak in forum New To JavaReplies: 4Last Post: 07-24-2011, 08:52 AM -
java.lang.NoClassDefFound error
By swathi dharmaraj in forum New To JavaReplies: 11Last Post: 04-14-2011, 06:33 PM -
JPA application noclassdeffound error
By ishakteyran in forum New To JavaReplies: 2Last Post: 03-12-2010, 07:31 PM -
JPA application noclassdeffound error
By ishakteyran in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 03-11-2010, 12:34 AM


LinkBack URL
About LinkBacks
Reply With Quote![[Java 7 SE+MySQL+NetBeans 7.2.1+jooq 2.4.2]NoClassDefFound error-projectconfiguration.png](http://www.java-forums.org/attachments/new-java/4190d1351777418t-java-7-se-mysql-netbeans-7-2-1-jooq-2-4-2-noclassdeffound-error-projectconfiguration.png)

Bookmarks