Skip to main content
January 25, 2007
Question

mysql 5 + CF MX 7.0.2 connectivity problems with driver

  • January 25, 2007
  • 6 replies
  • 1508 views
I am getting the following error

Connection verification failed for data source: sai
java.sql.SQLException: No suitable driver available for sai, please check the driver setting in resources file, error: null
The root cause was that: java.sql.SQLException: No suitable driver available for sai, please check the driver setting in resources file, error: null

Please Help
Thanks
This topic has been closed for replies.

6 replies

Participating Frequently
July 10, 2007
Inspiring
July 10, 2007
Yes, you don't want to extract the classes from the jar.

Maybe the original problem was that you placed the whole "mysql-connector-java-3.0.17-ga-bin" folder in WEB-INF\lib :
C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin\mysql-connector-java-3.0.17-ga-bin.JAR

instead of placing only the JAR in WEB-INF\lib :
C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.JAR

I think CF only searches the top WEB-INF\lib folder (not subfolders). So it may have been unable to locate the jar until you added the subfolder to the classpath.



July 10, 2007
I tried again. I placed the ojdbc14.jar in the WEB-INF\lib directory and restarted CF services. Since it didn't work, I placed the .jar file under every lib directory under JRun4 folder, restarted services, didn't work, so rebooted server. Still that didn't help.

When I look in the Server Settings from CF admin, I can see the .jar file mentioned under CF Server Java Class Path location. It says that the .jar file is located under the WEB-INF/cfusion/lib directory.

I created the datasource again, just in case. Nothing.

Is there something that I'm missing? Let me know. I really appreciated your help in this matter.

Thanks again,
Ana
Inspiring
June 15, 2007
And somewhere in the world right now there's an actual Chinese musician reading this thinking "Bah! I had CF set up in 5 minutes. Idiots... all of them! They're probably tone deaf too!"

>Did I mention Vista?
...and here I thought "vista" implied something pleasant. Kudos for sticking with it though!
Inspiring
June 13, 2007
>> But, that still won't work unless you have added this file to your Class Path

That's odd. The CF classpath should automatically include the directory:
cf_root/wwwroot/WEB-INF/lib

So by physically placing the jar in cf_root/wwwroot/WEB-INF/lib its already in the classpath. You shouldn't need to add manually add:

C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar


Glad its working though.
Known Participant
June 15, 2007
Did I mention Vista?

I am not sure if Vista is the root-cause of my problem(s). I did have issues all the way along with getting my CF up and running. I am a complete newb. If you can image the Chinese music lesson (apologies to Chinese musicians; reference is analogous to undertaking a difficult learning agenda that taught in an unfamiliar language. No offense intended), that's where I'm at with learning this process. Nonetheless, with some patience and some great and invaluable assistance from within this forum, I was ultimately successful.

r
Participating Frequently
January 27, 2007
To interact with MySQL DB you need to create datasource. To create the datasources please follow the steps mentioned below.

Download "mysql-connector-java-3.0.17-ga-bin.jar" and paste it inside
C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar
Hope your CF installation drive is "C".

Now go to CF administartor > Server Settings > Java and JVM.
In ColdFusion Class Path paste the jar file path "C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar" and hit "Submit Changes". Then restart CF.

Now create the MySql data source, give your data source name and select driver as "Other" and provide the following parameters.

JDBC URL: jdbc:mysql://localhost:3306/yourDBName
Driver Class: com.mysql.jdbc.Driver
Driver Name: MySQL Connector J
User Name: YourMySQL User Name
Password: Your Password

For more information, please go through this TechNote.
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19170


Thanks

Sankalan
(www.mindfiresolutions.com)
Known Participant
June 13, 2007
THIS IS THE SOLUTION! If you are searching to find how to make your MySQL 5x work with CF and have been getting errors, getting frustrated, this is it.

Sankalan and JohnEric (from different but related post), thank you so much for this answer. I have searched everywhere for this solution. It seems that this is a very common problem, but virtually all posts, including the Adobe tech-notes, only contain half the solution.

Yes, you must download the driver from mysql.com. Yes you must place that entire folder in CF~/WEB-INF/lib. That's the first half. But, that still won't work unless you have added this file to your Class Path, as described in Sankalan's post, below. (Of course, you want to past the correct name of the file that you downloaded, and not necessarily the same name that Sankalan shows below).

I just can't believe that I am actually seeing an OK in my Status!!!
Inspiring
January 25, 2007
Try this:

http://www.adobe.com/go/6ef0253

http://www.adobe.com/go/tn_19170

--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com


"sanandresano" <webforumsuser@macromedia.com> wrote in message news:ep8v6t$gd7$1@forums.macromedia.com...
>I am getting the following error
>
> Connection verification failed for data source: sai
> java.sql.SQLException: No suitable driver available for sai, please check the
> driver setting in resources file, error: null
> The root cause was that: java.sql.SQLException: No suitable driver available
> for sai, please check the driver setting in resources file, error: null
>
> Please Help
> Thanks
>