Newbie question: Can not load JDBC driver

From: Ryosuke Mori (mryosuk..acific.net.au)
Date: Sun Oct 05 2003 - 11:09:13 EDT

  • Next message: Andrus Adamchik: "Re: Newbie question: Can not load JDBC driver"

    Hi,

    My question is very similar to the one posted previously by another
    subscriber of this mailing list.

    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
    ". I have run the main program with inserting PKs and the message I received
    in the console was as follows. Please note that first a few lines seems to
    be ok but the rest is just error message. Can you please advise me how to
    get me started on cayenne

    WARN QueryLogger: --- will run 1 query.
    WARN QueryLogger: SELECT t0.GALLERY_NAME, t0.GALLERY_ID FROM GALLERY t0
    WHERE UPPER(t0.GALLERY_NAME) LIKE UPPER(?) [bind: '%metro%'] - prepared in
    30 ms.
    WARN QueryLogger: === returned 1 row. - took 380 ms.

    Found gallery 'The Metropolitan Museum of Art'.

    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.0 September 20 2003]
    org.objectstyle.cayenne.CayenneException: [v.1.0 September 20 2003] Error
    generating PK: General error: Access denied for user: 'ryosuk..' to
    database 'cayenne'
            at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:73
    8)
            at test.Main.addArtist(Main.java:99)
            at test.Main.runTutorial(Main.java:40)
            at test.Main.main(Main.java:30)
    Caused by: org.objectstyle.cayenne.CayenneException: [v.1.0 September 20
    2003] Error generating PK: General error: Access denied for user:
    'ryosuk..' to database 'cayenne'
            at
    org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsForObjEnti
    ty(PrimaryKeyHelper.java:200)
            at
    org.objectstyle.cayenne.access.ContextCommit.createPrimaryKeys(ContextCommit
    .java:517)
            at
    org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:139)
            at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:73
    4)
            ... 3 more
    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)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:1865)
            at com.mysql.jdbc.Statement.execute(Statement.java:981)
            at
    org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.getPrimaryKey(MySQLPkGene
    rator.java:161)
            at
    org.objectstyle.cayenne.dba.mysql.MySQLPkGenerator.pkFromDatabase(MySQLPkGen
    erator.java:93)
            at
    org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(JdbcPkGene
    rator.java:322)
            at
    org.objectstyle.cayenne.access.util.PrimaryKeyHelper.createPermIdsForObjEnti
    ty(PrimaryKeyHelper.java:195)
            ... 6 more
    Exception in thread "main"

    Thanks in advance,

    Ryosuke Mori



    This archive was generated by hypermail 2.0.0 : Sun Oct 05 2003 - 11:09:06 EDT