I've started MySQL using the MySQL utitliy, and I've installed the MySQL JDBC adapter (mysql-connector-java-3.0.17-ga.bin.jar) in / Library/Java/Extensions


I have mysql-connector-java-3.1.11-bin.jar in /Library/Java/ Extensions, and I don't get that error. I wouldn't be surprised if there was a more recent adaptor, but that's the one I am using here.


I recommend you stick with 3.0.17 and NOT 3.1.XX. I has problems with 3.1.12 on my "working for 12 months" custom Dictionary attribute (which is set up exactly as per Chuck's book). The 3.1.12 did not read in the serialized data correctly and caused an error in NSPropertyListSerialization. I did not have time or interest to troubleshoot why 3.1.12 JDBC connector returned bad data for that particular column, but 3.0.17 works normally.



and I get the following error from the EOModeler wizard using a URL of jdbc:mysql://localhost/WOnetBrackets:

JDBC connection failed for driver :'org.gjt.mm.mysql.Driver'. Driver not found in Java Runtime! Please verify your CLASSPATH environment variable. The current CLASSPATH for your application is : /Developer/Applications/WebObjects/EOModeler.app/Contents/ Resources/Java/eomodeler.zip:/Users/netbrackets/Library/Java:/ Library/Java:/System/Library/Java:/Network/Library/Java:/System/ Library/Frameworks/JavaVM.framework/Classes/classes.jar:/System/ Library/Frameworks/JavaVM.framework/Classes/ui.jar:/Developer/ Applications/WebObjects/EOModeler.app/Contents/Resources/Java/ eomodeler.zip:/System/Library/Frameworks/JavaVM.framework/Versions/ 1.5.0/Classes/.compatibility/14compatibility.jar


I see /Library/Java there - I believe it should work out the Extensions part automatically.

By the way, your classpath makes me wonder if you are using Java 1.5? Try "java -version" on command line. I believe 1.4.2 is the official supported version you should use for WebObjects.

Also I am guessing your adaptor configuration is in correct:
Set it up as follows:

http://homepage.mac.com/kelleherk/iblog/C711669388/E1395049038/ index.html

.... note you do NOT need the driver or plugin fields..... that was for way back in 2001! As you can see in your error, you are specifying a driver class that does not exist! Don't specify it, WO will find it in the 3.0.17 jar in your /Library/Java/Extensions




So, just what is the Driver, and how do I verify my CLASSPATH to I get it into my Java Runtime? Also, I can't seem to find much documentation on setting up WO for different databases (I even searched the archives, which is where I got the info on the MySQL adaptor and where to install it). Does it exist anywhere such that a DB newbie could use it?


The jar you installed is just a package containing org/gjt/mm/mysql/ Driver.class and a few support classes for it (com.mysql.jdbc). Any Java application, WebObjects regardless, that uses JDBC with MySQL will need this. You aren't setting up WebObjects for use with a database, you are setting up Java for use with the database. All you need to know for WebObjects is to set the optional Driver property in the Adaptor Info panel to com.myself.jdbc.Driver (org.gjt.mm.mysql.Driver should work just as well), and the URL to a running database, with the general form: jdbc:mysql://hostname/dbname.

There used to be a web page that told you how to set up WebObjects for MySQL, but I haven't been able to find it recently - don't worry, all it said was pretty much what I have written above.

Here is my blog on MySQL with WebObjects .... it may be of use:
http://homepage.mac.com/kelleherk/iblog/C711669388/index.html



The most common error with this is mistyping the driver class name somehow. Assuming that this isn't the case, you should check that the jar really does contain the class you have named; use jar tf / Library/Java/Extensions/mysql-connector-java-3.0.17-ga.bin.jar and scan the output. I think you would also want to quit and restart EOModeler at least.


You do not need to specify the driver in the Driver field. The driver is specified in the connection URL
jdbc:mysql://netbrackets.local/databasename?capitalizeTypenames=true



Paul


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists% 40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to