Ah, knew it had to be smthg I missed. Thanks for the explaination and example.
/hw ti., 27.06.2017 kl. 06.42 -0700, skrev afedotov: > Hi Helge, > > The problem is that the filter passed to the ScanQuery is executed on > the server nodes as is and since these nodes > have DynaFormModel class only in binary form they are not able to > operate on it directly from the code. > Hence you need to pass a filter which will operate on BinaryObjects > like that > > try (QueryCursor<Cache.Entry<String, BinaryObject>> cursor = > cache.withKeepBinary().query(new ScanQuery<String, > BinaryObject>((k, v) -> k.startsWith("666"))) > ) { > cursor.forEach(entry -> { > // Do your thing > }); > } > > Kind regards, > Alex. > > On Tue, Jun 27, 2017 at 11:57 AM, Helge Waastad [via Apache Ignite > Users] <[hidden email]> wrote: > > Hi, > > I might do this the wrong way but storing and fetching a third > > party object from cache using peer classloading works fine, but > > running scanquery: > > > > try (QueryCursor cursor = cache.query(new ScanQuery<String, > > DynaFormModel>((k, p) -> k.startsWith(id)))) { } > > > > returns: > > > > > > class org.apache.ignite.binary.BinaryInvalidTypeException: > > org.primefaces.extensions.model.dynaform.DynaFormModel > > at > > org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId > > (BinaryContext.java:701) > > at > > org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(B > > inaryReaderExImpl.java:1745) > > at > > org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(Bi > > naryReaderExImpl.java:1704) > > at > > org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue > > (BinaryObjectImpl.java:794) > > at > > org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObje > > ctImpl.java:142) > > at > > org.apache.ignite.internal.processors.cache.CacheObjectContext.unwr > > apBinary(CacheObjectContext.java:273) > > at > > org.apache.ignite.internal.processors.cache.CacheObjectContext.unwr > > apBinaryIfNeeded(CacheObjectContext.java:161) > > at > > org.apache.ignite.internal.processors.cache.CacheObjectContext.unwr > > apBinaryIfNeeded(CacheObjectContext.java:148) > > at > > org.apache.ignite.internal.processors.cache.GridCacheContext.unwrap > > BinaryIfNeeded(GridCacheContext.java:1730) > > at > > org.apache.ignite.internal.processors.cache.query.GridCacheQueryMan > > ager$PeekValueExpiryAwareIterator.advance(GridCacheQueryManager.jav > > a:2998) > > at > > org.apache.ignite.internal.processors.cache.query.GridCacheQueryMan > > ager$PeekValueExpiryAwareIterator.onHasNext(GridCacheQueryManager.j > > ava:2924) > > at > > org.apache.ignite.internal.util.GridCloseableIteratorAdapter.hasNex > > tX(GridCloseableIteratorAdapter.java:53) > > at > > org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(Gr > > idIteratorAdapter.java:45) > > at > > org.apache.ignite.internal.processors.cache.query.GridCacheQueryMan > > ager.runQuery(GridCacheQueryManager.java:1189) > > at > > org.apache.ignite.internal.processors.cache.query.GridCacheDistribu > > tedQueryManager.processQueryRequest(GridCacheDistributedQueryManage > > r.java:231) > > at > > org.apache.ignite.internal.processors.cache.query.GridCacheDistribu > > tedQueryManager$2.apply(GridCacheDistributedQueryManager.java:109) > > at > > org.apache.ignite.internal.processors.cache.query.GridCacheDistribu > > tedQueryManager$2.apply(GridCacheDistributedQueryManager.java:107) > > at > > org.apache.ignite.internal.processors.cache.GridCacheIoManager.proc > > essMessage(GridCacheIoManager.java:863) > > at > > org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMe > > ssage0(GridCacheIoManager.java:386) > > at > > org.apache.ignite.internal.processors.cache.GridCacheIoManager.hand > > leMessage(GridCacheIoManager.java:308) > > at > > org.apache.ignite.internal.processors.cache.GridCacheIoManager.acce > > ss$000(GridCacheIoManager.java:100) > > at > > org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.on > > Message(GridCacheIoManager.java:253) > > at > > org.apache.ignite.internal.managers.communication.GridIoManager.inv > > okeListener(GridIoManager.java:1257) > > at > > org.apache.ignite.internal.managers.communication.GridIoManager.pro > > cessRegularMessage0(GridIoManager.java:885) > > at > > org.apache.ignite.internal.managers.communication.GridIoManager.acc > > ess$2100(GridIoManager.java:114) > > at > > org.apache.ignite.internal.managers.communication.GridIoManager$7.r > > un(GridIoManager.java:802) > > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto > > r.java:1142) > > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut > > or.java:617) > > at java.lang.Thread.run(Thread.java:748) > > Caused by: java.lang.ClassNotFoundException: > > org.primefaces.extensions.model.dynaform.DynaFormModel > > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > at > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > at java.lang.Class.forName0(Native Method) > > at java.lang.Class.forName(Class.java:348) > > at > > org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.jav > > a:8478) > > at > > org.apache.ignite.internal.MarshallerContextImpl.getClass(Marshalle > > rContextImpl.java:340) > > at > > org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId > > (BinaryContext.java:692) > > > > > > > > > > ma., 26.06.2017 kl. 09.11 -0700, skrev afedotov: > > > Hi, could you please describe your case and elaborate a bit on > > > your concern. > > > > > > Kind regards, > > > Alex. > > > > > > On Fri, Jun 23, 2017 at 1:17 PM, Helge Waastad [via Apache Ignite > > > Users] <[hidden email]> wrote: > > > > Hi, > > > > Is it correct that scanquery will not work using Peer > > > > classloading? > > > > > > > > If so, will this ever be possible? > > > > > > > > /hw > > > > > > > > Sendt fra min iPhone > > > > > > > > > > > > If you reply to this email, your message will be added to the > > > > discussion below: > > > > http://apache-ignite-users.70518.x6.nabble.com/Scanquery-and-Pe > > > > er-classloading-tp14061.html > > > > To start a new topic under Apache Ignite Users, email [hidden > > > > email] > > > > To unsubscribe from Apache Ignite Users, click here. > > > > NAML > > > > > > > View this message in context: Re: Scanquery and Peer classloading > > > Sent from the Apache Ignite Users mailing list archive at > > > Nabble.com. > > > > If you reply to this email, your message will be added to the > > discussion below: > > http://apache-ignite-users.70518.x6.nabble.com/Scanquery-and-Peer-c > > lassloading-tp14061p14093.html > > To start a new topic under Apache Ignite Users, email [hidden > > email] > > To unsubscribe from Apache Ignite Users, click here. > > NAML > > > > View this message in context: Re: Scanquery and Peer classloading > Sent from the Apache Ignite Users mailing list archive at Nabble.com.