Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.8
-
None
-
None
-
Fix error when initializing Cassandra Store.
Description
When trying to create a simple cache with Cassandra store and have value persistence strategy POJO, the following exception occurs
Caused by: java.lang.NullPointerException: nullCaused by: java.lang.NullPointerException: null at org.apache.ignite.cache.store.cassandra.persistence.PojoField.calculatedField(PojoField.java:155) ~[ignite-cassandra-store-2.8.0.jar:2.8.0] at org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.prepareLoadStatements(PersistenceController.java:311) ~[ignite-cassandra-store-2.8.0.jar:2.8.0] at org.apache.ignite.cache.store.cassandra.persistence.PersistenceController.<init>(PersistenceController.java:85) ~[ignite-cassandra-store-2.8.0.jar:2.8.0] at org.apache.ignite.cache.store.cassandra.CassandraCacheStore.<init>(CassandraCacheStore.java:106) ~[ignite-cassandra-store-2.8.0.jar:2.8.0] at org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:59) ~[ignite-cassandra-store-2.8.0.jar:2.8.0] at org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.create(CassandraCacheStoreFactory.java:34) ~[ignite-cassandra-store-2.8.0.jar:2.8.0] at org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCacheContext(GridCacheProcessor.java:1199) ~[ignite-core-2.8.0.jar:2.8.0] at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheContext(GridCacheProcessor.java:1995) ~[ignite-core-2.8.0.jar:2.8.0] at org.apache.ignite.internal.processors.cache.GridCacheProcessor.lambda$null$6a5b31b9$1(GridCacheProcessor.java:1830) ~[ignite-core-2.8.0.jar:2.8.0] at org.apache.ignite.internal.processors.cache.GridCacheProcessor.lambda$prepareStartCaches$8(GridCacheProcessor.java:1754) ~[ignite-core-2.8.0.jar:2.8.0] at org.apache.ignite.internal.processors.cache.GridCacheProcessor.lambda$prepareStartCaches$926b6886$1(GridCacheProcessor.java:1827) ~[ignite-core-2.8.0.jar:2.8.0] at org.apache.ignite.internal.util.IgniteUtils.lambda$null$1(IgniteUtils.java:11138) ~[ignite-core-2.8.0.jar:2.8.0] at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[na:1.8.0_181] at java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_181] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181]
It looks like that recent changes of IGNITE-1903 are leading to this issue, as we are starting to serialize CacheStoreFactory, which contains PojoFiled, which in its turn has transient field accessor. This leads to accessor being null after deserialization. Note, that this happens only when passing persistenceSettings (not persistenceSettingsBean)
Works fine with Ignite 2.7.6.
Probably related to IGNITE-8500
Attachments
Issue Links
- causes
-
IGNITE-13431 NPE during Cassandra Store initialization with PRIMITIVE strategy
- Resolved
- links to