ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From javamate <javam...@gmail.com>
Subject How to use CacheJdbcBlobStore? Getting NotSerializableException
Date Sat, 30 May 2015 14:59:30 GMT
I am trying to use CacheJdbcBlobStore with Ignite 1.0.6 but the grid will not
start because of NotSerializableException from the CacheJdbcBlobStore on the
CacheConfiguration.
I am using a slightly modified example-cache.xml:
Use the OptimizedMarshaller with requireSerializable=false
Added cacheStoreFactory property to CacheConfiguration to configure the
CacheJdbcBlobStore
Use TcpDiscoveryVmIpFinder rather than TcpDiscoveryMulticastIpFinder (for
convenience when working locally; not specifically relevant to this
situation)
Here's the config file (with comments removed):
When I try to start the node, I get the following exception:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m;
support was removed in 8.0[10:31:01]    __________  ________________
[10:31:01]   /  _/ ___/ |/ /  _/_  __/ __/ [10:31:01]  _/ // (7 7    // /  /
/ / _/   [10:31:01] /___/\___/_/|_/___/ /_/ /___/  [10:31:01]  [10:31:01]
ver. 1.0.6#20150525-sha1:8977537d[10:31:01] 2015 Copyright(C) Apache
Software Foundation[10:31:01] [10:31:01] Quiet mode.[10:31:01]   ^-- Logging
to file
'/Users/eric/Downloads/gridgain-community-fabric-1.0.6/work/log/ignite-ce99056b.0.log'[10:31:01]
 
^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to
ignite.{sh|bat}[10:31:01] [10:31:03] Configured plugins:[10:31:03]   ^--
None[10:31:03] [10:31:06,133][SEVERE][main][IgniteKernal] Got exception
while starting (will rollback startup routine).class
org.apache.ignite.IgniteCheckedException: Failed to start processor:
GridProcessorAdapter []	at
org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1386)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:769)	at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1599)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1467)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:993)	at
org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:920)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:833)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:737)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:691)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:531)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:501)	at
org.apache.ignite.Ignition.start(Ignition.java:332)	at
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:288)Caused
by: class org.apache.ignite.IgniteCheckedException: Failed to validate cache
configuration (make sure all objects in cache configuration are
serializable): default	at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkSerializable(GridCacheProcessor.java:2901)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.start(GridCacheProcessor.java:576)
at
org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1383)
... 12 moreCaused by: class org.apache.ignite.IgniteCheckedException: Failed
to serialize object: CacheConfiguration [name=null, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=null,
storeFactory=javax.cache.configuration.FactoryBuilder$SingletonFactory@7f485fda,
loadPrevVal=false, aff=null, cacheMode=PARTITIONED, atomicityMode=ATOMIC,
atomicWriteOrderMode=null, backups=1, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED, affMapper=null, rebalanceDelay=0,
rebalanceThrottle=0, interceptor=null, longQryWarnTimeout=3000,
readFromBackup=true, nodeFilter=null, sqlEscapeAll=false,
sqlOnheapRowCacheSize=10240, cpOnRead=true, topValidator=null]	at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:78)
at
org.apache.ignite.marshaller.AbstractMarshaller.marshal(AbstractMarshaller.java:51)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkSerializable(GridCacheProcessor.java:2898)
... 14 moreCaused by: java.io.NotSerializableException:
org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStore	at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)	at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)	at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)	at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)	at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:73)
... 16 more[10:31:06] Ignite node stopped OK [uptime=00:00:05:106]class
org.apache.ignite.IgniteException: Failed to start processor:
GridProcessorAdapter []	at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:660)
at org.apache.ignite.Ignition.start(Ignition.java:335)	at
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:288)Caused
by: class org.apache.ignite.IgniteCheckedException: Failed to start
processor: GridProcessorAdapter []	at
org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1386)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:769)	at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1599)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1467)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:993)	at
org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:920)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:833)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:737)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:691)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:531)	at
org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:501)	at
org.apache.ignite.Ignition.start(Ignition.java:332)	... 1 moreCaused by:
class org.apache.ignite.IgniteCheckedException: Failed to validate cache
configuration (make sure all objects in cache configuration are
serializable): default	at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkSerializable(GridCacheProcessor.java:2901)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.start(GridCacheProcessor.java:576)
at
org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1383)
... 12 moreCaused by: class org.apache.ignite.IgniteCheckedException: Failed
to serialize object: CacheConfiguration [name=null, rebalancePoolSize=2,
rebalanceTimeout=10000, evictPlc=null, evictSync=false,
evictKeyBufSize=1024, evictSyncConcurrencyLvl=4, evictSyncTimeout=10000,
evictFilter=null, evictMaxOverflowRatio=10.0, eagerTtl=true,
dfltLockTimeout=0, startSize=1500000, nearCfg=null, writeSync=null,
storeFactory=javax.cache.configuration.FactoryBuilder$SingletonFactory@7f485fda,
loadPrevVal=false, aff=null, cacheMode=PARTITIONED, atomicityMode=ATOMIC,
atomicWriteOrderMode=null, backups=1, invalidate=false,
tmLookupClsName=null, rebalanceMode=ASYNC, rebalanceOrder=0,
rebalanceBatchSize=524288, offHeapMaxMem=-1, swapEnabled=false,
maxConcurrentAsyncOps=500, writeBehindEnabled=false,
writeBehindFlushSize=10240, writeBehindFlushFreq=5000,
writeBehindFlushThreadCnt=1, writeBehindBatchSize=512,
memMode=ONHEAP_TIERED, affMapper=null, rebalanceDelay=0,
rebalanceThrottle=0, interceptor=null, longQryWarnTimeout=3000,
readFromBackup=true, nodeFilter=null, sqlEscapeAll=false,
sqlOnheapRowCacheSize=10240, cpOnRead=true, topValidator=null]	at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:78)
at
org.apache.ignite.marshaller.AbstractMarshaller.marshal(AbstractMarshaller.java:51)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkSerializable(GridCacheProcessor.java:2898)
... 14 moreCaused by: java.io.NotSerializableException:
org.apache.ignite.cache.store.jdbc.CacheJdbcBlobStore	at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)	at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)	at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)	at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)	at
org.apache.ignite.marshaller.jdk.JdkMarshaller.marshal(JdkMarshaller.java:73)
... 16 moreFailed to start grid: Failed to start processor:
GridProcessorAdapter []
I notice the presence of the JdkMarshaller even though I set the
OptimizedMarshaller. Further, the documentation for the OptimizedMarshaller
indicates it will be the default if no other marshaller is explicitly
configured (see
https://ignite.incubator.apache.org/releases/1.0.0/javadoc/org/apache/ignite/marshaller/optimized/OptimizedMarshaller.html).
So a few questions:
Shouldn't I be seeing the use of the OptimizedMarshaller rather than the
JdkMarshaller?
How can I use the CacheJdbcBlobStore?




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-use-CacheJdbcBlobStore-Getting-NotSerializableException-tp431.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Mime
View raw message