[ 
https://issues.apache.org/jira/browse/IGNITE-20943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Henderson updated IGNITE-20943:
------------------------------------
    Affects Version/s: 2.14

> IndexQuery requires custom key and value Java objects on classpath for thin 
> clients but not fat clients
> -------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-20943
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20943
>             Project: Ignite
>          Issue Type: Bug
>          Components: binary, thin client
>    Affects Versions: 2.14, 2.15
>         Environment: v2.15.0
> Java 1.8+
> Three nodes
> SSL enabled
> Native persistence
> Custom network timeout values
> RestartProcessFailureHandler
> Custom SegmentationPluginProvider
>  
>            Reporter: Gary Henderson
>            Priority: Major
>
> When performing index queries from thin clients, the Ignite node always 
> attempts to deserialise the key and value pairs internally before returning 
> data to the thin client and thus requires the key and value Java objects to 
> be available on the node's classpath but this is not the case for fat clients 
> - only the client itself needs to have access to the Java objects.
> The fat client behaviour is the expected behaviour because this matches the 
> normal ScanQuery behaviour for both fat and thin clients.
> Current workarounds: switch to fat client or add Java objects to server 
> classpath. 
> Example exception in Ignite server logs:
> [2023-09-08T12:29:23,405][WARN 
> ][client-connector-#76531][ClientListenerNioListener] Failed to process 
> client request 
> [req=o.a.i.i.processors.platform.client.cache.ClientCacheIndexQueryRequest@28ab5691,
>  msg=com.company.common.dto.OnlineInterfacesPrimaryKey]
> org.apache.ignite.binary.BinaryInvalidTypeException: 
> com.company.common.dto.OnlineInterfacesPrimaryKey
>         at 
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:719)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1772)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1731)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:822)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:151)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.CacheObjectUtils.unwrapBinary(CacheObjectUtils.java:199)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.CacheObjectUtils.unwrapBinaryIfNeeded(CacheObjectUtils.java:69)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:138)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1784)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.unwrapIfNeeded(GridCacheQueryFutureAdapter.java:353)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter.next(GridCacheQueryFutureAdapter.java:153)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl$5.onHasNext(IgniteCacheProxyImpl.java:610)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.GridCloseableIteratorAdapter.hasNextX(GridCloseableIteratorAdapter.java:56)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(GridIteratorAdapter.java:45)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.cache.AutoClosableCursorIterator.hasNext(AutoClosableCursorIterator.java:49)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheQueryCursor.writePage(ClientCacheQueryCursor.java:76)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheQueryResponse.encode(ClientCacheQueryResponse.java:51)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.platform.client.ClientMessageParser.encode(ClientMessageParser.java:716)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:215)
>  [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:55)
>  [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
>  [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
>  [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
>  [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) 
> [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
>  [ignite-core-2.14.0.jar:2.14.0]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  [?:1.8.0_331]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  [?:1.8.0_331]
>         at java.lang.Thread.run(Thread.java:750) [?:1.8.0_331]
> Caused by: java.lang.ClassNotFoundException: 
> com.company.common.dto.OnlineInterfacesPrimaryKey
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:387) 
> ~[?:1.8.0_331]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:418) 
> ~[?:1.8.0_331]
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) 
> ~[?:1.8.0_331]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:351) 
> ~[?:1.8.0_331]
>         at java.lang.Class.forName0(Native Method) ~[?:1.8.0_331]
>         at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_331]
>         at 
> org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:9249) 
> ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:9187) 
> [ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:384)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         at 
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:695)
>  ~[ignite-core-2.14.0.jar:2.14.0]
>         ... 27 more



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to