Hollow Object issue

From: Malcolm Edgar (malcolm.edga..mail.com)
Date: Thu Apr 17 2008 - 01:55:11 EDT

  • Next message: Malcolm Edgar: "Re: Hollow Object issue"

    Hi Guys,

    I have a nasty problem with attempting to perform a refetchObject() on a
    hollow object. This is the DataObject toString(), note the primary key
    column 'schema_config_oid' has a value of '..eaf8c>'

    The primary key column of this database is an BIGINT, this table only has
    one record and its PK value is '1'

    {<ObjectId:SchemaConfig, schema_config_oid=[..eaf8c>; hollow; []}

    When I try to refetchObject(), I get a stacktrace of:

    Caused by: java.sql.SQLException: Cannot convert class [B to SQL type
    requested due to java.lang.ClassCastException - [B
            at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:2744)
            at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:2532)
            at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:420)
            at org.apache.cayenne.access.types.AbstractType.setJdbcObject(AbstractType.java:79)
            at org.apache.cayenne.access.types.ByteArrayType.setJdbcObject(ByteArrayType.java:191)
            at org.apache.cayenne.dba.JdbcAdapter.bindParameter(JdbcAdapter.java:481)
            at org.apache.cayenne.access.trans.QueryAssembler.initStatement(QueryAssembler.java:123)
            at org.apache.cayenne.access.trans.QueryAssembler.createStatement(QueryAssembler.java:99)
            at org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)
            at org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:58)
            at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:230)
            ... 60 more

    I presume there is an issue with the PK value bing a hash string value.

    Any advice here am I doing something wrong?

    regards Malcolm Edgar



    This archive was generated by hypermail 2.0.0 : Thu Apr 17 2008 - 01:55:48 EDT