ignite客户端调用报错 Ignite instance with provided name doesn't exist

Disconnected from the target VM, address: '127.0.0.1:58990', transport: 'socket'
Exception in thread "main" 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): Ignite instance with provided name doesn't exist. Did you call Ignition.start(..) to start an Ignite instance? [name=ignite-baodao]
    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:6848)
    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.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:1081)
    at org.apache.ignite.internal.processors.task.GridTaskProcessor$JobMessageListener.onMessage(GridTaskProcessor.java:1316)
    at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1569)
    at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1197)
    at org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:127)
    at org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1093)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: class org.apache.ignite.IgniteException: Ignite instance with provided name doesn't exist. Did you call Ignition.start(..) to start an Ignite instance? [name=ignite-baodao]
    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:6816)
    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:1191)
    at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:1923)
    ... 7 more
Caused by: class org.apache.ignite.IgniteIllegalStateException: Ignite instance with provided name doesn't exist. Did you call Ignition.start(..) to start an Ignite instance? [name=ignite-baodao]
    at org.apache.ignite.internal.IgnitionEx.grid(IgnitionEx.java:1390)
    at org.apache.ignite.Ignition.ignite(Ignition.java:531)
    at com.rayfay.ignite.function.LoadCacheFunction.call(LoadCacheFunction.java:26)
    at com.rayfay.ignite.function.LoadCacheFunction.call(LoadCacheFunction.java:14)
    at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1855)

 

主要原因是在 IgniteCallable 实现类中,获取 Ignite 实例使用了名字,而启动的时候,没有设置名字

Ignite ignite = Ignition.ignite("ignite-bao");

启动的时候,加上 

<property name="igniteInstanceName" value="ignite-bao"/>

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值