NPE using coherence Write-Behind with JpaCacheStore
<p>I'm getting a NPE instantiating a coherence write-behind cache.</p>

<p>This is the full stacktrace</p>

<pre><code>java.lang.NullPointerException
    at com.tangosol.coherence.config.scheme.BackingMapScheme.isPartitioned(BackingMapScheme.java:121)
    at com.tangosol.net.ExtensibleConfigurableCacheFactory$Manager.instantiateBackingMap(ExtensibleConfigurableCacheFactory.java:1348)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.instantiateBackingMap(PartitionedCache.CDB:24)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.setCacheName(PartitionedCache.CDB:25)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ServiceConfig$ConfigListener.entryInserted(PartitionedCache.CDB:17)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
    at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:567)
    at com.tangosol.util.WrapperObservableMap.dispatchEvent(WrapperObservableMap.java:712)
    at com.tangosol.util.WrapperObservableMap.put(WrapperObservableMap.java:147)
    at com.tangosol.coherence.component.util.ServiceConfig$Map.put(ServiceConfig.CDB:43)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$StorageIdRequest.onReceived(PartitionedCache.CDB:45)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
    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:51)
    at java.lang.Thread.run(Thread.java:662)
2012-08-13 11:39:14.592/45.916 Oracle Coherence GE 12.1.2.0 &lt;Error&gt; (thread=DistributedCache:BacSessionJpaDistributedCache, member=1): java.lang.NullPointerException
    at com.tangosol.coherence.config.scheme.BackingMapScheme.isPartitioned(BackingMapScheme.java:121)
    at com.tangosol.net.ExtensibleConfigurableCacheFactory$Manager.isBackupPartitioned(ExtensibleConfigurableCacheFactory.java:1665)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage$BackingManager.parseConfiguration(PartitionedCache.CDB:16)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.instantiateBackupMap(PartitionedCache.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.setCacheName(PartitionedCache.CDB:29)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ServiceConfig$ConfigListener.entryInserted(PartitionedCache.CDB:17)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
    at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:567)
    at com.tangosol.util.WrapperObservableMap.dispatchEvent(WrapperObservableMap.java:712)
    at com.tangosol.util.WrapperObservableMap.put(WrapperObservableMap.java:147)
    at com.tangosol.coherence.component.util.ServiceConfig$Map.put(ServiceConfig.CDB:43)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$StorageIdRequest.onReceived(PartitionedCache.CDB:45)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
    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:51)
    at java.lang.Thread.run(Thread.java:662)
</code></pre>

<p>And these are my configuration files</p>

<p><strong>coherence-cache-config.xml</strong></p>

<pre><code>&lt;?xml version="1.0"?&gt;
&lt;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"&gt;

    &lt;caching-scheme-mapping&gt;
        &lt;cache-mapping&gt;
            &lt;cache-name&gt;my_session_cache&lt;/cache-name&gt;
            &lt;scheme-name&gt;jpa-distributed&lt;/scheme-name&gt;
        &lt;/cache-mapping&gt;
    &lt;/caching-scheme-mapping&gt;

    &lt;caching-schemes&gt;
        &lt;distributed-scheme&gt;
            &lt;scheme-name&gt;jpa-distributed&lt;/scheme-name&gt;
            &lt;service-name&gt;MySessionJpaDistributedCache&lt;/service-name&gt;
            &lt;backing-map-scheme&gt;
                &lt;read-write-backing-map-scheme&gt;
                    &lt;cachestore-scheme&gt;
                        &lt;class-scheme&gt;
                            &lt;class-name&gt;com.tangosol.coherence.jpa.JpaCacheStore&lt;/class-name&gt;
                            &lt;init-params&gt;
                                &lt;init-param&gt;
                                    &lt;param-type&gt;java.lang.String&lt;/param-type&gt;
                                    &lt;param-value&gt;Session&lt;/param-value&gt;
                                &lt;/init-param&gt;
                                &lt;init-param&gt;
                                    &lt;param-type&gt;java.lang.String&lt;/param-type&gt;
                                    &lt;param-value&gt;sample.coherence.jpa.Session&lt;/param-value&gt;
                                &lt;/init-param&gt;
                                &lt;!-- This param should match the value of the --&gt;
                                &lt;!-- persistence unit name in persistence.xml --&gt;
                                &lt;init-param&gt;
                                    &lt;param-type&gt;java.lang.String&lt;/param-type&gt;
                                    &lt;param-value&gt;MyJPAUnit&lt;/param-value&gt;
                                &lt;/init-param&gt;
                            &lt;/init-params&gt;
                        &lt;/class-scheme&gt;
                    &lt;/cachestore-scheme&gt;
                &lt;/read-write-backing-map-scheme&gt;
            &lt;/backing-map-scheme&gt;
        &lt;/distributed-scheme&gt;
    &lt;/caching-schemes&gt;

&lt;/cache-config&gt;
</code></pre>

<p><strong>tangosol-coherence-override.xml</strong></p>

<pre><code>&lt;?xml version='1.0'?&gt;

&lt;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"&gt;
    &lt;cluster-config&gt;
        &lt;member-identity&gt;
            &lt;cluster-name&gt;my_ch_cluster&lt;/cluster-name&gt;
        &lt;/member-identity&gt;

        &lt;multicast-listener&gt;
            &lt;address&gt;224.3.7.0&lt;/address&gt;
            &lt;port&gt;9876&lt;/port&gt;
            &lt;time-to-live&gt;1&lt;/time-to-live&gt;
        &lt;/multicast-listener&gt;
    &lt;/cluster-config&gt;

    &lt;configurable-cache-factory-config&gt;
        &lt;init-params&gt;
            &lt;init-param&gt;
                &lt;param-type&gt;java.lang.String&lt;/param-type&gt;
                &lt;param-value system-property="tangosol.coherence.cacheconfig"&gt;coherence-cache-config.xml&lt;/param-value&gt;
            &lt;/init-param&gt;
        &lt;/init-params&gt;
    &lt;/configurable-cache-factory-config&gt;
&lt;/coherence&gt;
</code></pre>

<p><strong>persistence.xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="Cp1252" ?&gt;
&lt;persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
             xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"&gt;
    &lt;persistence-unit name="MyJPAUnit" transaction-type="RESOURCE_LOCAL"&gt;
        &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
        &lt;class&gt;sample.coherence.jpa.Session&lt;/class&gt;
        &lt;class&gt;sample.coherence.jpa.SessionKey&lt;/class&gt;
        &lt;properties&gt;
            &lt;property name="javax.persistence.logging.level" value="INFO"/&gt;
            &lt;property name="eclipselink.ddl-generation" value="create-tables"/&gt;
            &lt;!--&lt;property name="eclipselink.ddl-generation.output-mode" value="both"/&gt;--&gt;
            &lt;property name="eclipselink.target-database" value="HSQL"/&gt;
            &lt;property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/&gt;
            &lt;property name="javax.persistence.jdbc.user" value="sa"/&gt;
            &lt;property name="javax.persistence.jdbc.password" value=""/&gt;
            &lt;property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:testDb"/&gt;
        &lt;/properties&gt;
    &lt;/persistence-unit&gt;
&lt;/persistence&gt;
</code></pre>

<p>Any help? is there a way to get more information in coherence about this NPE ?</p>

<p>Thanks,</p>
