gridgain / gridgain-old

267 stars 85 forks source link

Visor error message mismatch? #25

Open ghost opened 10 years ago

ghost commented 10 years ago

I execute a query from the console that clearly fails. Visor shows this message in the error details

class org.gridgain.client.GridClientException: Fields query metadata is null.
    at org.gridgain.client.impl.connection.GridClientTcpConnection.handleClientResponse(GridClientTcpConnection.java:486)
    at org.gridgain.client.impl.connection.GridClientTcpConnection.handleResponse(GridClientTcpConnection.java:410)
    at org.gridgain.client.impl.connection.GridClientTcpConnection.access$1900(GridClientTcpConnection.java:45)
    at org.gridgain.client.impl.connection.GridClientTcpConnection$ConnectionHandler.channelRead(GridClientTcpConnection.java:1175)
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
    at org.gridgain.client.impl.connection.GridClientTcpConnection$PingHandler.channelRead(GridClientTcpConnection.java:1137)
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173)
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:478)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    at java.lang.Thread.run(Thread.java:744)

however the running node console clearly shows a more detailed explanation, clearly stating that the failure was caused by a syntax error. I am not including the full stacktrace, but here are the relevant parts...

[16:09:48,133][ERROR][gridgain-#27%sys-grid%][GridCacheDistributedQueryManager] <FACT_CACHE> Failed to run fields query [node=9e1e0c95-62f9-4f1d-bd71-99a1d26a434c, msg=Cannot parse "TIMESTAMP" constant "Sun Jan 01 00:00:00 EST 2012"; SQL statement:

[REMOVED]

Caused by: org.h2.jdbc.JdbcSQLException: Cannot parse "TIMESTAMP" constant "Sun Jan 01 00:00:00 EST 2012"; SQL statement:

[REMOVED]

    at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
    at org.h2.message.DbException.get(DbException.java:158)
    at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:87)
    at org.h2.value.Value.convertTo(Value.java:819)
    at org.h2.table.Table.compareTypeSave(Table.java:1044)
    at org.h2.index.BaseIndex.compareValues(BaseIndex.java:247)
    at org.h2.index.BaseIndex.compareRows(BaseIndex.java:179)
    at org.gridgain.grid.spi.indexing.h2.opt.GridH2Index$ComparableRow.compareTo(GridH2Index.java:547)
    at org.gridgain.grid.spi.indexing.h2.opt.GridH2Index$ComparableRow.compareTo(GridH2Index.java:529)
    at edu.stanford.ppl.concurrent.SnapTreeMap.boundedMax(SnapTreeMap.java:905)
    at edu.stanford.ppl.concurrent.SnapTreeMap.boundedExtreme(SnapTreeMap.java:835)
    at edu.stanford.ppl.concurrent.SnapTreeMap.access$15(SnapTreeMap.java:805)
    at edu.stanford.ppl.concurrent.SnapTreeMap$AbstractIter.<init>(SnapTreeMap.java:2069)
    at edu.stanford.ppl.concurrent.SnapTreeMap$EntryIter.<init>(SnapTreeMap.java:1992)
    at edu.stanford.ppl.concurrent.SnapTreeMap$EntryIter.<init>(SnapTreeMap.java:1986)
    at edu.stanford.ppl.concurrent.SnapTreeMap$SubMap$EntrySubSet.iterator(SnapTreeMap.java:2510)
    at java.util.AbstractMap$2$1.<init>(AbstractMap.java:378)
    at java.util.AbstractMap$2.iterator(AbstractMap.java:377)
    at org.gridgain.grid.spi.indexing.h2.opt.GridH2Index.doFind(GridH2Index.java:316)
    at org.gridgain.grid.spi.indexing.h2.opt.GridH2Index.find(GridH2Index.java:275)
    at org.h2.index.BaseIndex.find(BaseIndex.java:102)
    at org.h2.index.IndexCursor.find(IndexCursor.java:145)
    at org.h2.table.TableFilter.next(TableFilter.java:322)
    at org.h2.command.dml.Select.queryGroup(Select.java:311)
    at org.h2.command.dml.Select.queryWithoutCache(Select.java:613)
    at org.h2.command.dml.Query.query(Query.java:290)
    at org.h2.command.dml.Query.query(Query.java:277)
    at org.h2.command.dml.Query.query(Query.java:36)
    at org.h2.command.CommandContainer.query(CommandContainer.java:86)
    at org.h2.command.Command.executeQuery(Command.java:191)
    at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:109)
    at org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi.executeSqlQuery(GridH2IndexingSpi.java:815)
    at org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi.executeSqlQueryWithTimer(GridH2IndexingSpi.java:832)
    at org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi.queryFields(GridH2IndexingSpi.java:747)
    ... 10 more
Caused by: java.lang.IllegalArgumentException: Sun Jan 01 00:00:00 EST 2012
    at org.h2.util.DateTimeUtils.parseDateValue(DateTimeUtils.java:270)
    at org.h2.value.ValueTimestamp.parseTry(ValueTimestamp.java:105)
    at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:85)
    ... 41 more

I think the more detailed explanation should be shown in visor. the current message does little to help debug the problem

dsetrakyan commented 10 years ago

We are working on this issue. Will fix soon.