openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi P Palacherla (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1407) ClassCastException at DataCacheStoreManager.loadAll
Date Tue, 15 Dec 2009 22:09:18 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ravi P Palacherla updated OPENJPA-1407:
---------------------------------------

    Attachment:     (was: OPENJPA-1407-trunk.patch)

> ClassCastException at DataCacheStoreManager.loadAll
> ---------------------------------------------------
>
>                 Key: OPENJPA-1407
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1407
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 2.0.0-M3
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>         Attachments: OPENJPA-1407-1.1.x.patch
>
>
> the following exception stack trace is seen in kodo :
>     [java] Caused by: java.lang.ClassCastException: com.sample.TestTableId
>      [java]  at org.apache.openjpa.datacache.DataCacheStoreManager.loadAll(DataCacheStoreManager.java:461)
>      [java]  at org.apache.openjpa.kernel.DelegatingStoreManager.loadAll(DelegatingStoreManager.java:121)
>      [java]  at org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:984)
>      [java]  at org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:1027)
>      [java]  at org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:913)
>      [java]  at org.apache.openjpa.kernel.AbstractPCData.toRelationFields(AbstractPCData.java:217)
>      [java]  at org.apache.openjpa.kernel.AbstractPCData.toNestedFields(AbstractPCData.java:184)
>      [java]  at org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:78)
>      [java]  at org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
>      [java]  at org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
>      [java]  at org.apache.openjpa.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:343)
>      [java]  at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
>      [java]  at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
>      [java]  at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
>      [java]  at kodo.kernel.KodoBroker.initialize(KodoBroker.java:65)
> Reason behind the above exception is because when application identity class is used;
> In openJPA, ObjectId is generated by enhancer generated method pcnewObjectIdInstance
and it returns wrapped identity class
>  like as follows.
>      public Object pcNewObjectIdInstance()
>      {
>           return new ObjectId(ApplicationIdentityIdClass.class, new AppId());
>      }
>  So, the change was not affected to OpenJPA code.
>  However, in OpenJPA derived products like Kodo, pcNewObjectIdInstance returns raw application
identity class instance.
>  Due to this  "oidList.add((OpenJPAId) sm.getObjectId())" throws classcast exception.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message