This discussion is archived
1 2 Previous Next 21 Replies Latest reply: Oct 16, 2012 1:07 PM by ShaunSmith RSS

JPA with ToplinkGrid-GridRead coherence configuration throws exception

775002 Newbie
Currently Being Moderated
Hi,
I am using the eclipselink 2.4, JPA2 and toplink-grid 11.
I have deployed the coherence3.6, toplink-grid 11 and actice-cache-1.0 as a shared library. I configured the cache config xml with gridread configuration

<cache-mapping>
<cache-name>NetworkTarget</cache-name>
<scheme-name>GridRead</scheme-name>
</cache-mapping>
     <cache-mapping>
<cache-name>ManagementInterface</cache-name>
<scheme-name>GridRead</scheme-name>
<distributed-scheme>
               <scheme-name>GridRead</scheme-name>
               <service-name>EclipseLinkJPAReadOnly</service-name>
<!--Configure a wrapper serializer to support serialization of relationships.-->
               <serializer>
                    <class-name>oracle.eclipselink.coherence.integrated.cache.WrapperSerializer</class-name>
               </serializer>
               <backing-map-scheme>
                    <read-write-backing-map-scheme>
                         <internal-cache-scheme>
                              <local-scheme />
                         </internal-cache-scheme>
                         <!-- Define the cache scheme -->
                         <cachestore-scheme>
                              <class-scheme>
                                   <class-name>oracle.eclipselink.coherence.integrated.EclipseLinkJPACacheLoader
                                   </class-name>
                                   <init-params>
                                        <init-param>
                                             <param-type>java.lang.String</param-type>
                                             <param-value>{cache-name}</param-value>
                                        </init-param>
                                        <init-param>
                                             <param-type>java.lang.String</param-type>
                                             <param-value>ActivationDataSourceXA</param-value>
                                        </init-param>
                                   </init-params>
                              </class-scheme>
                         </cachestore-scheme>
                         <read-only>true</read-only>
                    </read-write-backing-map-scheme>
               </backing-map-scheme>

               <!--backing-map-scheme>
                    <local-scheme>
                         <scheme-ref>unlimited-backing-map</scheme-ref>
                    </local-scheme>
               </backing-map-scheme-->
               <autostart>true</autostart>
          </distributed-scheme>



When I query the data, it throws the below exceptions.


Caused by: java.lang.NoSuchMethodError: org.eclipse.persistence.internal.libraries.asm.ClassWriter.<init>(Z)V
     at oracle.eclipselink.coherence.integrated.internal.cache.WrapperGenerator.generateWrapper(WrapperGenerator.java:104)
     at oracle.eclipselink.coherence.integrated.internal.cache.WrapperGenerator.createWrapperFor(WrapperGenerator.java:96)
     at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.defineWrapperClass(CoherenceCacheHelper.java:573)
     at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.initializeForDescriptor(CoherenceCacheHelper.java:304)
     at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.initializeForDescriptor(CoherenceCacheHelper.java:299)
     at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.getNamedCache(CoherenceCacheHelper.java:241)
     at oracle.eclipselink.coherence.integrated.internal.querying.CoherenceRedirector.getNamedCache(CoherenceRedirector.java:51)
     at oracle.eclipselink.coherence.integrated.querying.ReportQueryFromCoherence.invokeQuery(ReportQueryFromCoherence.java:117)
     at org.eclipse.persistence.queries.DatabaseQuery.redirectQuery(DatabaseQuery.java:1862)
     at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:777)
     at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1108)
     at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)
     at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1196)
     at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2875)
     at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1602)
     at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1584)
     at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1549)
     at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:231)
     at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:411)
     at oracle.communications.activation.beans.NetworkTargetEJBBean.queryByRange(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
     at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
     at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
     at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
     at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
     at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
     at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
     at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
     at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
     at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
     at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
     at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
     at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
     at $Proxy171.queryByRange(Unknown Source)
     at oracle.communications.activation.beans.NetworkTargetEJB_zhfqs_NetworkTargetEJBImpl.__WL_invoke(Unknown Source)
     at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
     ... 398 more
  • 1. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    JamesSutherland Pro
    Currently Being Moderated
    It seems your TopLink Grid version is not compatible with the EclipseLink version you are using. See if you can update your TopLink Grid version, or revert your EclipseLink version to 2.3.
  • 2. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    ShaunSmith Explorer
    Currently Being Moderated
    You must use the eclipselink.jar that ships with toplink-grid.jar as part of the TopLink product. The next release of TopLink will ship the latest production release of EclipseLink available.

    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                       
  • 3. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Thank you for you suggestion.

    When I upgraded the toplink-grid12c and using the eclipselink4.4, then that exception is shown up but getting the other exception.
    I have seen the toplink 12.1.1.111125 shipped with eclipselink 2.3.2.v20111125-r10461.


    Caused By: (Wrapped: Failed request execution for DistributedCache service on Member(Id=2, Timestamp=2012-08-30 18:04:00.268, Address=ip:8090, MachineId=51303, Location=site:cim.com,machine:machine ip,process:5733, Role=WeblogicServer)) java.io.InvalidClassException: org.eclipse.persistence.mappings.AttributeAccessor; local class incompatible: stream classdesc serialVersionUID = -8309785632853564131, local class serialVersionUID = -6617992396758080872
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:62)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.run(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheRequest.onReceived(DistributedCacheRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:11)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    Caused By: java.io.InvalidClassException: org.eclipse.persistence.mappings.AttributeAccessor; local class incompatible: stream classdesc serialVersionUID = -8309785632853564131, local class serialVersionUID = -6617992396758080872
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2180)
    at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2311)
    at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2254)
    at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2233)
    at com.tangosol.util.filter.ExtractorFilter.readExternal(ExtractorFilter.java:144)
    at com.tangosol.util.filter.ComparisonFilter.readExternal(ComparisonFilter.java:202)
    at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2004)
    at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2308)
    at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2254)
    at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2233)
    at com.tangosol.util.filter.ArrayFilter.readExternal(ArrayFilter.java:210)
    at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2004)
    at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2308)
    at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2254)
    at com.tangosol.io.DefaultSerializer.deserialize(DefaultSerializer.java:60)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:1)
    at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.distributedCacheRequest.partialRequest.FilterRequest.read(FilterRequest.CDB:7)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.read(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.deserializeMessage(Grid.CDB:42)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    >

    Is the above exception because of the eclipselink2.4



    Thanks
    Shri

    Edited by: user10385259 on Sep 21, 2012 6:46 AM

    Edited by: user10385259 on Sep 21, 2012 6:50 AM
  • 4. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Sorry the word eclipselink4.4 should be eclipselink2.4 in the previous post
  • 5. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Hi,

    I verified the the right combination of eclipselink and toplink grid (eclipselink 2.3 and toplink-grid 12c) but still facing the same exception which is posted in the previous chain.

    Thanks
    Shri
  • 6. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    ShaunSmith Explorer
    Currently Being Moderated
    user10385259 wrote:
    java.io.InvalidClassException: org.eclipse.persistence.mappings.AttributeAccessor; local class incompatible: stream classdesc serialVersionUID = -8309785632853564131, local class serialVersionUID = -6617992396758080872
    Hi Shri,

    It looks like you have a different version of a class on your client classpath vs. the Coherence cache server classpath. Ensure you have exactly the same domain model, eclipselink, and toplink-grid jars on both client and server classpath.

    --Shaun

    Edited by: Shaun Smith on Sep 13, 2012 8:14 AM
  • 7. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Hi,
    I am using the coherence 3.6 and started by putting it into the server class path in the setDomainEnv.sh as PRE_CLASSPATH.
    I used the toplink11g and eclipselink2.3 but still faced the same issue.

    Could you please suggest me how to provide the the same eclipselink for the coherence server.

    PRE_CLASSPATH="/opt/oracle/beahome/modules/javax.persistence_1.0.0.0_2-0-0.jar:/opt/oracle/beahome/modules/com.oracle.jpa2support_1.0.0.0_2-0.jar:/opt/oracle/NIinstallables/osminstallation/bin/eclipselink.jar:/opt/oracle/NIinstallables/osminstallation/bin/coherence.jar:/opt/oracle/NIinstallables/osminstallation/bin/coherence-jpa.jar:/opt/oracle/adeviews/shryadav_osm73/OMS/3rd-party/Oracle/validatorAPI/bean-validator.jar:/opt/oracle/NIinstallables/osminstallation/bin/toplink-grid.jar:/opt/oracle/NIinstallables/osminstallation/bin/bug13852275-patch1.jar:/opt/oracle/beahome/modules/com.oracle.core.coherence.server_1.0.0.0.jar:/opt/oracle/beahome/modules/com.oracle.core.coherence.integration_1.1.0.0.jar"

    export PRE_CLASSPATH

    The below is the console log when coherence server started.

    Oracle Coherence Version 3.6.0.4 Build 19111
    Grid Edition: Development mode
    Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

    Sep 14, 2012 12:27:48 AM oracle.as.jmx.framework.MessageLocalizationHelper getLocalizedMessage
    WARNING: The resource for bundle "oracle.jrf.i18n.MBeanMessageBundle" with key "oracle.jrf.JRFServiceMBean.checkIfJRFAppliedOnMutipleTargets" cannot be found.
    2012-09-14 00:27:51.093/33.795 Oracle Coherence GE 3.6.0.4 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded Reporter configuration from "jar:file:/opt/oracle/NIinstallables/osminstallation/bin/coherence.jar!/reports/report-group.xml"
    2012-09-14 00:27:51.445/34.147 Oracle Coherence GE 3.6.0.4 <D4> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): TCMP bound to /ip:7001 using SystemSocketProvider
    2012-09-14 00:27:51.445/34.147 Oracle Coherence GE 3.6.0.4 <Warning> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): PreferredUnicastUdpSocket failed to set receive buffer size to 1428 packets (1.99MB); actual size is 25%, 357 packets (512KB). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.
    2012-09-14 00:27:52.153/34.855 Oracle Coherence GE 3.6.0.4 <Info> (thread=Cluster, member=n/a): This Member(Id=4, Timestamp=2012-09-14 00:27:51.973, Address=ip:7001, MachineId=54761, Location=site:cim.com,machine:ip,process:6471, Role=WeblogicServer, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) joined cluster "cluster:0xC4DB" with senior Member(Id=1, Timestamp=2012-08-30 17:59:01.638, Address=ip:8088, MachineId=51303, Location=site:cim.com,machine:ip,process:5363, Role=WeblogicServer, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1)
    2012-09-14 00:27:52.160/34.862 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member(Id=2, Timestamp=2012-08-30 18:04:00.268, Address=ip:8090, MachineId=51303, Location=site:cim.com,machine:ip,process:5733, Role=WeblogicServer) joined Cluster with senior member 1
    2012-09-14 00:27:52.169/34.871 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 1 joined Service Cluster with senior member 1
    2012-09-14 00:27:52.169/34.871 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 1 joined Service Management with senior member 1
    2012-09-14 00:27:52.169/34.871 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 1 joined Service ReplicatedCache with senior member 1
    2012-09-14 00:27:52.169/34.871 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 1 joined Service osm-invocation-osm703_domain/10.3.3.0//osm703/Order and Service Management/7.0.3.924 with senior member 1
    2012-09-14 00:27:52.169/34.872 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 1 joined Service DistributedCache with senior member 1
    2012-09-14 00:27:52.181/34.883 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 2 joined Service Cluster with senior member 1
    2012-09-14 00:27:52.181/34.883 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 2 joined Service Management with senior member 1
    2012-09-14 00:27:52.181/34.883 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 2 joined Service ReplicatedCache with senior member 1
    2012-09-14 00:27:52.181/34.883 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 2 joined Service osm-invocation-osm703_domain/10.3.3.0//osm703/Order and Service Management/7.0.3.924 with senior member 1
    2012-09-14 00:27:52.181/34.883 Oracle Coherence GE 3.6.0.4 <D5> (thread=Cluster, member=n/a): Member 2 joined Service DistributedCache with senior member 1
    2012-09-14 00:27:52.200/34.902 Oracle Coherence GE 3.6.0.4 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Started cluster Name=cluster:0xC4DB

    Group{Address=224.3.6.0, Port=36000, TTL=4}

    MasterMemberSet
    (
    ThisMember=Member(Id=4, Timestamp=2012-09-14 00:27:51.973, Address=ip:7001, MachineId=54761, Location=site:idc.oracle.com,machine:ip,process:6471, Role=WeblogicServer)
    OldestMember=Member(Id=1, Timestamp=2012-08-30 17:59:01.638, Address=ip:8088, MachineId=51303, Location=site:cim,machine:ip,process:5363, Role=WeblogicServer)
    ActualMemberSet=MemberSet(Size=3, BitSetCount=2
    Member(Id=1, Timestamp=2012-08-30 17:59:01.638, Address=ip:8088, MachineId=51303, Location=site:cim.com,machine:ip,process:5363, Role=WeblogicServer)
    Member(Id=2, Timestamp=2012-08-30 18:04:00.268, Address=ip:8090, MachineId=51303, Location=site:cim.com,machine:ip,process:5733, Role=WeblogicServer)
    Member(Id=4, Timestamp=2012-09-14 00:27:51.973, Address=ip:7001, MachineId=54761, Location=site:cim.com,machine:ip,process:6471, Role=WeblogicServer)
    )
    RecycleMillis=1200000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    )
    )

    TcpRing{Connections=[2]}
    IpMonitor{AddressListSize=1}

    2012-09-14 00:27:52.274/34.976 Oracle Coherence GE 3.6.0.4 <D5> (thread=Invocation:Management, member=4): Service Management joined the cluster with senior service member 1
    2012-09-14 00:27:53.014/35.716 Oracle Coherence GE 3.6.0.4 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=4): Loaded cache configuration from "jar:file:/opt/oracle/NIinstallables/osminstallation/bin/coherence.jar!/coherence-cache-config.xml"



    Thanks
    Shri

    Edited by: user10385259 on Sep 21, 2012 6:51 AM
  • 8. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    ShaunSmith Explorer
    Currently Being Moderated
    Hi Shri,

    My first suggestion is to take a look at the TopLink Grid examples here: http://www.oracle.com/technetwork/middleware/toplink/examples-325517-en-ca.html

    Second, can you elaborate on your deployment environment? I assumed you were running a stand alone Java client using TopLink Grid connecting to a Coherence cluster of CacheServers but it looks like you're running inside WebLogic. You can start a CacheServer with the cache-server.cmd/.sh from the Coherence/bin folder. You can add eclipselink.jar, toplink-grid.jar, and your domain classes jar to the CacheServer classpath in this script.

    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  • 9. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Hi,
    I am running the coherence by putting the coherence.jar in the PRE_CLASSPATH of the Weblogic setDomainEnv.sh.

    PRE_CLASSPATH="/opt/oracle/beahome/modules/javax.persistence_1.0.0.0_2-0-0.jar:/opt/oracle/beahome/modules/com.oracle.jpa2support_1.0.0.0_2-0.jar:/opt/oracle/NIinstallables/osminstallation/bin/eclipselink.jar:/opt/oracle/adeviews/shryadav_osm73/OMS/3rd-party/Oracle/validatorAPI/bean-validator.jar:/opt/oracle/NIinstallables/osminstallation/bin/toplink-grid.jar:/opt/oracle/NIinstallables/osminstallation/bin/bug13852275-patch1.jar:/opt/oracle/beahome/modules/com.oracle.core.coherence.server_1.0.0.0.jar:/opt/oracle/beahome/modules/com.oracle.core.coherence.integration_1.1.0.0.jar:/opt/oracle/NIinstallables/osminstallation/bin/*coherence.jar*"


    I also deploy the coherence.jar as a shared library.
    I am using the Oracle Weblogic PS4.

    I used the toplink grid 12c and eclipselink2.3 which shipped with toplink.

    I have the defined the WAK in the coherence-cluster-config.xml

    <cluster-config>
    <member-identity>
         <!--
         Choose a unique name for the cluster, such that no other
         OSM instance in your network would have the same name
         -->
         <cluster-name system-property="tangosol.coherence.cluster">CoherenceCluster</cluster-name>
    </member-identity>
    <unicast-listener>
         <!--
         Add more <socket-address>...</socket-address> elements to
         well-known addresses, one for each member in your OSM
         WebLogic cluster.
         -->
         <well-known-addresses>
         <socket-address id="1">
              <address>10.2.3.4</address>
              <port>7001</port>
         </socket-address>
         </well-known-addresses>
    </unicast-listener>
    </cluster-config>

    Modified the startWeblogic.sh and put the below line
    export JAVA_OPTIONS="${JAVA_OPTIONS} -Dosm.coherence.cluster.config.override=/opt/oracle/beahome/user_projects/domains/osm730/bin/osm-coherence-cluster-config.xml -Dtangosol.coherence.localhost=hostname -Dtangosol.coherence.localport=7001"



    I have the coherence-cache-config.xml in my application ear which have
         <cache-mapping>
    <cache-name>NetworkTarget</cache-name>
    <scheme-name>GridRead</scheme-name>
    </cache-mapping>
         <cache-mapping>
    <cache-name>ManagementInterface</cache-name>
    <scheme-name>GridRead</scheme-name>
    </cache-mapping>

    </distributed-scheme>
              <distributed-scheme>
                   <scheme-name>GridRead</scheme-name>
                   <service-name>EclipseLinkJPAReadOnly</service-name>
    <!--Configure a wrapper serializer to support serialization of relationships.-->
                   <serializer>
                        <class-name>oracle.eclipselink.coherence.integrated.cache.WrapperSerializer</class-name>
                   </serializer>
                   <!--backing-map-scheme>
                        <read-write-backing-map-scheme>
                             <internal-cache-scheme>
                                  <local-scheme />
                             </internal-cache-scheme-->
                             <!-- Define the cache scheme -->
                             <!--cachestore-scheme>
                                  <class-scheme>
                                       <class-name>oracle.eclipselink.coherence.integrated.EclipseLinkJPACacheLoader
                                       </class-name>
                                       <init-params>
                                            <init-param>
                                                 <param-type>java.lang.String</param-type>
                                                 <param-value>{cache-name}</param-value>
                                            </init-param>
                                            <init-param>
                                                 <param-type>java.lang.String</param-type>
                                                 <param-value>ActivationDataSourceXA</param-value>
                                            </init-param>
                                       </init-params>
                                  </class-scheme>
                             </cachestore-scheme>
                             <read-only>true</read-only>
                        </read-write-backing-map-scheme>
                   </backing-map-scheme-->

                   <backing-map-scheme>
                        <local-scheme>
                             <scheme-ref>unlimited-backing-map</scheme-ref>
                        </local-scheme>
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>

    Please let me know if you need more info.


    Thanks
    Shri

    Edited by: user10385259 on Sep 21, 2012 6:58 AM
  • 10. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Hi,

    When I used the Coherence 3..7.1.0 with the toplink12, I am getting the below exception.

    Caused By: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.List
    at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:411)
    at oracle.communications.activation.beans.NetworkTargetEJBBean.queryByRange(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy171.queryByRange(Unknown Source)
    at oracle.communications.activation.beans.NetworkTargetEJB_zhfqs_NetworkTargetEJBImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.communications.activation.beans.NetworkTargetEJB_zhfqs_NetworkTargetEJBImpl.queryByRange(Unknown Source)
    at oracle.communications.activation.beans.NetworkTargetEJB_zhfqs_NetworkTargetEJBImpl_CBV.queryByRange(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy124.queryByRange(Unknown Source)
    at oracle.communications.activation.ui.delegate.NetworkTargetDelegate.queryByRange(NetworkTargetDelegate.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.adf.model.adapter.bean.provider.BeanDataCollection.invokeMethod(BeanDataCollection.java:405)
    at oracle.adf.model.adapter.bean.jpa.JPQLBeanDataCollection.getRecordCount(JPQLBeanDataCollection.java:164)
    at oracle.adf.model.adapter.bean.provider.BeanDataCollection.init(BeanDataCollection.java:153)
    at oracle.adf.model.adapter.bean.jpa.JPQLBeanDataCollection.init(JPQLBeanDataCollection.java:110)
    at oracle.adf.model.adapter.bean.provider.BeanDataCollection.<init>(BeanDataCollection.java:108)
    at oracle.adf.model.adapter.bean.jpa.JPQLBeanDataCollection.<init>(JPQLBeanDataCollection.java:59)
    at oracle.adf.model.adapter.bean.jpa.JPQLDataFilterHandler.invoke(JPQLDataFilterHandler.java:55)
    at oracle.adf.model.adapter.bean.DataFilterHandler.invokeAccessor(DataFilterHandler.java:141)
    at oracle.adf.model.adapter.bean.BeanFilterableDataControl.invokeAccessor(BeanFilterableDataControl.java:78)
    at oracle.adf.model.bean.DCBeanDataControl.invokeAccessor(DCBeanDataControl.java:447)
    at oracle.adf.model.bean.DCDataVO$DCAccessorCollectionAdapter.getDataProvider(DCDataVO.java:2706)
    at oracle.adf.model.bean.DCDataVO$DCAccessorCollectionAdapter.refreshIterator(DCDataVO.java:2598)
    at oracle.adf.model.bean.DCDataVO.executeQueryForCollection(DCDataVO.java:404)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1183)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1363)
    at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1269)
    at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1254)
    at oracle.adf.model.bean.DCDataVO.getQueryHitCount(DCDataVO.java:1455)
    at oracle.jbo.server.ViewObjectImpl.getQueryHitCount(ViewObjectImpl.java:4583)
    at oracle.jbo.server.QueryCollection.getEstimatedRowCount(QueryCollection.java:4032)
    at oracle.jbo.server.ViewRowSetImpl.getEstimatedRowCount(ViewRowSetImpl.java:2587)
    at oracle.jbo.server.ViewObjectImpl.getEstimatedRowCount(ViewObjectImpl.java:10212)
    at oracle.adf.model.bc4j.DCJboDataControl.estimateRowCount(DCJboDataControl.java:1574)
    at oracle.adf.model.bc4j.DCJboDataControl.getDeferredEstimatedRowCount(DCJboDataControl.java:1521)
    at oracle.adf.model.binding.DCIteratorBinding.getDeferredEstimatedRowCount(DCIteratorBinding.java:3736)
    at oracle.jbo.uicli.binding.JUCtrlRangeBinding.getDeferredEstimatedRowCount(JUCtrlRangeBinding.java:127)
    at oracle.adfinternal.view.faces.model.binding.RowDataManager._getRowCount(RowDataManager.java:523)
    at oracle.adfinternal.view.faces.model.binding.RowDataManager.getEstimatedRowCount(RowDataManager.java:321)
    at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowCount(RowDataManager.java:241)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowCount(FacesCtrlHierBinding.java:591)
    at org.apache.myfaces.trinidad.component.UIXCollection.getRowCount(UIXCollection.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstValue.getValue(Unknown Source)
    at com.sun.el.parser.AstLessThan.getValue(Unknown Source)
    at com.sun.el.parser.AstChoice.getValue(Unknown Source)
    at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
    at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
    at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getValue(ValueRenderer.java:184)
    at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getConvertedString(ValueRenderer.java:145)
    at oracle.adfinternal.view.faces.renderkit.rich.OutputTextRenderer.encodeAll(OutputTextRenderer.java:148)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelLabelAndMessageRenderer.renderFieldCellContents(PanelLabelAndMessageRenderer.java:171)
    at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.renderFieldCell(LabelLayoutRenderer.java:528)
    at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:305)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelLabelAndMessageRenderer.encodeAll(PanelLabelAndMessageRenderer.java:114)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)


    Thanks
    Shri
  • 11. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    ShaunSmith Explorer
    Currently Being Moderated
    Hi Shri,

    If you are in WLS you should configure Coherence as per the WLS ActiveCache guide: http://docs.oracle.com/cd/E24329_01/web.1211/e24442/coh_wls.htm#autoId6 I think you're close but you're deploying coherence.jar twice which you don't need to do. Also, since you are in WLS you should use the TopLink jars that ship in WLS. Again, the configuration is described in the ActiveCache guide: http://docs.oracle.com/cd/E24329_01/web.1211/e24442/package_wls.htm. eclipselink.jar is on the WLS classpath and that jar has to be used with the toplink-grid.jar that is shipped in the same release of WLS. It appears you are unknowingly mixing incompatible jars.

    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  • 12. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Hi Shaun,

    As my requirement is to used the Weblogic 10.3.5. So I implemented as you suggested.
    I deployed the coherence 3.6 as shared library, active-cache-1.0.jar and toplink-grid-1.0 from the specified folder as you mention.

    There is bug in this version of weblogic to initialized the Cache server so placed the patch in the PRE_CLASSPATH
    /opt/oracle/NIinstallables/osminstallation/bin/bug13852275-patch1.jar:/opt/oracle/beahome/modules/com.oracle.core.coherence.integration_1.1.0.0.jar:/opt/oracle/beahome/modules/*org.eclipse.persistence_1.1.0.0_2-1.jar*

    I updated the weblogic-application.xml.

    When I access the entities I found the same exception which is posted already but I am putting again.

    Caused By: (Wrapped: Failed request execution for DistributedCache service on Member(Id=2, Timestamp=2012-08-30 18:04:00.268, Address=ip:8090, MachineId=51303, Location=site:cim.com,machine:ip,process:5733, Role=WeblogicServer)) java.io.InvalidClassException: org.eclipse.persistence.mappings.AttributeAccessor; local class incompatible: stream classdesc serialVersionUID = -3975424543448189287, local class serialVersionUID = -6617992396758080872
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:62)


    I double check the classpath for the eclipselink but only default jar is available.



    Thanks
    Shri

    Edited by: user10385259 on Sep 21, 2012 7:00 AM

    Edited by: user10385259 on Sep 21, 2012 7:01 AM
  • 13. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    ShaunSmith Explorer
    Currently Being Moderated
    Again, you need to use the eclipselink.jar that is shipped in WebLogic with the toplink-grid.jar that is shipped in Weblogic. You can't mix and match jars between versions. And why are you putting the EclipseLink jar in the pre-classpath?

    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  • 14. Re: JPA with ToplinkGrid-GridRead coherence configuration throws exception
    775002 Newbie
    Currently Being Moderated
    Hi Shaun,

    I tried without putting the eclipselink jar in the PRE_CLASSPATh but exception is same.

    Could you please suggest me the compatibility steps considering the Oracle Weblogic 10.3.5.

    I can see the two eclipselink.jar one is /opt/oracle/beahome/org.eclipse.persistence_1.1.0.0_2-1.jar and one is available in /opt/oracle/beahome/oracle_common/modules/oracle.toplink_11.1.1/eclipselink.jar.

    But at the server start only /opt/oracle/beahome/org.eclipse.persistence_1.1.0.0_2-1.jar is present in the classpath.


    Thanks
    Shri
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points