FAQ
Hi All,

I have been having issues with using Cayenne 3.0M3 DataObjectUtils
method objectForPK(ObjectContext, Class, Object)

Caused by: java.lang.NoSuchMethodError:
org.apache.cayenne.DataObjectUtils.objectForPK(Lorg/apache/cayenne/ObjectContext;Ljava/lang/Class;Ljava/lang/Object;)Lorg/apache/cayenne/DataObject;
10:59:06,990 INFO [STDOUT] at
net.sf.click.extras.cayenne.CayenneForm.getDataObject(CayenneForm.java:336)

The cod which is causing this error is below:

Class<DataObject> dataClass = getDataObjectClass();

DataObject dataObject = (DataObject)
DataObjectUtils.objectForPK(getDataContext(), dataClass, id);

Runtime environment is Java 1.5, running on JBoss 4.0.3

Can anyone suggest a resolution here.

regards Malcolm Edgar

Search Discussions

  • Malcolm Edgar at Mar 26, 2008 at 12:24 am
    Hi All,

    The resolution to this issue for me was:

    dataObject = (DataObject)
    DataObjectUtils.objectForQuery(getDataContext(), new
    ObjectIdQuery(objectId, false, ObjectIdQuery.CACHE));

    Should I raise a bug on this issue?

    regards Malcolm Edgar

    On Wed, Mar 26, 2008 at 11:04 AM, Malcolm Edgar wrote:
    Hi All,

    I have been having issues with using Cayenne 3.0M3 DataObjectUtils
    method objectForPK(ObjectContext, Class, Object)

    Caused by: java.lang.NoSuchMethodError:
    org.apache.cayenne.DataObjectUtils.objectForPK(Lorg/apache/cayenne/ObjectContext;Ljava/lang/Class;Ljava/lang/Object;)Lorg/apache/cayenne/DataObject;
    10:59:06,990 INFO [STDOUT] at
    net.sf.click.extras.cayenne.CayenneForm.getDataObject(CayenneForm.java:336)

    The cod which is causing this error is below:

    Class<DataObject> dataClass = getDataObjectClass();

    DataObject dataObject = (DataObject)
    DataObjectUtils.objectForPK(getDataContext(), dataClass, id);

    Runtime environment is Java 1.5, running on JBoss 4.0.3

    Can anyone suggest a resolution here.

    regards Malcolm Edgar
  • Andrus Adamchik at Mar 26, 2008 at 9:25 am
    Doesn't look like a bug. Just an indicator that something needs to be
    recompiled.

    Andrus
    On Mar 26, 2008, at 2:04 AM, Malcolm Edgar wrote:

    Hi All,

    I have been having issues with using Cayenne 3.0M3 DataObjectUtils
    method objectForPK(ObjectContext, Class, Object)

    Caused by: java.lang.NoSuchMethodError:
    org.apache.cayenne.DataObjectUtils.objectForPK(Lorg/apache/cayenne/
    ObjectContext;Ljava/lang/Class;Ljava/lang/Object;)Lorg/apache/
    cayenne/DataObject;
    10:59:06,990 INFO [STDOUT] at
    net
    .sf.click.extras.cayenne.CayenneForm.getDataObject(CayenneForm.java:
    336)

    The cod which is causing this error is below:

    Class<DataObject> dataClass = getDataObjectClass();

    DataObject dataObject = (DataObject)
    DataObjectUtils.objectForPK(getDataContext(), dataClass, id);

    Runtime environment is Java 1.5, running on JBoss 4.0.3

    Can anyone suggest a resolution here.

    regards Malcolm Edgar
  • Malcolm Edgar at Mar 26, 2008 at 10:04 am
    Yes, it maybe but all the build scripts were building against JDK 1.5,
    including Click. Confusing is that a college was executing a similar
    code path on JDK 1.6 and did not have any issues. I will investigate
    further.

    regards Malcolm Edgar
    On Wed, Mar 26, 2008 at 8:24 PM, Andrus Adamchik wrote:
    Doesn't look like a bug. Just an indicator that something needs to be
    recompiled.

    Andrus


    On Mar 26, 2008, at 2:04 AM, Malcolm Edgar wrote:

    Hi All,

    I have been having issues with using Cayenne 3.0M3 DataObjectUtils
    method objectForPK(ObjectContext, Class, Object)

    Caused by: java.lang.NoSuchMethodError:
    org.apache.cayenne.DataObjectUtils.objectForPK(Lorg/apache/cayenne/
    ObjectContext;Ljava/lang/Class;Ljava/lang/Object;)Lorg/apache/
    cayenne/DataObject;
    10:59:06,990 INFO [STDOUT] at
    net
    .sf.click.extras.cayenne.CayenneForm.getDataObject(CayenneForm.java:
    336)

    The cod which is causing this error is below:

    Class<DataObject> dataClass = getDataObjectClass();

    DataObject dataObject = (DataObject)
    DataObjectUtils.objectForPK(getDataContext(), dataClass, id);

    Runtime environment is Java 1.5, running on JBoss 4.0.3

    Can anyone suggest a resolution here.

    regards Malcolm Edgar

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedMar 26, '08 at 12:05a
activeMar 26, '08 at 10:04a
posts4
users2
websitecayenne.apache.org

2 users in discussion

Malcolm Edgar: 3 posts Andrus Adamchik: 1 post

People

Translate

site design / logo © 2021 Grokbase