com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482

Spring JIRA | Jens Rantil | 2 years ago
  1. 0

    Problem: When I call `CassandraRepository#save(...)` with too many items I get an exception: ERROR [2014-08-29 10:13:54,906] my.project.Klazz: Could not store stuff ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.exceptions.DriverInternalError.copy(DriverInternalError.java:42) ! at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256) ! at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172) ! at com.datastax.driver.core.SessionManager.execute(SessionManager.java:92) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:518) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:486) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.execute(CqlTemplate.java:1197) ! at org.springframework.data.cassandra.core.CassandraTemplate.batchInsert(CassandraTemplate.java:547) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:201) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:196) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:64) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:36) ! at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source) ! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ! at java.lang.reflect.Method.invoke(Method.java:606) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:405) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:390) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344) ! at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ! at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ! at com.sun.proxy.$Proxy157.save(Unknown Source) ! at my.project.SomeOtherKlazz.process(SomeOtherKlazz.java:319) ! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ! at java.util.concurrent.FutureTask.run(FutureTask.java:262) ! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ! at java.lang.Thread.run(Thread.java:745) Caused by: ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.Responses$Error.asException(Responses.java:86) ! at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108) ! at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) ! at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) ! at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ! at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) ! at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) ! at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ! at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ! at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) !... 3 common frames omitted In Cassandra I am getting: WARN [Native-Transport-Requests:683742] 2014-08-29 10:22:14,838 BatchStatement.java (line 223) Batch of prepared statements for [mykeyspace.mytable] is of size 229558, exceeding specified threshold of 65536 by 164022. I would expect spring-data-cassandra to take care of the smaller batching for me. Workaround: Implement a custom repository method that saves the items in small batches.

    Spring JIRA | 2 years ago | Jens Rantil
    com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482
  2. 0

    Problem: When I call `CassandraRepository#save(...)` with too many items I get an exception: ERROR [2014-08-29 10:13:54,906] my.project.Klazz: Could not store stuff ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.exceptions.DriverInternalError.copy(DriverInternalError.java:42) ! at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256) ! at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172) ! at com.datastax.driver.core.SessionManager.execute(SessionManager.java:92) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:518) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:486) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.execute(CqlTemplate.java:1197) ! at org.springframework.data.cassandra.core.CassandraTemplate.batchInsert(CassandraTemplate.java:547) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:201) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:196) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:64) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:36) ! at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source) ! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ! at java.lang.reflect.Method.invoke(Method.java:606) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:405) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:390) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344) ! at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ! at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ! at com.sun.proxy.$Proxy157.save(Unknown Source) ! at my.project.SomeOtherKlazz.process(SomeOtherKlazz.java:319) ! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ! at java.util.concurrent.FutureTask.run(FutureTask.java:262) ! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ! at java.lang.Thread.run(Thread.java:745) Caused by: ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.Responses$Error.asException(Responses.java:86) ! at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108) ! at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) ! at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) ! at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ! at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) ! at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) ! at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ! at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ! at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) !... 3 common frames omitted In Cassandra I am getting: WARN [Native-Transport-Requests:683742] 2014-08-29 10:22:14,838 BatchStatement.java (line 223) Batch of prepared statements for [mykeyspace.mytable] is of size 229558, exceeding specified threshold of 65536 by 164022. I would expect spring-data-cassandra to take care of the smaller batching for me. Workaround: Implement a custom repository method that saves the items in small batches.

    Spring JIRA | 2 years ago | Jens Rantil
    com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482
  3. 0

    Problem: When I call `CassandraRepository#save(...)` with too many items I get an exception: ERROR [2014-08-29 10:13:54,906] my.project.Klazz: Could not store stuff ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.exceptions.DriverInternalError.copy(DriverInternalError.java:42) ! at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256) ! at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172) ! at com.datastax.driver.core.SessionManager.execute(SessionManager.java:92) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:518) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:486) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.execute(CqlTemplate.java:1197) ! at org.springframework.data.cassandra.core.CassandraTemplate.batchInsert(CassandraTemplate.java:547) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:201) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:196) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:64) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:36) ! at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source) ! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ! at java.lang.reflect.Method.invoke(Method.java:606) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:405) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:390) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344) ! at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ! at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ! at com.sun.proxy.$Proxy157.save(Unknown Source) ! at my.project.SomeOtherKlazz.process(SomeOtherKlazz.java:319) ! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ! at java.util.concurrent.FutureTask.run(FutureTask.java:262) ! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ! at java.lang.Thread.run(Thread.java:745) Caused by: ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.Responses$Error.asException(Responses.java:86) ! at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108) ! at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) ! at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) ! at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ! at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) ! at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) ! at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ! at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ! at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) !... 3 common frames omitted In Cassandra I am getting: WARN [Native-Transport-Requests:683742] 2014-08-29 10:22:14,838 BatchStatement.java (line 223) Batch of prepared statements for [mykeyspace.mytable] is of size 229558, exceeding specified threshold of 65536 by 164022. I would expect spring-data-cassandra to take care of the smaller batching for me. Workaround: Implement a custom repository method that saves the items in small batches.

    Spring JIRA | 2 years ago | Jens Rantil
    com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problem: When I call `CassandraRepository#save(...)` with too many items I get an exception: ERROR [2014-08-29 10:13:54,906] my.project.Klazz: Could not store stuff ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.exceptions.DriverInternalError.copy(DriverInternalError.java:42) ! at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256) ! at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172) ! at com.datastax.driver.core.SessionManager.execute(SessionManager.java:92) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:518) ! at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:486) ! at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:509) ! at org.springframework.cassandra.core.CqlTemplate.execute(CqlTemplate.java:1197) ! at org.springframework.data.cassandra.core.CassandraTemplate.batchInsert(CassandraTemplate.java:547) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:201) ! at org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:196) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:64) ! at org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:36) ! at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source) ! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ! at java.lang.reflect.Method.invoke(Method.java:606) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:405) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:390) ! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344) ! at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ! at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ! at com.sun.proxy.$Proxy157.save(Unknown Source) ! at my.project.SomeOtherKlazz.process(SomeOtherKlazz.java:319) ! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ! at java.util.concurrent.FutureTask.run(FutureTask.java:262) ! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ! at java.lang.Thread.run(Thread.java:745) Caused by: ! com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482 ! at com.datastax.driver.core.Responses$Error.asException(Responses.java:86) ! at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108) ! at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) ! at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) ! at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ! at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ! at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ! at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ! at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ! at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) ! at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ! at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) ! at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ! at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ! at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) !... 3 common frames omitted In Cassandra I am getting: WARN [Native-Transport-Requests:683742] 2014-08-29 10:22:14,838 BatchStatement.java (line 223) Batch of prepared statements for [mykeyspace.mytable] is of size 229558, exceeding specified threshold of 65536 by 164022. I would expect spring-data-cassandra to take care of the smaller batching for me. Workaround: Implement a custom repository method that saves the items in small batches.

    Spring JIRA | 2 years ago | Jens Rantil
    com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482
  6. 0

    If I submit a {{null}} value to variable bound to a column which is a collection inside a UDT, then I get a NPE. No problem without prepared statements. No problem with columns of any native type inside a UDT. No problem if the value is not {{null}}. But also fails if no value is submitted for the corresponding column of the UDT (seems to be equivalent). Here is a code sample that reproduces the problem (at least on my computer) : {code} session.execute("CREATE KEYSPACE IF NOT EXISTS ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 }"); session.execute("CREATE TYPE IF NOT EXISTS ks.my_type ( bla ascii, val int, l list<int>);"); session.execute("CREATE TABLE IF NOT EXISTS ks.udt_table (key int, udt my_type, PRIMARY KEY (key));"); session.execute("INSERT INTO ks.udt_table (key, udt) VALUES (1, { bla : 'toto', val : 42 });"); // OK PreparedStatement prepared = session.prepare(new SimpleStatement("INSERT INTO ks.udt_table (key, udt) VALUES (2, { bla : ?, val : ?, l: ? });")); BoundStatement bound = prepared.bind( "toto", 42, Lists.newArrayList(12)); session.execute(bound); // OK prepared = session.prepare(new SimpleStatement("INSERT INTO ks.udt_table (key, udt) VALUES (3, { bla : ?, val : ?, l: ? });")); bound = prepared.bind( "toto", null, Lists.newArrayList(12)); session.execute(bound); // OK prepared = session.prepare(new SimpleStatement("INSERT INTO ks.udt_table (key, udt) VALUES (4, { bla : ?, val : ?, l: ? });")); bound = prepared.bind( "toto", 42, null); session.execute(bound); // NOK prepared = session.prepare(new SimpleStatement("INSERT INTO ks.udt_table (key, udt) VALUES (5, { bla : ?, val : ? });")); bound = prepared.bind( "toto", 42); session.execute(bound); // NOK {code} Here is the stacktrace in application's log : {code} com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /127.0.0.1:9042: java.lang.NullPointerException at com.datastax.driver.core.exceptions.DriverInternalError.copy(DriverInternalError.java:42) at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:258) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:174) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) (...) Caused by: com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /127.0.0.1:9042: java.lang.NullPointerException at com.datastax.driver.core.Responses$Error.asException(Responses.java:86) at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:110) at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:584) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code} Here is the stacktrace in system.log file : {code} ERROR [SharedPool-Worker-2] 2014-07-31 11:35:57,241 ErrorMessage.java:218 - Unexpected exception during request java.lang.NullPointerException: null at org.apache.cassandra.serializers.ListSerializer.deserializeForNativeProtocol(ListSerializer.java:82) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.serializers.ListSerializer.deserializeForNativeProtocol(ListSerializer.java:27) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.serializers.CollectionSerializer.reserializeToV3(CollectionSerializer.java:53) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.UserTypes$DelayedValue.bindInternal(UserTypes.java:175) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.UserTypes$DelayedValue.bindAndGet(UserTypes.java:188) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.Constants$Setter.execute(Constants.java:314) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.statements.UpdateStatement.addUpdateForKey(UpdateStatement.java:97) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.statements.ModificationStatement.getMutations(ModificationStatement.java:672) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:501) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:487) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:187) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:413) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:133) ~[apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:421) [apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:318) [apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [netty-all-4.0.20.Final.jar:4.0.20.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332) [netty-all-4.0.20.Final.jar:4.0.20.Final] at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:31) [netty-all-4.0.20.Final.jar:4.0.20.Final] at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:323) [netty-all-4.0.20.Final.jar:4.0.20.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_55] at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:162) [apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:103) [apache-cassandra-2.1.0-rc4.jar:2.1.0-rc4] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55] {code} Is related to https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/oKTbrRy5GeU

    DataStax JIRA | 2 years ago | Fabrice Larcher
    com.datastax.driver.core.exceptions.DriverInternalError: An unexpected error occurred server side on /127.0.0.1:9042: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.datastax.driver.core.exceptions.DriverInternalError

      An unexpected error occurred server side on /10.11.1.32:9042: java.lang.IndexOutOfBoundsException: Index: 5482, Size: 5482

      at com.datastax.driver.core.exceptions.DriverInternalError.copy()
    2. DataStax Java Driver for Apache Cassandra - Core
      SessionManager.execute
      1. com.datastax.driver.core.exceptions.DriverInternalError.copy(DriverInternalError.java:42)
      2. com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256)
      3. com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172)
      4. com.datastax.driver.core.SessionManager.execute(SessionManager.java:92)
      4 frames
    3. Spring CQL
      CqlTemplate.execute
      1. org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:518)
      2. org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:509)
      3. org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:486)
      4. org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:509)
      5. org.springframework.cassandra.core.CqlTemplate.execute(CqlTemplate.java:1197)
      5 frames
    4. Spring Data Cassandra - Core
      SimpleCassandraRepository.save
      1. org.springframework.data.cassandra.core.CassandraTemplate.batchInsert(CassandraTemplate.java:547)
      2. org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:201)
      3. org.springframework.data.cassandra.core.CassandraTemplate.insert(CassandraTemplate.java:196)
      4. org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:64)
      5. org.springframework.data.cassandra.repository.support.SimpleCassandraRepository.save(SimpleCassandraRepository.java:36)
      5 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    6. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:405)
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:390)
      3. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:344)
      3 frames
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. com.sun.proxy
      $Proxy157.save
      1. com.sun.proxy.$Proxy157.save(Unknown Source)
      1 frame
    9. my.project
      SomeOtherKlazz.process
      1. my.project.SomeOtherKlazz.process(SomeOtherKlazz.java:319)
      1 frame
    10. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      5. java.lang.Thread.run(Thread.java:745)
      5 frames