Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundsException on SELECT #741

Open
dmercuriali opened this issue Mar 24, 2021 · 2 comments
Open

ArrayIndexOutOfBoundsException on SELECT #741

dmercuriali opened this issue Mar 24, 2021 · 2 comments

Comments

@dmercuriali
Copy link
Contributor

dmercuriali commented Mar 24, 2021

We encountered the below exception after upgrading our application from HerdDB 0.6.0 to 0.22.0, no queries were changed.
Let me know if I can try something else or if you require more details.

Please describe the issue you observed:

What did you do?

Upgraded to 0.22.0
Executed a query like this from the application and from the HerdDB CLI (both fails)
SELECT IDSTRING, FIELD1, FIELD2, FIELD3, FIELD4, FIELD5, FIELD6 FROM TESTTABLE WHERE (FIELD1 = ?) ORDER BY LOWER(IDSTRING)
where IDSTRING and FIELD1 are strings

I've done some tests from the herddb cli and I was able to execute the query by either:

  • removing LOWER from the ORDER BY
  • removing the WHERE clause
  • removing one field (which one doesn't matter) from the SELECT

What did you expect to see?
query results

What did you see instead?

herddb.client.HDBException: herddb.model.StatementExecutionException: java.lang.ArrayIndexOutOfBoundsException
	at herddb.model.planner.PlannerOp.executeAsync(PlannerOp.java:80)
	at herddb.core.TableSpaceManager.executePlannedOperationStatement(TableSpaceManager.java:1436)
	at herddb.core.TableSpaceManager.executeStatementAsyncInternal(TableSpaceManager.java:1365)
	at herddb.core.TableSpaceManager.executeStatementAsync(TableSpaceManager.java:1332)
	at herddb.core.DBManager.executeStatementAsync(DBManager.java:710)
	at herddb.core.DBManager.executePlanAsync(DBManager.java:767)
	at herddb.core.DBManager.executePlan(DBManager.java:737)
	at herddb.server.ServerSideConnectionPeer.handleOpenScanner(ServerSideConnectionPeer.java:477)
	at herddb.server.ServerSideConnectionPeer.requestReceived(ServerSideConnectionPeer.java:198)
	at herddb.network.netty.AbstractChannel.processRequest(AbstractChannel.java:96)
	at herddb.network.netty.AbstractChannel.lambda$handlePduRequest$0(AbstractChannel.java:105)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ArrayIndexOutOfBoundsException
	herddb.client.RoutedClientSideConnection.handleGenericError(RoutedClientSideConnection.java:717)
	herddb.client.RoutedClientSideConnection.executeScan(RoutedClientSideConnection.java:737)
	herddb.client.HDBConnection.executeScan(HDBConnection.java:347)
	herddb.jdbc.HerdDBPreparedStatement.executeQuery(HerdDBPreparedStatement.java:81)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1007)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:642)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
	org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
	org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691)
	org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168)
	org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127)
	org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215)
	org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
	org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
	org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
	minicat.service.StringsResource.toCsv(StringsResource.java:118)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:566)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
	org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
	org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	org.glassfish.jersey.internal.Errors.process(Errors.java:268)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
@diegosalvi
Copy link
Contributor

Let me understand better your issue...
Removing ANY of

  • LOWER from the ORDER BY
  • the WHERE clause
  • one field (which one doesn't matter) from the SELECT (any field)
    resolved issue?

Do you have any other exception in your log?

@dmercuriali
Copy link
Contributor Author

dmercuriali commented Mar 25, 2021

Removing ANY of

LOWER from the ORDER BY
the WHERE clause
one field (which one doesn't matter) from the SELECT (any field)
resolved issue?

Yes, I was able to execute
SELECT IDSTRING, FIELD1, FIELD2, FIELD3, FIELD4, FIELD5, FIELD6 FROM TESTTABLE WHERE (FIELD1 = ?) ORDER BY IDSTRING

SELECT IDSTRING, FIELD1, FIELD2, FIELD3, FIELD4, FIELD5, FIELD6 FROM TESTTABLE ORDER BY LOWER(IDSTRING)

and
SELECT IDSTRING, FIELD1, FIELD2, FIELD3, FIELD4, FIELD5 FROM TESTTABLE WHERE (FIELD1 = ?) ORDER BY LOWER(IDSTRING)

but the "complete" query fails to execute.

This is the full error

javax.servlet.ServletException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: herddb.model.StatementExecutionException: java.lang.ArrayIndexOutOfBoundsException
	at herddb.model.planner.PlannerOp.executeAsync(PlannerOp.java:80)
	at herddb.core.TableSpaceManager.executePlannedOperationStatement(TableSpaceManager.java:1436)
	at herddb.core.TableSpaceManager.executeStatementAsyncInternal(TableSpaceManager.java:1365)
	at herddb.core.TableSpaceManager.executeStatementAsync(TableSpaceManager.java:1332)
	at herddb.core.DBManager.executeStatementAsync(DBManager.java:710)
	at herddb.core.DBManager.executePlanAsync(DBManager.java:767)
	at herddb.core.DBManager.executePlan(DBManager.java:737)
	at herddb.server.ServerSideConnectionPeer.handleOpenScanner(ServerSideConnectionPeer.java:477)
	at herddb.server.ServerSideConnectionPeer.requestReceived(ServerSideConnectionPeer.java:198)
	at herddb.network.netty.AbstractChannel.processRequest(AbstractChannel.java:96)
	at herddb.network.netty.AbstractChannel.lambda$handlePduRequest$0(AbstractChannel.java:105)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ArrayIndexOutOfBoundsException

Error Code: 0
Call: SELECT ID, CONTENT, IDSTRING, LAN, LAST_CHANGE_DATE, LAST_USER, STATUS FROM LOCALIZEDSTRING WHERE (LAN = ?) ORDER BY LOWER(IDSTRING)
	bind => [1 parameter bound]
Query: ReadAllQuery(referenceClass=LocalizedString sql="SELECT ID, CONTENT, IDSTRING, LAN, LAST_CHANGE_DATE, LAST_USER, STATUS FROM LOCALIZEDSTRING WHERE (LAN = ?) ORDER BY LOWER(IDSTRING)")
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:432)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: herddb.model.StatementExecutionException: java.lang.ArrayIndexOutOfBoundsException
	at herddb.model.planner.PlannerOp.executeAsync(PlannerOp.java:80)
	at herddb.core.TableSpaceManager.executePlannedOperationStatement(TableSpaceManager.java:1436)
	at herddb.core.TableSpaceManager.executeStatementAsyncInternal(TableSpaceManager.java:1365)
	at herddb.core.TableSpaceManager.executeStatementAsync(TableSpaceManager.java:1332)
	at herddb.core.DBManager.executeStatementAsync(DBManager.java:710)
	at herddb.core.DBManager.executePlanAsync(DBManager.java:767)
	at herddb.core.DBManager.executePlan(DBManager.java:737)
	at herddb.server.ServerSideConnectionPeer.handleOpenScanner(ServerSideConnectionPeer.java:477)
	at herddb.server.ServerSideConnectionPeer.requestReceived(ServerSideConnectionPeer.java:198)
	at herddb.network.netty.AbstractChannel.processRequest(AbstractChannel.java:96)
	at herddb.network.netty.AbstractChannel.lambda$handlePduRequest$0(AbstractChannel.java:105)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ArrayIndexOutOfBoundsException

Error Code: 0
Call: SELECT ID, CONTENT, IDSTRING, LAN, LAST_CHANGE_DATE, LAST_USER, STATUS FROM LOCALIZEDSTRING WHERE (LAN = ?) ORDER BY LOWER(IDSTRING)
	bind => [1 parameter bound]
Query: ReadAllQuery(referenceClass=LocalizedString sql="SELECT ID, CONTENT, IDSTRING, LAN, LAST_CHANGE_DATE, LAST_USER, STATUS FROM LOCALIZEDSTRING WHERE (LAN = ?) ORDER BY LOWER(IDSTRING)")
	org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:378)
	org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260)
	org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
	minicat.service.StringsResource.toCsv(StringsResource.java:118)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:566)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
	org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
	org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	org.glassfish.jersey.internal.Errors.process(Errors.java:268)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: herddb.model.StatementExecutionException: java.lang.ArrayIndexOutOfBoundsException
	at herddb.model.planner.PlannerOp.executeAsync(PlannerOp.java:80)
	at herddb.core.TableSpaceManager.executePlannedOperationStatement(TableSpaceManager.java:1436)
	at herddb.core.TableSpaceManager.executeStatementAsyncInternal(TableSpaceManager.java:1365)
	at herddb.core.TableSpaceManager.executeStatementAsync(TableSpaceManager.java:1332)
	at herddb.core.DBManager.executeStatementAsync(DBManager.java:710)
	at herddb.core.DBManager.executePlanAsync(DBManager.java:767)
	at herddb.core.DBManager.executePlan(DBManager.java:737)
	at herddb.server.ServerSideConnectionPeer.handleOpenScanner(ServerSideConnectionPeer.java:477)
	at herddb.server.ServerSideConnectionPeer.requestReceived(ServerSideConnectionPeer.java:198)
	at herddb.network.netty.AbstractChannel.processRequest(AbstractChannel.java:96)
	at herddb.network.netty.AbstractChannel.lambda$handlePduRequest$0(AbstractChannel.java:105)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ArrayIndexOutOfBoundsException

Error Code: 0
Call: SELECT ID, CONTENT, IDSTRING, LAN, LAST_CHANGE_DATE, LAST_USER, STATUS FROM LOCALIZEDSTRING WHERE (LAN = ?) ORDER BY LOWER(IDSTRING)
	bind => [1 parameter bound]
Query: ReadAllQuery(referenceClass=LocalizedString sql="SELECT ID, CONTENT, IDSTRING, LAN, LAST_CHANGE_DATE, LAST_USER, STATUS FROM LOCALIZEDSTRING WHERE (LAN = ?) ORDER BY LOWER(IDSTRING)")
	org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:682)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
	org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
	org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691)
	org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168)
	org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127)
	org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215)
	org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
	org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
	org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
	minicat.service.StringsResource.toCsv(StringsResource.java:118)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:566)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
	org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
	org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	org.glassfish.jersey.internal.Errors.process(Errors.java:268)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

java.sql.SQLException: herddb.model.StatementExecutionException: java.lang.ArrayIndexOutOfBoundsException
	at herddb.model.planner.PlannerOp.executeAsync(PlannerOp.java:80)
	at herddb.core.TableSpaceManager.executePlannedOperationStatement(TableSpaceManager.java:1436)
	at herddb.core.TableSpaceManager.executeStatementAsyncInternal(TableSpaceManager.java:1365)
	at herddb.core.TableSpaceManager.executeStatementAsync(TableSpaceManager.java:1332)
	at herddb.core.DBManager.executeStatementAsync(DBManager.java:710)
	at herddb.core.DBManager.executePlanAsync(DBManager.java:767)
	at herddb.core.DBManager.executePlan(DBManager.java:737)
	at herddb.server.ServerSideConnectionPeer.handleOpenScanner(ServerSideConnectionPeer.java:477)
	at herddb.server.ServerSideConnectionPeer.requestReceived(ServerSideConnectionPeer.java:198)
	at herddb.network.netty.AbstractChannel.processRequest(AbstractChannel.java:96)
	at herddb.network.netty.AbstractChannel.lambda$handlePduRequest$0(AbstractChannel.java:105)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ArrayIndexOutOfBoundsException

	herddb.jdbc.utils.SQLExceptionUtils.wrapException(SQLExceptionUtils.java:45)
	herddb.jdbc.HerdDBPreparedStatement.executeQuery(HerdDBPreparedStatement.java:86)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1007)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:642)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
	org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
	org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691)
	org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168)
	org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127)
	org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215)
	org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
	org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
	org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
	minicat.service.StringsResource.toCsv(StringsResource.java:118)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:566)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
	org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
	org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	org.glassfish.jersey.internal.Errors.process(Errors.java:268)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

herddb.client.HDBException: herddb.model.StatementExecutionException: java.lang.ArrayIndexOutOfBoundsException
	at herddb.model.planner.PlannerOp.executeAsync(PlannerOp.java:80)
	at herddb.core.TableSpaceManager.executePlannedOperationStatement(TableSpaceManager.java:1436)
	at herddb.core.TableSpaceManager.executeStatementAsyncInternal(TableSpaceManager.java:1365)
	at herddb.core.TableSpaceManager.executeStatementAsync(TableSpaceManager.java:1332)
	at herddb.core.DBManager.executeStatementAsync(DBManager.java:710)
	at herddb.core.DBManager.executePlanAsync(DBManager.java:767)
	at herddb.core.DBManager.executePlan(DBManager.java:737)
	at herddb.server.ServerSideConnectionPeer.handleOpenScanner(ServerSideConnectionPeer.java:477)
	at herddb.server.ServerSideConnectionPeer.requestReceived(ServerSideConnectionPeer.java:198)
	at herddb.network.netty.AbstractChannel.processRequest(AbstractChannel.java:96)
	at herddb.network.netty.AbstractChannel.lambda$handlePduRequest$0(AbstractChannel.java:105)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ArrayIndexOutOfBoundsException
	herddb.client.RoutedClientSideConnection.handleGenericError(RoutedClientSideConnection.java:717)
	herddb.client.RoutedClientSideConnection.executeScan(RoutedClientSideConnection.java:737)
	herddb.client.HDBConnection.executeScan(HDBConnection.java:347)
	herddb.jdbc.HerdDBPreparedStatement.executeQuery(HerdDBPreparedStatement.java:81)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1007)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:642)
	org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
	org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
	org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
	org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738)
	org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691)
	org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168)
	org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127)
	org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403)
	org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215)
	org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
	org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
	org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
	org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
	minicat.service.StringsResource.toCsv(StringsResource.java:118)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:566)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
	org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
	org.glassfish.jersey.internal.Errors.process(Errors.java:316)
	org.glassfish.jersey.internal.Errors.process(Errors.java:298)
	org.glassfish.jersey.internal.Errors.process(Errors.java:268)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants