meridor / perspective-backend

Scalable multi-cloud management API and shell
Apache License 2.0
16 stars 6 forks source link

NPE in OrderTask #199

Closed vania-pooh closed 7 years ago

vania-pooh commented 7 years ago
2016-12-09 22:10:01,055 [             XNIO-1 I/O-4] INFO  org.meridor.perspective.rest.resources.InstancesResource     - Processing query #21 with sql = "select name, addresses, fqdn from instances order by fqdn, name" and parameters = []
2016-12-09 22:10:01,074 [             XNIO-1 I/O-4] DEBUG org.meridor.perspective.sql.impl.QueryProcessorImpl          - Marking query as having evaluation error
java.sql.SQLException: java.lang.NullPointerException
    at org.meridor.perspective.sql.impl.task.OrderTask.execute(OrderTask.java:56)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl.executeTasks(QueryProcessorImpl.java:102)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl.executeTasks(QueryProcessorImpl.java:102)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl.processQuery(QueryProcessorImpl.java:66)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl.access$000(QueryProcessorImpl.java:27)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl$1.load(QueryProcessorImpl.java:41)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl$1.load(QueryProcessorImpl.java:39)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
    at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
    at org.meridor.perspective.sql.impl.QueryProcessorImpl.process(QueryProcessorImpl.java:50)
    at org.meridor.perspective.rest.resources.QueryResource.lambda$query$4(QueryResource.java:50)
    at org.meridor.perspective.rest.resources.QueryResource$$Lambda$197/1979261685.apply(Unknown Source)
    at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.meridor.perspective.rest.resources.QueryResource.query(QueryResource.java:51)
    at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl.lambda$null$46(HandlerProviderImpl.java:173)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl$$Lambda$192/877614776.accept(Unknown Source)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl.lambda$getBody$50(HandlerProviderImpl.java:298)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl$$Lambda$193/791129410.handle(Unknown Source)
    at io.undertow.io.AsyncReceiverImpl.receiveFullBytes(AsyncReceiverImpl.java:399)
    at io.undertow.io.AsyncReceiverImpl.receiveFullBytes(AsyncReceiverImpl.java:481)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl.getBody(HandlerProviderImpl.java:291)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl.lambda$getHandler$47(HandlerProviderImpl.java:168)
    at org.meridor.perspective.rest.handler.impl.HandlerProviderImpl$$Lambda$26/1167327028.handleRequest(Unknown Source)
    at io.undertow.server.RoutingHandler.handleRequest(RoutingHandler.java:93)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
    at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:243)
    at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:134)
    at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:58)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:559)
Caused by: java.lang.NullPointerException
    at java.lang.String.compareTo(String.java:1143)
    at java.lang.String.compareTo(String.java:111)
    at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
    at java.util.Comparator$$Lambda$233/714357917.compare(Unknown Source)
    at java.util.Comparator.lambda$thenComparing$36697e65$1(Comparator.java:216)
    at java.util.Comparator$$Lambda$234/16023101.compare(Unknown Source)
    at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351)
    at java.util.TimSort.sort(TimSort.java:230)
    at java.util.Arrays.sort(Arrays.java:1512)
    at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:348)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.meridor.perspective.sql.impl.task.OrderTask$1.lambda$new$109(OrderTask.java:48)
    at org.meridor.perspective.sql.impl.task.OrderTask$1$$Lambda$235/347611185.apply(Unknown Source)
    at org.meridor.perspective.sql.DataContainer.<init>(DataContainer.java:38)
    at org.meridor.perspective.sql.impl.task.OrderTask$1.<init>(OrderTask.java:45)
    at org.meridor.perspective.sql.impl.task.OrderTask.execute(OrderTask.java:41)
    ... 46 more
vania-pooh commented 7 years ago

Seems to be caused by null value in column.