Re: OT: MySQL on Mac OS 10.4

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue May 17 2005 - 10:47:24 EDT

  • Next message: Todd O'Bryan: "Old DataContext hanging around"

    Looking at com.mysql.jdbc.Field.getMaxBytesPerCharacter ():

     public int getMaxBytesPerCharacter() throws SQLException {
                return
    this.connection.getMaxBytesPerChar((String)CharsetMapping.JAVA_TO_MYSQL_CHARSET_MAP.get(getCharacterSet()));
        }

    this seems like a MySQL driver bug. I need to run Cayenne unit tests with
    this driver version to confirm it.

    So does it work with older drivers?

    Andrus

    > More on MySQL on OS X... I just tried MySQL(4.1.11-max) on Mac OS
    > (10.4.1) and got the exception shown below. I'm using a freshly
    > downloaded MySQL JDBC driver (mysql-connector-java-3.1.8-bin.jar).
    > Keep in mind that relational databases are my weakness, so I could
    > easily have something simple out of line. My application was able to
    > read data from the DB just fine, but doing a commit caused the error.
    >
    > Any ideas what I could be doing wrong or have out of line?
    >
    > Thanks,
    > Erik
    >
    >
    >
    > [java] java.lang.NullPointerException
    > [java] at com.mysql.jdbc.Field.getMaxBytesPerCharacter
    > (Field.java:259)
    > [java] at
    > com.mysql.jdbc.ResultSetMetaData.getColumnDisplaySize
    > (ResultSetMetaData.java:331)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.ColumnDescriptor.<init>
    > (ColumnDescriptor.java:177)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.RowDescriptor.initFromResultSet
    > (RowDescriptor.java:141)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.RowDescriptor.<init>
    > (RowDescriptor.java:101)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.RowDescriptor.<init>
    > (RowDescriptor.java:91)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.BatchAction.processGeneratedKeys
    > (BatchAction.java:303)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.BatchAction.runAsIndividualQueries
    > (BatchAction.java:253)
    > [java] at
    > org.objectstyle.cayenne.access.jdbc.BatchAction.performAction
    > (BatchAction.java:126)
    > [java] at
    > org.objectstyle.cayenne.access.DataNode.runBatchUpdate(DataNode.java:
    > 398)
    > [java] at
    > org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:
    > 319)
    > [java] at
    > org.objectstyle.cayenne.access.DataContextCommitAction.commit
    > (DataContextCommitAction.java:187)
    > [java] at
    > org.objectstyle.cayenne.access.DataContext.commitChanges
    > (DataContext.java:1043)
    > [java] at
    > org.objectstyle.cayenne.access.DataContext.commitChanges
    > (DataContext.java:1013)



    This archive was generated by hypermail 2.0.0 : Tue May 17 2005 - 10:47:26 EDT