[ https://issues.apache.org/jira/browse/LENS-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Archana H closed LENS-1157. --------------------------- > Execute with timeout fails to read metadata when user requests streamed > results > ------------------------------------------------------------------------------- > > Key: LENS-1157 > URL: https://issues.apache.org/jira/browse/LENS-1157 > Project: Apache Lens > Issue Type: Bug > Reporter: Puneet Gupta > Assignee: Puneet Gupta > Fix For: 2.6 > > Attachments: lens-1157.01.patch > > > This happens when > 1. EXECUTE_WITH_TIMEOUT options is used to execute a query > 2. server persistence is enabled > 3. Query returns zero rows (within timeout) > {noformat} > apache.lens.driver.jdbc.JDBCResultSet - Error getting JDBC type information: > INTERNAL_SERVER_ERROR > 1308 org.apache.lens.server.api.error.LensException: INTERNAL_SERVER_ERROR > 1309 at > org.apache.lens.driver.jdbc.JDBCResultSet.getRsMetadata(JDBCResultSet.java:89) > ~[lens-driver-jdbc-2.6.5-inm.jar:2.6.5-inm] > 1310 at > org.apache.lens.driver.jdbc.JDBCResultSet.getMetadata(JDBCResultSet.java:112) > ~[lens-driver-jdbc-2.6.5-inm.jar:2.6.5-inm] > 1311 at > org.apache.lens.server.api.driver.PartiallyFetchedInMemoryResultSet.getMetadata(PartiallyFetchedInMemoryResultSet.java:154) > [lens-server-api-2.6.5-inm.jar:2.6.5-inm] > 1312 at > org.apache.lens.server.query.QueryExecutionServiceImpl.executeTimeoutInternal(QueryExecutionServiceImpl.java:2068) > [classes/:na] > 1313 at > org.apache.lens.server.query.QueryExecutionServiceImpl.execute(QueryExecutionServiceImpl.java:2009) > [classes/:na] > 1314 at > org.apache.lens.server.query.QueryServiceResource.query(QueryServiceResource.java:234) > [classes/:na] > 1315 at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) > ~[na:na] > 1316 at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[na:1.8.0_72] > 1317 at java.lang.reflect.Method.invoke(Method.java:498) > ~[na:1.8.0_72] > 1318 at > org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) > [jersey-server-2.22.1.jar:na] > 1319 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) > [jersey-server-2.22.1.jar:na] > 1320 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) > [jersey-server-2.22.1.jar:na] > 1321 at > org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) > [jersey-server-2.22.1.jar:na] > 1322 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) > [jersey-server-2.22.1.jar:na] > 1323 at > org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) > [jersey-server-2.22.1.jar:na] > 1324 at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) > [jersey-server-2.22.1.jar:na] > 1325 at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) > [jersey-server-2.22.1.jar:na] > 1326 at > org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) > [jersey-server-2.22.1.jar:na] > 1327 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) > [jersey-common-2.22.1.jar:na] > 1328 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) > [jersey-common-2.22.1.jar:na] > 1329 at org.glassfish.jersey.internal.Errors.process(Errors.java:315) > [jersey-common-2.22.1.jar:na] > 1330 at org.glassfish.jersey.internal.Errors.process(Errors.java:297) > [jersey-common-2.22.1.jar:na] > 1331 at org.glassfish.jersey.internal.Errors.process(Errors.java:267) > [jersey-common-2.22.1.jar:na] > 1332 at > org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) > [jersey-common-2.22.1.jar:na] > 1333 at > org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) > [jersey-server-2.22.1.jar:na] > 1334 at > org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) > [jersey-server-2.22.1.jar:na] > 1335 at > org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) > [jersey-container-grizzly2-http-2.22.1.jar:na] > 1336 at > org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) > [grizzly-http-server-2.3.23.jar:2.3.23] > 1337 at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) > [grizzly-framework-2.3.23.jar:2.3.23] > 1338 at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) > [grizzly-framework-2.3.23.jar:2.3.23] > 1339 at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72] > 1340 Caused by: java.sql.SQLException: You can't operate on a closed > ResultSet!!! > 1341 at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118) > ~[mchange-commons-java-0.2.9.jar:0.2.9] > 1342 at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77) > ~[mchange-commons-java-0.2.9.jar:0.2.9] > 1343 at > com.mchange.v2.c3p0.impl.NewProxyResultSet.getMetaData(NewProxyResultSet.java:1226) > ~[c3p0-0.9.5.jar:0.9.5] > 1344 at > org.apache.lens.driver.jdbc.JDBCResultSet.getRsMetadata(JDBCResultSet.java:87) > ~[lens-driver-jdbc-2.6.5-inm.jar:2.6.5-inm] > 1345 ... 30 common frames omitted > 1346 Caused by: java.lang.NullPointerException: null > 1347 at > com.mchange.v2.c3p0.impl.NewProxyResultSet.getMetaData(NewProxyResultSet.java:1220) > ~[c3p0-0.9.5.jar:0.9.5] > 1348 ... 31 common frames omitted > 1349 26 May 2016 01:44:03 [85955f55-eb41-425e-a042-4b82dd51dffb] > [683a1fb3-a050-466f-afeb-c7e9bd1c6fa9 aead4deb-eeb4-45a8-90a4-3a7f48d139df > cd75a0b7-0e24-4d36-a53c-38ccabb847c9 e52ca388-e40c-407d-8857-7b2a44aa > ca5a 406184e3-8409-4927-b026-82c40c7dec90 6e58bb04-79dc-4ff8-a69 > 4cec-a1b8-587611f7ef1d ff6157a8-9864-4da2-a3ba-c04cba01a29f > eebc5835-03b8-4d2d-b207-275feca02d79 8ae08d04-7ca1-42c5-bd2b-2834998ec3d0 > grizzly-http-server-11] ERROR org.apache.lens.server.LensRequestListen er > - Encountered HTTP exception > 1352 org.glassfish.jersey.server.internal.process.MappableException: > java.lang.NullPointerException > 1353 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.mapTargetToRuntimeEx(AbstractJavaResourceMethodDispatcher.java:179) > ~[jersey-server-2.22.1.jar:na] > 1354 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.access$200(AbstractJavaResourceMethodDispatcher.java:72) > ~[jersey-server-2.22.1.jar:na] > 1355 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:149) > ~[jersey-server-2.22.1.jar:na] > 1356 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) > ~[jersey-server-2.22.1.jar:na] > 1357 at > org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) > ~[jersey-server-2.22.1.jar:na] > 1358 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) > ~[jersey-server-2.22.1.jar:na] > 1359 at > org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) > ~[jersey-server-2.22.1.jar:na] > 1360 at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) > ~[jersey-server-2.22.1.jar:na] > 1361 at > org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) > ~[jersey-server-2.22.1.jar:na] > 1362 at > org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) > ~[jersey-server-2.22.1.jar:na] > 1363 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) > [jersey-common-2.22.1.jar:na] > 1364 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) > [jersey-common-2.22.1.jar:na] > 1365 at org.glassfish.jersey.internal.Errors.process(Errors.java:315) > [jersey-common-2.22.1.jar:na] > 1366 at org.glassfish.jersey.internal.Errors.process(Errors.java:297) > [jersey-common-2.22.1.jar:na] > 1367 at org.glassfish.jersey.internal.Errors.process(Errors.java:267) > [jersey-common-2.22.1.jar:na] > 1368 at > org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) > [jersey-common-2.22.1.jar:na] > 1369 at > org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) > [jersey-server-2.22.1.jar:na] > 1370 at > org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) > [jersey-server-2.22.1.jar:na] > 1371 at > org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) > [jersey-container-grizzly2-http-2.22.1.jar:na] > 1372 at > org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) > [grizzly-http-server-2.3.23.jar:2.3.23] > 1373 at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) > [grizzly-framework-2.3.23.jar:2.3.23] > 1374 at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) > [grizzly-framework-2.3.23.jar:2.3.23] > 1375 at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72] > 1376 Caused by: java.lang.NullPointerException: null > 1377 at > org.apache.lens.server.api.driver.LensResultSetMetadata.toQueryResultSetMetadata(LensResultSetMetadata.java:90) > ~[lens-server-api-2.6.5-inm.jar:2.6.5-inm] > 1378 at > org.apache.lens.server.query.QueryExecutionServiceImpl.executeTimeoutInternal(QueryExecutionServiceImpl.java:2068) > ~[classes/:na] > 1379 at > org.apache.lens.server.query.QueryExecutionServiceImpl.execute(QueryExecutionServiceImpl.java:2009) > ~[classes/:na] > 1380 at > org.apache.lens.server.query.QueryServiceResource.query(QueryServiceResource.java:234) > ~[classes/:na] > 1381 at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) > ~[na:na] > 1382 at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[na:1.8.0_72] > 1383 at java.lang.reflect.Method.invoke(Method.java:498) > ~[na:1.8.0_72] > 1384 at > org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) > ~[jersey-server-2.22.1.jar:na] > 1385 at > org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) > ~[jersey-server-2.22.1.jar:na] > 1386 ... 20 common frames omitted > 1387 26 May 2016 01:44:05 [85955f55-eb41-425e-a042-4b82dd51dffb] > [ResultFormatter_AsyncThread-132] WARN > org.apache.lens.server.query.ResultFormatter - Exception while formatting > result for 85955f55-eb41-425e- a042-4b82dd51dffb > 1388 java.lang.NullPointerException: null > 1389 26 May 2016 01:44:05 [85955f55-eb41-425e-a042-4b82dd51dffb] > [ResultFormatter_AsyncThread-132] INFO > org.apache.lens.server.api.query.QueryContext - Updating status of > 85955f55-eb41-425e-a042-4b82dd51dffb from Progress: 1.0 > 1390 Status: EXECUTED > 1391 Status Message: 85955f55-eb41-425e-a042-4b82dd51dffb successful > 1392 Is Result Set Available: true > 1393 to Progress: 0.0 > 1394 Status: FAILED > 1395 Status Message: Result formatting failed! > 1396 Is Result Set Available: false > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)