Installing JDBC MySQL driver

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default Installing JDBC MySQL driver

    I reformated my hard drive and reinstalled Coldfusion and MySQL. It seems I
    have no JDBC drivers. How do I install one? I saw an article that showed me how
    by entering Sytem variables ect. but i don't remeber having to do all that
    before. Isn't there a self installing file I can download? I dowloaded the Java
    3.1.8a driver as a zip file but i don't know how to install it.

    Bloke Guest

  2. Similar Questions and Discussions

    1. Failure MySQL JDBC driver 3.1 or 3.2
      I want to use MySQL 5 with ColdFusion MX 7 standard. I tried the JDBC Connector 3.1 and 3.2. Adding a new DSN works fine in administratrion, but if...
    2. Mysql Driver . What's the best between macromediaDrivers or JDBC Drivers ?
      Hi everybody, I would like to know your point of view about The Drivers for Mysql in Coldfusion MX 6.1. At this moment I've macromedia MX6.1...
    3. Installing DB2 JDBC Driver on CFMX 6.1 Standard
      I want to connect to a DB2 database that resides on an AS400. I've seen several articles on how to build a connection string but nothing on where...
    4. com.mysql.jdbc.Driver
      I need to create a 'standalone' connection to a MySQL database. Using this code works: <cfset clazz = CreateObject('java', 'java.lang.Class') />...
    5. DB2 JDBC Driver
      What should I use for the DB2 JDBC driver form JDBC SPs? I'm using "DriverManager.getConnection("jdbc:default:connection");" at the moment. Is...
  3. #2

    Default Re: Installing JDBC MySQL driver

    On 2005-05-28 16:03:37 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > I reformated my hard drive and reinstalled Coldfusion and MySQL. It
    > seems I have no JDBC drivers. How do I install one? I saw an article
    > that showed me how by entering Sytem variables ect. but i don't remeber
    > having to do all that before. Isn't there a self installing file I can
    > download? I dowloaded the Java 3.1.8a driver as a zip file but i don't
    > know how to install it.
    This should get you going:
    [url]http://www.macromedia.com/go/6ef0253[/url]

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  4. #3

    Default Re: Installing JDBC MySQL driver

    Thanks for the info. I tried it and it didn't work. I got the following error:
    "Connection verification failed for data source: my test
    []java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
    The root cause was that: java.lang.NoClassDefFoundError:
    org/aspectj/lang/Signature"

    When it asks for the URL I typed jdbc:mysql://localhost:8500/test for test
    is the name of the database. Is the port correct?
    Also i didn't get the option at all for a MySQL driver in CFMX. The solution
    you posted said that the driver is not working ect.

    I copied the mysql-connector-java file tot he directory. Is this the only file
    i need? There was alot of others in the zip.


    Bloke Guest

  5. #4

    Default Re: Installing JDBC MySQL driver

    You must have been typing your latest bit just as I was entering mine ... maybe we'll both get a fix..

    uphillsurfer_uk Guest

  6. #5

    Default Re: Installing JDBC MySQL driver

    On 2005-05-28 22:27:10 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > Thanks for the info. I tried it and it didn't work. I got the following error:
    > "Connection verification failed for data source: my test
    > []java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
    > The root cause was that: java.lang.NoClassDefFoundError:
    > org/aspectj/lang/Signature"
    >
    > When it asks for the URL I typed jdbc:mysql://localhost:8500/test
    > for test is the name of the database. Is the port correct?
    > Also i didn't get the option at all for a MySQL driver in CFMX. The
    > solution you posted said that the driver is not working ect.
    > I copied the mysql-connector-java file tot he directory. Is this the
    > only file i need? There was alot of others in the zip.
    Couple of possible sources of your problem. First, by default MySQL
    runs on port 3306. You need to use the MySQL port in your JDBC URL,
    not the CF port.

    Not sure what's up with the org/aspectj/... stuff. What are you
    entering for your driver class? You should be using
    com.mysql.jdbc.Driver for your class. Also, not sure if this is
    causing an actual problem, but not such a great idea to have a space in
    your datasource name. That org/aspectj stuff doesn't have anything to
    do with the problem at hand.

    If you copied the correct jar file to the directory that should be all
    you need. Double check that information as well and make sure you're
    either copying it to CF's lib directory or that you specified the path
    AND the jar file name in your classpath settings in the CF
    administrator.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  7. #6

    Default Re: Installing JDBC MySQL driver

    com.mysql.jdbc.Driver,
    Is this the correct JAR file class path?
    Bloke Guest

  8. #7

    Default Re: Installing JDBC MySQL driver

    On 2005-05-28 23:44:27 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > com.mysql.jdbc.Driver,
    > Is this the correct JAR file class path?
    That's the correct driver name, yes. This kind of reiterates what's in
    the instructions on Macromedia.com, but the steps for this are as
    follows:

    1. Download the drivers from mysql.com
    2. Extract the drivers until you can see a jar file which for the
    latest version of the drivers I believe is named
    mysql-connector-java-3.1.8-bin.jar
    3. Place that jar file in CF's WEB-INF/lib directory
    4. I don't think you *have* to restart CF for that jar file to get
    picked up, but it doesn't hurt
    5. Configure your MySQL datasource

    If you've done 1-4 properly then perhaps step 5 is the issue. Can you
    post exactly how you're setting up your datasource, including what
    you're entering for all the form fields on the database configuration
    screen?

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  9. #8

    Default Re: Installing JDBC MySQL driver

    Here are all my settings I am using:

    CF Data Source Name: mytest
    JDBC URL: jdbc:mysql://localhost:3306/test
    Driver Class: com.mysql.jdbc.Driver
    Driver name: other
    User name: root
    Password: xxxxxxx
    ----------------------------------
    Under server settings section
    Java and JVM

    Java Virtual Machine Path: c:\CFusionMX\runtime\jre
    Class path:
    c:\CfusionMX\wwwroot\WEB-INF\lib\mysql-conneector-java-3.1.8-bin-g,

    Bloke Guest

  10. #9

    Default Re: Installing JDBC MySQL driver

    On 2005-05-29 10:16:26 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > Here are all my settings I am using:
    >
    > CF Data Source Name: mytest
    > JDBC URL: jdbc:mysql://localhost:3306/test
    > Driver Class: com.mysql.jdbc.Driver
    > Driver name: other
    > User name: root
    > Password: xxxxxxx
    > ----------------------------------
    > Under server settings section Java and JVM
    >
    > Java Virtual Machine Path: c:\CFusionMX\runtime\jre
    > Class path:
    > c:\CfusionMX\wwwroot\WEB-INF\lib\mysql-conneector-java-3.1.8-bin-g,
    If you put the mysql jar file in your WEB-INF/lib directory you don't
    need to add it to your classpath. Also, you have a typo in there (two
    es in conneector), and you don't have the .jar extension in there. If
    I guess the first thing I'd try is removing this unnecessary
    information from your classpath and restart CF. Then see if it works
    and if not, let me know what errors you get.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  11. #10

    Default Re: Installing JDBC MySQL driver

    This is the error I got. The typo above was just me typing it in the message.
    I entered
    C:\CfusionMX\wwwroot\WEB-INF\lib\mysql-conneector-java-3.1.8-bin-g.jar,
    Is that correct?


    Connection verification failed for data source: myTest
    []java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
    The root cause was that: java.lang.NoClassDefFoundError:
    org/aspectj/lang/Signature


    Originally posted by: Newsgroup User
    On 2005-05-29 10:16:26 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > Here are all my settings I am using:
    >
    > CF Data Source Name: mytest
    > JDBC URL: jdbc:mysql://localhost:3306/test
    > Driver Class: com.mysql.jdbc.Driver
    > Driver name: other
    > User name: root
    > Password: xxxxxxx
    > ----------------------------------
    > Under server settings section Java and JVM
    >
    > Java Virtual Machine Path: c:\CFusionMX\runtime\jre
    > Class path:
    > c:\CfusionMX\wwwroot\WEB-INF\lib\mysql-conneector-java-3.1.8-bin-g,
    If you put the mysql jar file in your WEB-INF/lib directory you don't
    need to add it to your classpath. Also, you have a typo in there (two
    es in conneector), and you don't have the .jar extension in there. If
    I guess the first thing I'd try is removing this unnecessary
    information from your classpath and restart CF. Then see if it works
    and if not, let me know what errors you get.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion





    Bloke Guest

  12. #11

    Default Re: Installing JDBC MySQL driver

    On 2005-05-29 14:29:15 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > This is the error I got. The typo above was just me typing it in the
    > message. I entered
    > C:\CfusionMX\wwwroot\WEB-INF\lib\mysql-conneector-java-3.1.8-bin-g.jar,
    > Is that correct?
    As I said before, if you have this in your lib directory, you do *not*
    need to add this to your classpath. (Still two es in there as well,
    but apparently that's not the issue.) When you say "I entered C:\..."
    do you mean in your classpath? Delete all that from your classpath.
    If it's in your WEB-INF/lib directory you don't need it. Also, try
    using the OTHER jar file that came with the files you downloaded--there
    should be one without a "g" on the end (ending in just bin.jar). The
    jar file I typically use is mysql-connector-java-3.1.8-bin.jar
    > Connection verification failed for data source: myTest
    > []java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
    > The root cause was that: java.lang.NoClassDefFoundError:
    > org/aspectj/lang/Signature
    Sorry, I still don't see what this org/aspectj stuff has to do with the
    immediate problem. AspectJ is an aspect-oriented add-on for Java and
    has nothing whatsoever to do with MySQL. Not sure why this is even
    involved, but I suspect there's more going on with your setup than
    you're sharing.

    Let's go back to step 1. First, get rid of any other "stuff" that you
    personally have added to your WEB-INF/lib directory. Don't get rid of
    the stuff that was in there as part of the CF installation obviously,
    but anything that you personally added (like this aspectj stuff
    perhaps), nuke it. Then make sure you're using the jar file I named
    above. If that one isn't in the package you downloaded, redownload the
    drivers and make sure it's in there. Put that jar file in your
    WEB-INF/lib directory.

    Next, delete anything that you personally have added to CF's classpath.
    If this stuff isn't right it can cause all sorts of problems. After
    updating the classpath (and again, do NOT put the mysql jar file name
    in there--you don't need to do this), restart CF.

    Next, double-check your datasource information:
    CF Data Source Name: your_datasource_name_here
    JDBC URL: jdbc:mysql://127.0.0.1:3306/database_name_here
    Driver Class: com.mysql.jdbc.Driver
    Driver Name: whatever_you_want_here (I use MySQL Connector/J)
    User Name: your_db_user_name
    Password: your_db_password

    That should be all there is to it. That aspectj stuff has me thinking
    something's amiss with your general java classpath setup.

    Matt

    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  13. #12

    Default Re: Installing JDBC MySQL driver

    Now I get this error. I think we are getting close!

    Connection verification failed for data source: test
    []java.lang.NoClassDefFoundError: java/sql/Savepoint
    The root cause was that: java.lang.NoClassDefFoundError: java/sql/Savepoint




    Bloke Guest

  14. #13

    Default Re: Installing JDBC MySQL driver

    I found a couple links about this savepoint error. I downloaded J2SE v 1.4.2_08
    JRE. Maybe my setting in the CF control panel for JVM is incorrect? JVM
    path:C:/CFusionMX/runtime/jre
    and the JVM arguments path is blank.

    [url]http://java.sun.com/j2se/1.4.2/download.html[/url]

    Bloke Guest

  15. #14

    Default Re: Installing JDBC MySQL driver

    On 2005-05-30 08:14:12 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > I found a couple links about this savepoint error. I downloaded J2SE v
    > 1.4.2_08 JRE. Maybe my setting in the CF control panel for JVM is
    > incorrect? JVM path:C:/CFusionMX/runtime/jre
    > and the JVM arguments path is blank.
    >
    > [url]http://java.sun.com/j2se/1.4.2/download.html[/url]
    I'm afraid I'm at a bit of a loss since I've never seen these errors
    before. I don't have a standalone installation of CF handy to check
    this stuff out (all my installs are J2EE) but if you haven't manually
    altered any of your Java settings (JVM path, classpath, etc.) and CF
    works at all these settings should be OK. At this point I might
    actually suggest uninstalling and reinstalling ColdFusion so you're
    starting with a clean slate. Normally you shouldn't really mess with
    which JVM ColdFusion is using, and as I said if you haven't altered the
    Java settings yourself they should be correct.

    I don't think you answered my other questions about if you were
    entering things in your classpath, if you tried clearing out anything
    you added to the classpath, if you had other jar files you had added,
    etc. Try all that stuff as well but a quick reinstall might be the
    best course of action at this point since clearly something odd is
    going on.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  16. #15

    Default Re: Installing JDBC MySQL driver

    Ok I reinstalled Coldfusion. Now this is the error I get:

    Connection verification failed for data source: mytest
    []java.sql.SQLException: No suitable driver available for mytest, please check
    the driver setting in jrun-resources.xml, error: com.mysql.jdbc.driver
    The root cause was that: java.sql.SQLException: No suitable driver available
    for mytest, please check the driver setting in jrun-resources.xml, error:
    com.mysql.jdbc.driver

    So this is better. There is no mention of aspectj or Savepoint.

    Bloke Guest

  17. #16

    Default Re: Installing JDBC MySQL driver

    On 2005-05-30 13:30:42 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > Ok I reinstalled Coldfusion. Now this is the error I get:
    >
    > Connection verification failed for data source: mytest
    > []java.sql.SQLException: No suitable driver available for mytest,
    > please check the driver setting in jrun-resources.xml, error:
    > com.mysql.jdbc.driver
    > The root cause was that: java.sql.SQLException: No suitable driver
    > available for mytest, please check the driver setting in
    > jrun-resources.xml, error: com.mysql.jdbc.driver
    >
    > So this is better. There is no mention of aspectj or Savepoint.
    Definitely better! "No suitable driver" means if can't find your
    driver, likely because you aren't using a capital D in Driver. Try
    this (case sensitive!):
    com.mysql.jdbc.Driver
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  18. #17

    Default Re: Installing JDBC MySQL driver

    This is my JRUN-web-app.xml file. Should I change anything here?

    <virtual-mapping>
    <resource-path>/WEB-INF</resource-path>
    <system-path>C:/CFusionMX/wwwroot/WEB-INF</system-path>
    </virtual-mapping>

    <virtual-mapping>
    <resource-path>/*</resource-path>
    <system-path>C:/CFusionMX/wwwroot/</system-path>
    </virtual-mapping>
    </jrun-web-app>

    Bloke Guest

  19. #18

    Default Re: Installing JDBC MySQL driver

    On 2005-05-30 14:08:49 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > This is my JRUN-web-app.xml file. Should I change anything here?
    >
    > <virtual-mapping>
    > <resource-path>/WEB-INF</resource-path>
    > <system-path>C:/CFusionMX/wwwroot/WEB-INF</system-path>
    > </virtual-mapping>
    > <virtual-mapping>
    > <resource-path>/*</resource-path>
    > <system-path>C:/CFusionMX/wwwroot/</system-path>
    > </virtual-mapping>
    > </jrun-web-app>
    No.
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  20. #19

    Default Re: Installing JDBC MySQL driver

    On 2005-05-30 14:08:49 -0500, "Bloke" <webforumsuser@macromedia.com> said:
    > This is my JRUN-web-app.xml file. Should I change anything here?
    >
    > <virtual-mapping>
    > <resource-path>/WEB-INF</resource-path>
    > <system-path>C:/CFusionMX/wwwroot/WEB-INF</system-path>
    > </virtual-mapping>
    > <virtual-mapping>
    > <resource-path>/*</resource-path>
    > <system-path>C:/CFusionMX/wwwroot/</system-path>
    > </virtual-mapping>
    > </jrun-web-app>
    Sorry, hit send before I finished my thought. No, you don't need to
    change anything here. What gave you that idea? If you have the driver
    jar file in the WEB-INF/lib directory and change your capitalization as
    I outlined in my previous post it should be fine. Honestly I think
    you're making this way more difficult than it needs to be. If you
    follow the instructions on macromedia.com as well as those outlined
    here and don't mess around with anything else it will work.

    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* Guest

  21. #20

    Default Re: Installing JDBC MySQL driver

    If I use an uppercase "D" then I get this error:

    Connection verification failed for data source: mytest
    []java.lang.NoClassDefFoundError: java/sql/Savepoint
    The root cause was that: java.lang.NoClassDefFoundError: java/sql/Savepoint

    If I use lowwer case "d" I get the other error

    Bloke Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139