You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by afsaneh <af...@gmail.com> on 2011/05/29 07:01:35 UTC
nonfatal general error +cast exception for dataCache.QueryKey in
glassfish
Hi there,
I'm working with openjpa 1.2 in my application and I'm getting an openjpa
nonfatal general error, which I dont know how it's generated! It seems there
is a problem while casting to a QueryKey. As soon as I enabled the DataCache
and pinned some queries, this exception occured. I Look at stack trace below
:
[#|2011-05-28T08:57:32.186-0500|WARNING|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=198;_ThreadName=pool-6-thread-90;_RequestID=34502eda-ef50-4650-91aa-82c7e2324ee9;|JTS5054:
Unexpected error occurred in after completion
<openjpa-1.2.1-r752877:753278 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: java.lang.Object cannot
be cast to org.apache.openjpa.datacache.QueryKey
at
org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:1870)
at
com.sun.jts.jta.SynchronizationImpl.after_completion(SynchronizationImpl.java:154)
at
com.sun.jts.CosTransactions.RegisteredSyncs.distributeAfter(RegisteredSyncs.java:210)
at
com.sun.jts.CosTransactions.TopCoordinator.afterCompletion(TopCoordinator.java:2585)
at
com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:433)
at
com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
at
com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
at
com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
at
com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy577.record(Unknown Source)
at
com.kishware.core.framework.data.track.TrackerImpl.record(TrackerImpl.java:21)
at
com.kishware.core.framework.controller.PreOperationController.preOperationControl(PreOperationController.java:145)
at
com.kishware.core.framework.controller.PreOperationController$1.call(PreOperationController.java:73)
at
com.kishware.core.framework.controller.PreOperationController$1.call(PreOperationController.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to
org.apache.openjpa.datacache.QueryKey
at
org.apache.openjpa.datacache.AbstractQueryCache.onTypesChanged(AbstractQueryCache.java:85)
at
org.apache.openjpa.datacache.DataCacheStoreManager.updateCaches(DataCacheStoreManager.java:252)
at
org.apache.openjpa.datacache.DataCacheStoreManager.commit(DataCacheStoreManager.java:90)
at
org.apache.openjpa.kernel.DelegatingStoreManager.commit(DelegatingStoreManager.java:94)
at
org.apache.openjpa.kernel.BrokerImpl.endStoreManagerTransaction(BrokerImpl.java:1308)
at
org.apache.openjpa.kernel.BrokerImpl.endTransaction(BrokerImpl.java:2177)
at
org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:1846)
... 25 more
|#]
I want to know how it is generated to solve it or to hide this exception
temporary, because I'm going to migrate to openjpa 2.1. Also I have another
question, and it is, What are nonfatal general errors? How can manage their
related logs?
Any idea would be welcomed,
Afsaneh
--
View this message in context: http://openjpa.208410.n2.nabble.com/nonfatal-general-error-cast-exception-for-dataCache-QueryKey-in-glassfish-tp6415858p6415858.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: nonfatal general error +cast exception for dataCache.QueryKey in glassfish
Posted by Rick Curtis <cu...@gmail.com>.
Afsaneh -
Is the root problem that you tried to pin a native query or the fact that
the target type isn't cached by the DataCache?
On Sat, Jun 4, 2011 at 2:35 AM, afsaneh <af...@gmail.com> wrote:
> Hi Rick,
> After deep debugging, I realized I'd made a mistake when I was pinning
> queries. I had included queries which data cache for their target classes
> wasn't enabled and also one of my queries was a named-native-query.
> So their query keies got became null.
>
> Thanks,
> Afsaneh
>
>
--
*Rick Curtis*
Re: nonfatal general error +cast exception for dataCache.QueryKey
in glassfish
Posted by afsaneh <af...@gmail.com>.
Hi Rick,
After deep debugging, I realized I'd made a mistake when I was pinning
queries. I had included queries which data cache for their target classes
wasn't enabled and also one of my queries was a named-native-query.
So their query keies got became null.
Thanks,
Afsaneh
--
View this message in context: http://openjpa.208410.n2.nabble.com/nonfatal-general-error-cast-exception-for-dataCache-QueryKey-in-glassfish-tp6415858p6438696.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: nonfatal general error +cast exception for dataCache.QueryKey in glassfish
Posted by Rick Curtis <cu...@gmail.com>.
Afsaneh -
As I stated last time[1], can you come up with a reproducible test case? I
wasn't able to recreate the ClassCastException that you are reporting.
[1] http://markmail.org/message/6jni5euimsozz3vo
On Sun, May 29, 2011 at 12:01 AM, afsaneh <af...@gmail.com> wrote:
> Hi there,
> I'm working with openjpa 1.2 in my application and I'm getting an openjpa
> nonfatal general error, which I dont know how it's generated! It seems
> there
> is a problem while casting to a QueryKey. As soon as I enabled the
> DataCache
> and pinned some queries, this exception occured. I Look at stack trace
> below
> :
>
> [#|2011-05-28T08:57:32.186-0500|WARNING|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=198;_ThreadName=pool-6-thread-90;_RequestID=34502eda-ef50-4650-91aa-82c7e2324ee9;|JTS5054:
> Unexpected error occurred in after completion
> <openjpa-1.2.1-r752877:753278 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: java.lang.Object
> cannot
> be cast to org.apache.openjpa.datacache.QueryKey
> at
> org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:1870)
> at
>
> com.sun.jts.jta.SynchronizationImpl.after_completion(SynchronizationImpl.java:154)
> at
>
> com.sun.jts.CosTransactions.RegisteredSyncs.distributeAfter(RegisteredSyncs.java:210)
> at
>
> com.sun.jts.CosTransactions.TopCoordinator.afterCompletion(TopCoordinator.java:2585)
> at
>
> com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:433)
> at
> com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
> at
> com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
> at
>
> com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
> at
>
> com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
> at
>
> com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
> at
> com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
> at
> com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
> at
> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
> at
> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
> at
>
> com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
> at
>
> com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
> at $Proxy577.record(Unknown Source)
> at
>
> com.kishware.core.framework.data.track.TrackerImpl.record(TrackerImpl.java:21)
> at
>
> com.kishware.core.framework.controller.PreOperationController.preOperationControl(PreOperationController.java:145)
> at
>
> com.kishware.core.framework.controller.PreOperationController$1.call(PreOperationController.java:73)
> at
>
> com.kishware.core.framework.controller.PreOperationController$1.call(PreOperationController.java:1)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to
> org.apache.openjpa.datacache.QueryKey
> at
>
> org.apache.openjpa.datacache.AbstractQueryCache.onTypesChanged(AbstractQueryCache.java:85)
> at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.updateCaches(DataCacheStoreManager.java:252)
> at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.commit(DataCacheStoreManager.java:90)
> at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.commit(DelegatingStoreManager.java:94)
> at
>
> org.apache.openjpa.kernel.BrokerImpl.endStoreManagerTransaction(BrokerImpl.java:1308)
> at
> org.apache.openjpa.kernel.BrokerImpl.endTransaction(BrokerImpl.java:2177)
> at
> org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:1846)
> ... 25 more
> |#]
>
> I want to know how it is generated to solve it or to hide this exception
> temporary, because I'm going to migrate to openjpa 2.1. Also I have another
> question, and it is, What are nonfatal general errors? How can manage their
> related logs?
>
> Any idea would be welcomed,
> Afsaneh
>
--
*Rick Curtis*