Results 1 to 2 of 2
  1. #1
    KernelPanic is offline Member
    Join Date
    Apr 2012
    Posts
    16
    Rep Power
    0

    Lightbulb [Java 7 SE+MySQL+NetBeans 7.2.1]No driver found exception question

    Dear Sirs and Madams!

    Our software project in NetBeans consists of three subprojects:
    - Application A
    - Application B
    - Common Library with utility function, used in both Application A and Application B.

    Now, both Application A and Application B access the mysql database with mysql connector, included in both Application A and Application B as library (and they work without problems in means of connecting to database and fetching/writing data from/into the mysql db). Now, because of centralization of system (there are still 6 apps coming into our software projects) and project management will get messy, so I have decided to move mysql connector to Common Library, so it can be used by all apps. It also simplifies source code archiving with Subversion. But now, if I try to launch Application A or Application B or both, I get following error:
    java.sql.SQLException: No suitable driver found jdbc:mysql:
    Now, it is clear app cannot find driver, how do I tell the Application, that the library resided now inside Common Library?

    Sincerely,
    Marko

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,009
    Rep Power
    20

    Default Re: [Java 7 SE+MySQL+NetBeans 7.2.1]No driver found exception question

    Netbeans projects usually result in an archive at the end.
    That is a jar file, or a war/ear (something to be deployed).

    This is what software like Ivy or Maven is for, dependency management.
    You don't stick all your jars in a single "pseudo app", like your common library, but each application defines its own dependencies.

    Since you're changing how you manage your projects I would seriously consider looking into some form of dependency management.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 5
    Last Post: 03-13-2012, 01:51 PM
  2. MySQL: No suitable driver found.
    By Onra in forum JavaServer Pages (JSP) and JSTL
    Replies: 8
    Last Post: 12-15-2011, 02:41 PM
  3. com.mysql.jdbc.Driver Exception !
    By RealSilhouette in forum New To Java
    Replies: 6
    Last Post: 06-10-2011, 09:30 AM
  4. No suitable driver found exception error
    By Crazy Caveman in forum Networking
    Replies: 1
    Last Post: 09-01-2010, 12:03 AM
  5. How to configure Java mysql driver and CLASSPATH?
    By fish309 in forum New To Java
    Replies: 14
    Last Post: 07-20-2010, 09:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •