1 Reply Latest reply: Jun 27, 2012 8:55 AM by JamesSutherland RSS

    JPA on the Grid

    praveen435
      Hi,

      I am new to the coherence.So i am trying to execute a example which is from "http://www.oracle.com/technetwork/middleware/toplink/examples-325517-en-ca.html".I am executing example "TLG JPA Example-Grid Read".But i am getting error

      Exception in thread "main" [EL Warning]: Exception [EclipseLink-38] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException
      Exception Description: Identity map constructor failed because an invalid identity map was specified.
      Internal Exception: java.lang.reflect.InvocationTargetException
      Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): oracle.eclipselink.coherence.exceptions.IntegrationException
      Exception Description: Unable to connect to Coherence Cache by name: PhoneNumber.
      Internal Exception: java.lang.IllegalArgumentException: No scheme for cache: "PhoneNumber"
      Descriptor: RelationalDescriptor(gridread.model.PhoneNumber --> [DatabaseTable(TLG_GR_PHONE)])
      javax.persistence.RollbackException: Exception [EclipseLink-38] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException
      Exception Description: Identity map constructor failed because an invalid identity map was specified.
      Internal Exception: java.lang.reflect.InvocationTargetException
      Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): oracle.eclipselink.coherence.exceptions.IntegrationException
      Exception Description: Unable to connect to Coherence Cache by name: PhoneNumber.
      Internal Exception: java.lang.IllegalArgumentException: No scheme for cache: "PhoneNumber"
      Descriptor: RelationalDescriptor(gridread.model.PhoneNumber --> [DatabaseTable(TLG_GR_PHONE)])
           at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
           at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
           at gridread.example.InsertExample.main(InsertExample.java:29)
      Caused by: Exception [EclipseLink-38] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException
      Exception Description: Identity map constructor failed because an invalid identity map was specified.
      Internal Exception: java.lang.reflect.InvocationTargetException
      Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): oracle.eclipselink.coherence.exceptions.IntegrationException
      Exception Description: Unable to connect to Coherence Cache by name: PhoneNumber.
      Internal Exception: java.lang.IllegalArgumentException: No scheme for cache: "PhoneNumber"
      Descriptor: RelationalDescriptor(gridread.model.PhoneNumber --> [DatabaseTable(TLG_GR_PHONE)])
           at org.eclipse.persistence.exceptions.DescriptorException.invalidIdentityMap(DescriptorException.java:838)
           at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:392)
           at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:346)
           at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.getIdentityMap(IdentityMapManager.java:950)
           at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.acquireLockNoWait(IdentityMapManager.java:175)
           at org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockNoWait(IdentityMapAccessor.java:101)
           at org.eclipse.persistence.internal.helper.WriteLockManager.attemptToAcquireLock(WriteLockManager.java:421)
           at org.eclipse.persistence.internal.helper.WriteLockManager.acquireRequiredLocks(WriteLockManager.java:272)
           at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.acquireWriteLocks(UnitOfWorkImpl.java:1623)
           at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1588)
           at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:275)
           at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1143)
           at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
           ... 2 more
      Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.invokeConstructor(PrivilegedAccessHelper.java:382)
           at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:387)
           ... 13 more
      Caused by: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): oracle.eclipselink.coherence.exceptions.IntegrationException
      Exception Description: Unable to connect to Coherence Cache by name: PhoneNumber.
      Internal Exception: java.lang.IllegalArgumentException: No scheme for cache: "PhoneNumber"
           at oracle.eclipselink.coherence.exceptions.IntegrationException.unableToFindCoherenceCache(IntegrationException.java:76)
           at oracle.eclipselink.coherence.integrated.cache.CoherenceInterceptor.<init>(CoherenceInterceptor.java:84)
           ... 19 more
      Caused by: java.lang.IllegalArgumentException: No scheme for cache: "PhoneNumber"
           at com.tangosol.net.DefaultConfigurableCacheFactory.findSchemeMapping(DefaultConfigurableCacheFactory.java:542)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:290)
           at oracle.eclipselink.coherence.integrated.internal.cache.Coherence35Adaptor.getNamedCache(Coherence35Adaptor.java:34)
           at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.getNamedCache(CoherenceCacheHelper.java:240)
           at oracle.eclipselink.coherence.integrated.cache.CoherenceInterceptor.<init>(CoherenceInterceptor.java:79)
           ... 19 more

      so any suggestions would be great

      Regards,
      Praveen