Hello, It looks strange. Could you share full example (how maven project)? Which version of apache ignite do you use?
On Sat, Jun 10, 2017 at 1:14 PM, Reshma Bochare <[email protected]> wrote: > Same thing works fine if executed at server side > > > > *From:* Reshma Bochare > *Sent:* Friday, June 09, 2017 4:21 PM > *To:* '[email protected]' <[email protected]> > *Subject:* QueryCursor.iterator() hanges forever > > > > Hi, > > I am getting below error when iterated over QueryCursor. > > > > > > [2017-06-09 > 16:12:58,947][ERROR][grid-nio-worker-2-#11%null%][GridDirectParser] > Failed to read message [msg=GridIoMessage [plc=0, topic=null, topicOrd=-1, > ordered=false, timeout=0, skipOnTimeout=false, msg=null], > buf=java.nio.DirectByteBuffer[pos=2 lim=145 cap=32768], > reader=DirectMessageReader [state=DirectMessageState [pos=0, > stack=[StateItem [stream=DirectByteBufferStreamImplV2 > [buf=java.nio.DirectByteBuffer[pos=2 > lim=145 cap=32768], baseOff=1356327248, arrOff=-1, tmpArrOff=0, > tmpArrBytes=0, msgTypeDone=false, msg=null, mapIt=null, it=null, arrPos=-1, > keyDone=false, readSize=-1, readItems=0, prim=0, primShift=0, uuidState=0, > uuidMost=0, uuidLeast=0, uuidLocId=0, lastFinished=true], state=0], null, > null, null, null, null, null, null, null, null]], lastRead=false], > ses=GridSelectorNioSessionImpl [selectorIdx=2, queueSize=0, > writeBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768], > readBuf=java.nio.DirectByteBuffer[pos=2 lim=145 cap=32768], > recovery=GridNioRecoveryDescriptor > [acked=23, resendCnt=0, rcvCnt=17, sentCnt=23, reserved=true, lastAck=16, > nodeLeft=false, node=TcpDiscoveryNode > [id=69869e5b-703f-4a86-8ad9-12fd06dfe624, > addrs=[0:0:0:0:0:0:0:1, **.**.*.**, 127.0.0.1], > sockAddrs=[IND-*******.****.***/**.**.8.76:0, /0:0:0:0:0:0:0:1:0, / > 127.0.0.1:0], discPort=0, order=2, intOrder=2, lastExchangeTime=1497004966182, > loc=false, ver=1.8.0#20161205-sha1:9ca40dbe, isClient=true], > connected=true, connectCnt=2, queueLimit=5120, reserveCnt=7], > super=GridNioSessionImpl [locAddr=/0:0:0:0:0:0:0:1:47100, > rmtAddr=/0:0:0:0:0:0:0:1:50946, createTime=1497004978927, closeTime=0, > bytesSent=26, bytesRcvd=182, sndSchedTime=1497004978927, > lastSndTime=1497004978927, lastRcvTime=1497004978947, readsPaused=false, > filterChain=FilterChain[filters=[GridNioCodecFilter > [parser=o.a.i.i.util.nio.GridDirectParser@d1411b, directMode=true], > GridConnectionBytesVerifyFilter], accepted=true]]] > > class org.apache.ignite.IgniteException: Invalid message type: -33 > > at org.apache.ignite.internal.managers.communication. > GridIoMessageFactory.create(GridIoMessageFactory.java:805) > > at org.apache.ignite.spi.communication.tcp. > TcpCommunicationSpi$5.create(TcpCommunicationSpi.java:1631) > > at org.apache.ignite.internal.direct.stream.v2. > DirectByteBufferStreamImplV2.readMessage(DirectByteBufferStreamImplV2. > java:1144) > > at org.apache.ignite.internal.direct.DirectMessageReader. > readMessage(DirectMessageReader.java:311) > > at org.apache.ignite.internal.managers.communication. > GridIoMessage.readFrom(GridIoMessage.java:254) > > at org.apache.ignite.internal.util.nio.GridDirectParser. > decode(GridDirectParser.java:84) > > at org.apache.ignite.internal.util.nio.GridNioCodecFilter. > onMessageReceived(GridNioCodecFilter.java:104) > > at org.apache.ignite.internal. > util.nio.GridNioFilterAdapter.proceedMessageReceived( > GridNioFilterAdapter.java:107) > > at org.apache.ignite.internal.util.nio. > GridConnectionBytesVerifyFilter.onMessageReceived( > GridConnectionBytesVerifyFilter.java:123) > > at org.apache.ignite.internal. > util.nio.GridNioFilterAdapter.proceedMessageReceived( > GridNioFilterAdapter.java:107) > > at org.apache.ignite.internal.util.nio.GridNioServer$ > HeadFilter.onMessageReceived(GridNioServer.java:2332) > > at org.apache.ignite.internal.util.nio.GridNioFilterChain. > onMessageReceived(GridNioFilterChain.java:173) > > at org.apache.ignite.internal.util.nio.GridNioServer$ > DirectNioClientWorker.processRead(GridNioServer.java:918) > > at org.apache.ignite.internal.util.nio.GridNioServer$ > AbstractNioClientWorker.processSelectedKeysOptimized( > GridNioServer.java:1583) > > at org.apache.ignite.internal.util.nio.GridNioServer$ > AbstractNioClientWorker.bodyInternal(GridNioServer.java:1516) > > at org.apache.ignite.internal.util.nio.GridNioServer$ > AbstractNioClientWorker.body(GridNioServer.java:1289) > > at org.apache.ignite.internal.util.worker.GridWorker.run( > GridWorker.java:110) > > at java.lang.Thread.run(Unknown Source) > > > > > > Configuration is as below: > > > > <*bean **id=**"igniteClientConfiguration" **class=* > *"org.apache.ignite.configuration.IgniteConfiguration"*> > <*property **name=**"cacheConfiguration"*> > <*list*> > > *<!-- Partitioned cache example configuration (Atomic mode). --> > *<*bean **class=* > *"org.apache.ignite.configuration.CacheConfiguration"*> > <*property **name=**"atomicityMode" **value=**"ATOMIC"*/> > <*property **name=**"offHeapMaxMemory" **value=**"0"*/> > </*bean*> > </*list*> > </*property*> > <*property **name=**"clientMode" **value=**"true"*/> > <*property **name=**"gridLogger"*> > <*bean **class=**"org.apache.ignite.logger.log4j.Log4JLogger"*> > <*constructor-arg **type=**"java.lang.String" **value=* > *"config/igniteClientLogBack.xml"*/> > </*bean*> > </*property*> > > > *<!-- Explicitly configure TCP discovery SPI to provide list of initial > nodes. --> *<*property **name=**"discoverySpi"*> > <*bean **class=* > *"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"*> > <*property **name=**"ipFinder"*> > > <*bean **class=* > *"org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"* > > > <*property **name=**"addresses"*> > <*list*> > > *<!-- In distributed environment, replace with actual host IP address. --> > *<*value*>127.0.0.1:47500..47509</*value*> > </*list*> > </*property*> > </*bean*> > </*property*> > </*bean*> > </*property*> > > > *<!-- *</*bean*> > > > > Calling code > > CacheConfiguration cacheConfiguration = *new *CacheConfiguration(somekey); > cacheConfiguration.setIndexedTypes(String.*class*, IgniteDataStore.*class*); > > IgniteCache<String, IgniteDataStore> dataCache //get from cache > > > > SqlFieldsQuery sqlFieldsQuery = *new *SqlFieldsQuery(“select field1, field2 > from IgniteDataStore”); > > QueryCursor<List<?>> cursor = dataCache.query(sqlFieldsQuery); > > *for *(List<?> row : cursor) //Code hangs here and above error is thrown. > System.*out*.println(*"Full name: " *+ row.get(0)); > > > > Note: without calling sqlQuery, dataCache. iterator() works fine > > > > Thanks, > > Reshma > > > > > > > > >
