You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Fedorenkov (Jira)" <ji...@apache.org> on 2021/08/04 21:29:00 UTC

[jira] [Created] (IGNITE-15256) ClassNotFoundException on attempt to invoke service method from Java ThinClient after cluster failover

Ivan Fedorenkov created IGNITE-15256:
----------------------------------------

             Summary: ClassNotFoundException on attempt to invoke service method from Java ThinClient after cluster failover
                 Key: IGNITE-15256
                 URL: https://issues.apache.org/jira/browse/IGNITE-15256
             Project: Ignite
          Issue Type: Bug
          Components: thin client
    Affects Versions: 2.10
            Reporter: Ivan Fedorenkov
            Assignee: Ivan Fedorenkov


Say, we have a thin client that uses some ignite service. This service exposes a method with an Externalizable input parameter. If cluster fails over after some period of successful interactions between the cluster and the client the following exception could be observed in cluster logs:
{code:java}
[2021-08-04 23:22:44,695][ERROR][client-connector-#114%client.ReliabilityTest%][ClientListenerNioListener] Failed to parse client request.
class org.apache.ignite.binary.BinaryObjectException: Failed to unmarshal object with optimized marshaller
	at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1819)
	at org.apache.ignite.internal.binary.BinaryUtils.unmarshal(BinaryUtils.java:2034)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.readObjectDetached(BinaryReaderExImpl.java:1341)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.readObjectDetached(BinaryReaderExImpl.java:1336)
	at org.apache.ignite.internal.processors.platform.client.service.ClientServiceInvokeRequest.<init>(ClientServiceInvokeRequest.java:126)
	at org.apache.ignite.internal.processors.platform.client.ClientMessageParser.decode(ClientMessageParser.java:486)
	at org.apache.ignite.internal.processors.platform.client.ClientMessageParser.decode(ClientMessageParser.java:311)
	at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:164)
	at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:55)
	at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
	at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
	at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125)
	at org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
	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.internal.marshaller.optimized.OptimizedMarshallerInaccessibleClassException: Failed to find class with given class loader for unmarshalling (make sure same versions of all classes are available on all nodes or enable peer-class-loading) [clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, cls=Failed to resolve class name [platformId=0, platform=Java, typeId=-771474336]]
	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:257)
	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:225)
	at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:92)
	at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1816)
	... 16 more
Caused by: java.lang.ClassNotFoundException: Failed to resolve class name [platformId=0, platform=Java, typeId=-771474336]
	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:459)
	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:384)
	at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:371)
	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.descriptorFromCache(OptimizedMarshallerUtils.java:329)
	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.classDescriptor(OptimizedMarshallerUtils.java:274)
	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:348)
	at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:205)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:494)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:461)
	at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:251)
	... 19 more
[2021-08-04 23:22:44,698][WARN ][grid-nio-worker-client-listener-0-#90%client.ReliabilityTest%][ClientListenerProcessor] Failed to shutdown socket: null
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:796)
	at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:423)
	at org.apache.ignite.internal.util.IgniteUtils.close(IgniteUtils.java:4234)
	at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.closeKey(GridNioServer.java:2784)
	at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2835)
	at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2794)
	at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2157)
	at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1910)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125)
	at java.lang.Thread.run(Thread.java:748) {code}
Root cause: client believes that it has registered the type within the cluster, but cluster can loose this information after failover if its working directory gets erased.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)