This discussion is archived
4 Replies Latest reply: May 15, 2013 4:52 AM by rshanker RSS

Coherence 3.7.1 example not working

rshanker Newbie
Currently Being Moderated
Hi,
I have just started working with coherence and found the example provided in the documentation is not working.
http://docs.oracle.com/cd/E24290_01/coh.371/e22837/gs_example.htm#CACIIDFG

I have corrected few mistakes detected in the xml configuration.

After i run the Java program, and try to get the inserted value from the command line im getting null.

Verifying sample example part is not working.
Im getting null always.

Please let me know what else is required further to make this work.

while running the default server im finding the below in the logs
2013-05-10 14:32:40.353/603.987 Oracle Coherence GE 3.7.1.0 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.
2013-05-10 14:33:55.429/679.063 Oracle Coherence GE 3.7.1.0 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.
2013-05-10 14:35:10.505/754.139 Oracle Coherence GE 3.7.1.0 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.

Tangosol-coherence-override.xml

<?xml version='1.0'?>

<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">
<cluster-config>
<member-identity>
<cluster-name>kn_test</cluster-name>
</member-identity>

<multicast-listener>
<address>224.3.7.0</address>
<port>5555</port>
<time-to-live>3</time-to-live>
</multicast-listener>
</cluster-config>

<configurable-cache-factory-config>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value system-property="tangosol.coherence.cacheconfig">example-config.xml</param-value>
</init-param>
</init-params>
</configurable-cache-factory-config>
</coherence>
  • 1. Re: Coherence 3.7.1 example not working
    723376 Explorer
    Currently Being Moderated
    Please see responses in this post for solution:

    start Conherence ERROR!!!

    -Luk
  • 2. Re: Coherence 3.7.1 example not working
    rshanker Newbie
    Currently Being Moderated
    Hi Luk,

    I have gone through that, Since im not able to change those firewall rules, instead of multicast i have reduced the system to unicast, Single Server with multiple JVMs and my issue is still not resolved.

    Please find the configuration details:
    ===========
    example-config.xml
    -------
    <?xml version="1.0"?>

    <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>hello-example</cache-name>
    <scheme-name>distributed</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>

    <caching-schemes>
    <distributed-scheme>
    <scheme-name>distributed</scheme-name>
    <service-name>DistributedCache</service-name>
    <thread-count>4</thread-count>
    <request-timeout>60s</request-timeout>
    <backing-map-scheme>
    <local-scheme>
    <scheme-name>SampleMemoryScheme</scheme-name>
    </local-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <local-scheme>
    <scheme-name>LocalSizeLimited</scheme-name>
    <eviction-policy>LRU</eviction-policy>
    <high-units>1000</high-units>
    <expiry-delay>1h</expiry-delay>
    </local-scheme>
    </caching-schemes>

    </cache-config>
    ===================

    tangosol-coherence-override.xml
    -------------
    <?xml version='1.0'?>

    <coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">
    <cluster-config>
    <member-identity>
    <cluster-name system-property="tangosol.coherence.cluster">kn_test</cluster-name>
    </member-identity>
    <unicast-listener>
    <address system-property="tangosol.coherence.localhost">127.0.0.1
    </address>
    </unicast-listener>
    <multicast-listener>
    <time-to-live system-property="tangosol.coherence.ttl">0</time-to-live>
    </multicast-listener>
    </cluster-config>

    <configurable-cache-factory-config>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value system-property="tangosol.coherence.cacheconfig">example-config.xml</param-value>
    </init-param>
    </init-params>
    </configurable-cache-factory-config>
    </coherence>
    ==============

    even then im facing the issue of one JVM inserted data into the Cache, the other JVM/command line is not able to retrieve/view the data.

    Please let me know if there is any issue in configuration and any other data required.

    Thanks,
    Ravi Shanker
  • 3. Re: Coherence 3.7.1 example not working
    user639604 Journeyer
    Currently Being Moderated
    You will need to use well known address approach. Only specify the unicast address not going to work for you.

    Check this URL out regarding how to setup well known address.

    http://docs.oracle.com/cd/E24290_01/coh.371/e22837/cluster_setup.htm#CEGEADBE
  • 4. Re: Coherence 3.7.1 example not working
    rshanker Newbie
    Currently Being Moderated
    Thanks for the update.
    Its working fine after adding the well known addresses.

Legend

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