Hi,
On Sunday, October 5, 2003, at 11:09 AM, Ryosuke Mori wrote:
> http://www.objectstyle.org/cayenne/lists/cayenne-user/2003/01/0002.html
>
> I basically cannot insert PKs to a database from cayenne modeler, as
> written
> in the tutorial. The error message is the same as the previous post,
> "Can
> not load JDBC driver named
> 'org.gjt.mm.mysql.Driver':org.gjt.mm.mysql.Driver
> ".
This is likely a CLASSPATH problem. Make sure your driver is explicitly
mentioned in CLASSPATH when starting the modeler. E.g. when you run
this from command line on Windows:
echo %CLASSPATH%
the driver JAR should be mentioned in the line printed. Alternatively
you can edit cayenne.bat (or cayenne.sh) startup script to include
mysql driver jar file. E.g. a line
set DEFAULT_CLASSPATH=%CAYENNE_HOME%\lib\modeler\cayenne-modeler.jar
may be modified to something like
set
DEFAULT_CLASSPATH=%CAYENNE_HOME%\lib\modeler\cayenne-
modeler.jar;C:\mysql-connector.....jar
> Caused by: java.sql.SQLException: General error: Access denied for
> user:
> 'ryosuk..' to database 'cayenne'
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:832)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1265)
> at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1110)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:1929)
This error is likely what is says - MySQL permissions are not setup
correctly for user ryosuke. This is not Cayenne-related. Please consult
MySQL docs on how to create the right permissions. I personally use
phpMyAdmin web tool for local MySQL administration (including
permissions). Once setup it is very easy to use and doesn't require
deep knowledge of MySQL for most admin tasks:
http://sourceforge.net/projects/phpmyadmin/
Hope this helps.
Andrus
This archive was generated by hypermail 2.0.0 : Sun Oct 05 2003 - 11:46:54 EDT