Quantcast
Channel: VMware Communities : All Content - vFabric GemFire [ARCHIVED]
Viewing all articles
Browse latest Browse all 990

Configuration problem mixing regions with and without disk persistence setup causing JSONFormatter to fail

$
0
0

I'm have trouble setting up my local configuration properly with a mix of regions with varying disk persistence setup.  Is this a configuration problem on my end or a bug in GemFire and/or Spring Data GemFire?

 

My working configuration is as follows:

 

    <gfe:replicated-region id="replicatedRegion" cache-ref="gemfireCache" disk-store-ref="overflowOnlyDiskstore" persistent="false">

        <gfe:eviction type="HEAP_PERCENTAGE" threshold="90" action="OVERFLOW_TO_DISK"/>

    </gfe:replicated-region>

    <gfe:local-region id="localRegion" cache-ref="gemfireCache"/>


With the above configuration, I can successfully call JSONFormatter.fromJSON(json) and get a reference to a new PdxInstance object.  However when I slightly change the configuration to enable disk persistence on one of the regions, the JSONFormatter.fromJSON(json) call fails.  The change is as follows:


    <gfe:local-region id="localRegion" cache-ref="gemfireCache" persistent="true" disk-store-ref="persistOverflowDiskstore"/>

 

Without any additional changes, the following error starts occurring:

 

    com.gemstone.gemfire.pdx.JSONFormatterException: Could not parse JSON document: [Source: java.io.StringReader@5549f0e; line: 26, column: 6]

        at com.gemstone.gemfire.pdx.JSONFormatter.fromJSON(JSONFormatter.java:66)

        ...

    Caused by: com.gemstone.gemfire.pdx.PdxInitializationException: The PDX metadata must be persistent in a member that has persistent data. See CacheFactory.setPdxPersistent.

        at com.gemstone.gemfire.pdx.internal.PeerTypeRegistration.checkAllowed(PeerTypeRegistration.java:531)

        at com.gemstone.gemfire.pdx.internal.PeerTypeRegistration.verifyConfiguration(PeerTypeRegistration.java:515)

        ...

 

Note that this is breaking while I'm trying to get a reference to a PdxInstance, and so the code hasn't even gotten to the point where I'm placing a PdxInstance object into a region.

 

Thanks for any help in advance.


Viewing all articles
Browse latest Browse all 990

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>