Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14856

"Failed to resolve class name" on server when cache with indexed types is defined on client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.10, 2.11
    • 2.11
    • binary
    • None
    • Fixed "Failed to resolve class name" on server when cache with indexed types is defined on client

    Description

      Please see attached reproducer test ( org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest#testClientCcfgIndexedGetClosure)

      If an indexed types cache is defined on client node's configuration but not server, client may put values into cache but server cannot read them despite having class on its classpath:

      [2021-06-09 16:00:33,611][ERROR][pub-#229%client%][GridJobWorker] Failed to execute job [jobId=7992cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739, ses=GridJobSessionImpl [ses=GridTaskSessionImpl [taskName=o.a.i.i.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2, dep=LocalDeployment [super=GridDeployment [ts=1623243633290, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, clsLdrId=8092cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739, userVer=0, loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, undeployed=false, usage=0]], taskClsName=o.a.i.i.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2, sesId=6992cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739, startTime=1623243633569, endTime=9223372036854775807, taskNodeId=749bd94c-cbeb-460d-a0d9-cba5d7a37739, clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=false, topPred=null, subjId=749bd94c-cbeb-460d-a0d9-cba5d7a37739, mapFut=IgniteFuture [orig=GridFutureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=1341412812]], execName=null], jobId=7992cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739]]
      class org.apache.ignite.IgniteException: class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1849)
      	at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:590)
      	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7181)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:584)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:511)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:119)
      	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: javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1265)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.cacheException(IgniteCacheProxyImpl.java:2078)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.get(IgniteCacheProxyImpl.java:1105)
      	at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.get(GatewayProtectedCacheProxy.java:637)
      	at org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2.call(IgniteMarshallerCacheSeparateDirectoryTest.java:188)
      	at org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2.call(IgniteMarshallerCacheSeparateDirectoryTest.java:185)
      	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1846)
      	... 8 more
      Caused by: class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7792)
      	at org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:268)
      	at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:180)
      	at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:149)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get0(GridCacheAdapter.java:4368)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:4343)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:1429)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.get(IgniteCacheProxyImpl.java:1102)
      	... 12 more
      Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:697)
      	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1765)
      	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1724)
      	at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:904)
      	at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:167)
      	at org.apache.ignite.internal.processors.cache.CacheObjectUtils.unwrapBinary(CacheObjectUtils.java:198)
      	at org.apache.ignite.internal.processors.cache.CacheObjectUtils.unwrapBinaryIfNeeded(CacheObjectUtils.java:77)
      	at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:161)
      	at org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1785)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.setResult(GridPartitionedSingleGetFuture.java:802)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.localGet(GridPartitionedSingleGetFuture.java:585)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.tryLocalGet(GridPartitionedSingleGetFuture.java:463)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.mapKeyToNode(GridPartitionedSingleGetFuture.java:428)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.map(GridPartitionedSingleGetFuture.java:302)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.init(GridPartitionedSingleGetFuture.java:257)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.getAsync0(GridDhtAtomicCache.java:1431)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$1600(GridDhtAtomicCache.java:151)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$16.apply(GridDhtAtomicCache.java:485)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$16.apply(GridDhtAtomicCache.java:483)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:774)
      	at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.getAsync(GridDhtAtomicCache.java:483)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get0(GridCacheAdapter.java:4362)
      	... 15 more
      Caused by: java.lang.ClassNotFoundException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:408)
      	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:333)
      	at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:320)
      	at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:673)
      	... 36 more
      [2021-06-09 16:00:33,616][ERROR][pub-#229%client%][GridTaskWorker] Failed to obtain remote job result policy for result from ComputeTask.result(..) method (will fail the whole task): GridJobResultImpl [job=C2 [c=o.a.i.i.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2@6f899431], sib=GridJobSiblingImpl [sesId=6992cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739, jobId=7992cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739, nodeId=749bd94c-cbeb-460d-a0d9-cba5d7a37739, isJobDone=false], jobCtx=GridJobContextImpl [jobId=7992cd0f971-749bd94c-cbeb-460d-a0d9-cba5d7a37739, timeoutObj=null, attrs=HashMap {}], node=TcpDiscoveryNode [id=749bd94c-cbeb-460d-a0d9-cba5d7a37739, consistentId=127.0.0.1:47501, addrs=ArrayList [127.0.0.1], sockAddrs=HashSet [/127.0.0.1:47501], discPort=47501, order=2, intOrder=2, lastExchangeTime=1623243633569, loc=true, ver=8.8.127#20210609-sha1:00000000, isClient=false], ex=class o.a.i.IgniteException: class o.a.i.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999], 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): class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:101)
      	at org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1061)
      	at org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1054)
      	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7213)
      	at org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:1054)
      	at org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:861)
      	at org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:1163)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.finishJob(GridJobWorker.java:955)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.finishJob(GridJobWorker.java:803)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:653)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:511)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:119)
      	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: class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1849)
      	at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:590)
      	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7181)
      	at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:584)
      	... 5 more
      Caused by: javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1265)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.cacheException(IgniteCacheProxyImpl.java:2078)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.get(IgniteCacheProxyImpl.java:1105)
      	at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.get(GatewayProtectedCacheProxy.java:637)
      	at org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2.call(IgniteMarshallerCacheSeparateDirectoryTest.java:188)
      	at org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheSeparateDirectoryTest$2.call(IgniteMarshallerCacheSeparateDirectoryTest.java:185)
      	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1846)
      	... 8 more
      Caused by: class org.apache.ignite.IgniteCheckedException: Failed to resolve class name [platformId=0, platform=Java, typeId=1438082999]
      	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7792)
      	at org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:268)
      	at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:180)
      	at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:149)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get0(GridCacheAdapter.java:4368)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:4343)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:1429)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.get(IgniteCacheProxyImpl.java:1102)
      	... 12 more
      Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException: Failed to r...
      

      Attachments

        Issue Links

          Activity

            People

              ptupitsyn Pavel Tupitsyn
              ilyak Ilya Kasnacheev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m