使用CacheJdbcPojoStoreFactory加载缓存时,Java MySql Apache-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

使用CacheJdbcPojoStoreFactory加载缓存时,Java MySql Apache

保持可爱mmm 2019-11-15 13:45:17 55

我在我的docker容器中有一个简单的mysql数据库,可以正常工作

我正在尝试使用最新版本的内存功能来实现apache ignite 这是控制台日志

[01:08:29] / / __/ |/ / / / / [01:08:29] _/ // (7 7 // / / / / /
[01:08:29] /
/_
/
/|
// // /_/
[01:08:29] [01:08:29] ver. 2.7.6#20190911-sha1:21f7ca41 [01:08:29] 2019 Copyright(C) Apache Software Foundation [01:08:29] [01:08:29] Ignite documentation: http://ignite.apache.org [01:08:29] [01:08:29] Quiet mode. [01:08:29] ^-- Logging by 'JavaLogger [quiet=true, config=null]' [01:08:29] ^-- To see FULL console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat} [01:08:29] [01:08:30] OS: Linux 5.0.0-32-generic amd64 [01:08:30] VM information: OpenJDK Runtime Environment 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10 Private Build OpenJDK 64-Bit Server VM 25.222-b10 [01:08:30] Please set system property '-Djava.net.preferIPv4Stack=true' to avoid possible problems in mixed environments. [01:08:30] Initial heap size is 124MB (should be no less than 512MB, use -Xms512m -Xmx512m). [01:08:30] Configured plugins: [01:08:30] ^-- None [01:08:30] [01:08:30] Configured failure handler: [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=[SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]]] [01:08:30] Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides. [01:08:30] Security status [authentication=off, tls/ssl=off] [01:08:34] Persistence store is configured, but both read-through and write-through are disabled for cache: wanasis [01:08:34] Performance suggestions for grid (fix if possible) [01:08:34] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true [01:08:34] ^-- Enable G1 Garbage Collector (add '-XX:+UseG1GC' to JVM options) [01:08:34] ^-- Specify JVM heap max size (add '-Xmx [g|G|m|M|k|K]' to JVM options) [01:08:34] ^-- Set max direct memory size if getting 'OOME: Direct buffer memory' (add '-XX:MaxDirectMemorySize= [g|G|m|M|k|K]' to JVM options) [01:08:34] ^-- Disable processing of calls to System.gc() (add '-XX:+DisableExplicitGC' to JVM options) [01:08:34] Refer to this page for more performance suggestions: https://apacheignite.readme.io/docs/jvm-and-system-tuning [01:08:34] [01:08:34] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat} [01:08:34] Data Regions Configured: [01:08:34] ^-- default [initSize=256.0 MiB, maxSize=1.5 GiB, persistence=false] [01:08:34] [01:08:34] Ignite node started OK (id=a13fb078) [01:08:34] Topology snapshot [ver=1, locNode=a13fb078, servers=1, clients=0, state=ACTIVE, CPUs=4, offheap=1.5GB, heap=1.7GB] Nov 15, 2019 1:09:49 AM org.apache.ignite.logger.java.JavaLogger error SEVERE: Failed to execute job [jobId=c68c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86, ses=GridJobSessionImpl [ses=GridTaskSessionImpl [taskName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheJobV2, dep=LocalDeployment [super=GridDeployment [ts=1573776510740, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, clsLdrId=658c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86, userVer=0, loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, undeployed=false, usage=0]], taskClsName=o.a.i.i.processors.cache.GridCacheAdapter$LoadCacheJobV2, sesId=b68c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86, startTime=1573776519235, endTime=9223372036854775807, taskNodeId=a13fb078-fed3-426b-a312-6bc83349df86, clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=true, topPred=null, subjId=a13fb078-fed3-426b-a312-6bc83349df86, mapFut=IgniteFuture [orig=GridFutureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=730955696]], execName=null], jobId=c68c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86]] class org.apache.ignite.IgniteException: java.lang.NullPointerException at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1858) at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:568) at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6820) at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:562) at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:491) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1125) at org.apache.ignite.internal.processors.task.GridTaskWorker.sendRequest(GridTaskWorker.java:1420) at org.apache.ignite.internal.processors.task.GridTaskWorker.processMappedJobs(GridTaskWorker.java:666) at org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:538) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:764) at org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:452) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:449) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:420) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:404) at org.apache.ignite.internal.processors.cache.GridCacheAdapter.globalLoadCacheAsync(GridCacheAdapter.java:3869) at org.apache.ignite.internal.processors.cache.GridCacheAdapter.globalLoadCache(GridCacheAdapter.java:3842) at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.loadCache(IgniteCacheProxyImpl.java:298) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.loadCache(GatewayProtectedCacheProxy.java:275) at com.wanasis.ignite.Main.main(Main.java:77) Caused by: class org.apache.ignite.IgniteException: java.lang.NullPointerException at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1029) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJob.localExecute(GridCacheAdapter.java:5681) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJobV2.localExecute(GridCacheAdapter.java:5725) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$TopologyVersionAwareJob.execute(GridCacheAdapter.java:6361) at org.apache.ignite.compute.ComputeJobAdapter.call(ComputeJobAdapter.java:132) at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1855) ... 20 more Caused by: class org.apache.ignite.IgniteCheckedException: java.lang.NullPointerException at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:546) at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:630) at org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.localLoadCache(GridCacheProxyImpl.java:222) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJob.localExecute(GridCacheAdapter.java:5676) ... 24 more Caused by: javax.cache.integration.CacheLoaderException: java.lang.NullPointerException ... 28 more Caused by: java.lang.NullPointerException at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.getOrCreateCacheMappings(CacheAbstractJdbcStore.java:591) at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:691) at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:520) ... 27 more

Nov 15, 2019 1:10:02 AM org.apache.ignite.logger.java.JavaLogger error SEVERE: Failed to obtain remote job result policy for result from ComputeTask.result(..) method (will fail the whole task): GridJobResultImpl [job=C2 [c=LoadCacheJobV2 [keepBinary=false]], sib=GridJobSiblingImpl [sesId=b68c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86, jobId=c68c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86, nodeId=a13fb078-fed3-426b-a312-6bc83349df86, isJobDone=false], jobCtx=GridJobContextImpl [jobId=c68c36c6e61-a13fb078-fed3-426b-a312-6bc83349df86, timeoutObj=null, attrs={}], node=TcpDiscoveryNode [id=a13fb078-fed3-426b-a312-6bc83349df86, addrs=[0:0:0:0:0:0:0:1%lo, 127.0.0.1, 172.17.0.1, 192.168.1.108], sockAddrs=[/192.168.1.108:47500, /172.17.0.1:47500, /0:0:0:0:0:0:0:1%lo:47500, /127.0.0.1:47500], discPort=47500, order=1, intOrder=1, lastExchangeTime=1573776512431, loc=true, ver=2.7.6#20190911-sha1:21f7ca41, isClient=false], ex=class o.a.i.IgniteException: java.lang.NullPointerException, hasRes=true, isCancelled=false, isOccupied=true] class org.apache.ignite.IgniteException: Remote job threw user exception (override or implement ComputeTask.result(..) method if you would like to have automatic failover for this exception): java.lang.NullPointerException at org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:102) at org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1053) at org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1046) at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6852) at org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:1046) at org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:864) at org.apache.ignite.internal.processors.task.GridTaskWorker.processDelayedResponses(GridTaskWorker.java:713) at org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:544) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:764) at org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:452) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:449) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:420) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:404) at org.apache.ignite.internal.processors.cache.GridCacheAdapter.globalLoadCacheAsync(GridCacheAdapter.java:3869) at org.apache.ignite.internal.processors.cache.GridCacheAdapter.globalLoadCache(GridCacheAdapter.java:3842) at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.loadCache(IgniteCacheProxyImpl.java:298) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.loadCache(GatewayProtectedCacheProxy.java:275) at com.wanasis.ignite.Main.main(Main.java:77) Caused by: class org.apache.ignite.IgniteException: java.lang.NullPointerException at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1858) at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:568) at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6820) at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:562) at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:491) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1125) at org.apache.ignite.internal.processors.task.GridTaskWorker.sendRequest(GridTaskWorker.java:1420) at org.apache.ignite.internal.processors.task.GridTaskWorker.processMappedJobs(GridTaskWorker.java:666) at org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:538) ... 11 more Caused by: class org.apache.ignite.IgniteException: java.lang.NullPointerException at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1029) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJob.localExecute(GridCacheAdapter.java:5681) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJobV2.localExecute(GridCacheAdapter.java:5725) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$TopologyVersionAwareJob.execute(GridCacheAdapter.java:6361) at org.apache.ignite.compute.ComputeJobAdapter.call(ComputeJobAdapter.java:132) at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1855) ... 20 more Caused by: class org.apache.ignite.IgniteCheckedException: java.lang.NullPointerException at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:546) at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:630) at org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.localLoadCache(GridCacheProxyImpl.java:222) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJob.localExecute(GridCacheAdapter.java:5676) ... 24 more Caused by: javax.cache.integration.CacheLoaderException: java.lang.NullPointerException ... 28 more Caused by: java.lang.NullPointerException at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.getOrCreateCacheMappings(CacheAbstractJdbcStore.java:591) at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:691) at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:520) ... 27 more

Exception in thread "main" javax.cache.integration.CacheLoaderException: java.lang.NullPointerException at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:546) at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.localLoadCache(GridDhtCacheAdapter.java:630) at org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.localLoadCache(GridCacheProxyImpl.java:222) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJob.localExecute(GridCacheAdapter.java:5676) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$LoadCacheJobV2.localExecute(GridCacheAdapter.java:5725) at org.apache.ignite.internal.processors.cache.GridCacheAdapter$TopologyVersionAwareJob.execute(GridCacheAdapter.java:6361) at org.apache.ignite.compute.ComputeJobAdapter.call(ComputeJobAdapter.java:132) at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1855) at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:568) at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6820) at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:562) at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:491) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1125) at org.apache.ignite.internal.processors.task.GridTaskWorker.sendRequest(GridTaskWorker.java:1420) at org.apache.ignite.internal.processors.task.GridTaskWorker.processMappedJobs(GridTaskWorker.java:666) at org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:538) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:764) at org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:452) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:449) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:420) at org.apache.ignite.internal.processors.closure.GridClosureProcessor.callAsync(GridClosureProcessor.java:404) at org.apache.ignite.internal.processors.cache.GridCacheAdapter.globalLoadCacheAsync(GridCacheAdapter.java:3869) at org.apache.ignite.internal.processors.cache.GridCacheAdapter.globalLoadCache(GridCacheAdapter.java:3842) at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.loadCache(IgniteCacheProxyImpl.java:298) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.loadCache(GatewayProtectedCacheProxy.java:275) at com.wanasis.ignite.Main.main(Main.java:77) Caused by: java.lang.NullPointerException at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.getOrCreateCacheMappings(CacheAbstractJdbcStore.java:591) at org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.loadCache(CacheAbstractJdbcStore.java:691) at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadCache(GridCacheStoreManagerAdapter.java:520) ... 27 more 我的数据库包含一些数据,我不知道为什么会有这个空指针异常

缓存 安全 Java 关系型数据库 MySQL Shell Linux Apache 数据库 容器
分享到
取消 提交回答
全部回答(0)
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

推荐文章
相似问题
推荐课程