com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException

DataStax JIRA | Robert Stupp | 2 years ago
  1. 0

    When UDF execution raises a {{FunctionExecutionException}}, it's propagated as an {{InvalidQueryException}}. Should it be a {{FunctionExecutionException}}? Not sure about the other exceptions like {{TruncateException}} (didn't check that). {code} com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35) at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:271) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:185) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:55) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:47) at org.apache.cassandra.cql3.CQLTester.executeNet(CQLTester.java:484) at org.apache.cassandra.cql3.UFTest.testFunctionExecutionExceptionNet(UFTest.java:2158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.junit.runner.JUnitCore.run(JUnitCore.java:159) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException at com.datastax.driver.core.Responses$Error.asException(Responses.java:125) at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:120) at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:186) at com.datastax.driver.core.RequestHandler.access$2300(RequestHandler.java:45) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:752) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:576) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1003) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:925) at com.datastax.shaded.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) {code}

    DataStax JIRA | 2 years ago | Robert Stupp
    com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException
  2. 0

    When UDF execution raises a {{FunctionExecutionException}}, it's propagated as an {{InvalidQueryException}}. Should it be a {{FunctionExecutionException}}? Not sure about the other exceptions like {{TruncateException}} (didn't check that). {code} com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35) at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:271) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:185) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:55) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:47) at org.apache.cassandra.cql3.CQLTester.executeNet(CQLTester.java:484) at org.apache.cassandra.cql3.UFTest.testFunctionExecutionExceptionNet(UFTest.java:2158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:220) at org.junit.runner.JUnitCore.run(JUnitCore.java:159) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException at com.datastax.driver.core.Responses$Error.asException(Responses.java:125) at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:120) at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:186) at com.datastax.driver.core.RequestHandler.access$2300(RequestHandler.java:45) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:752) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:576) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1003) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:925) at com.datastax.shaded.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) {code}

    DataStax JIRA | 2 years ago | Robert Stupp
    com.datastax.driver.core.exceptions.InvalidQueryException: ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException
  3. 0

    collector fails after upgrading from 1.39.9 to 1.40.2

    GitHub | 8 months ago | liyichao
    com.datastax.driver.core.exceptions.InvalidQueryException: Partition KEY part service_name cannot be restricted by IN relation (only the last part of the partition key can)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I tried creating a repository method with parameters but it seems that it doesn't work. This is the following query I wanted: {code} @Query(SELECT * FROM foo WHERE p1 = :p1 AND p2 = :p2 AND p3 = :p3) Set<Foo> findByPartitionKey(@Param("p1") final double p1, @Param("p2") final double p2, @Param("p3") final String p3); {code} Here is the stacktrace for the above query: {code} com.datastax.driver.core.exceptions.InvalidQueryException: Invalid amount of bind variables at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35) at com.datastax.driver.core.ResultSetFuture.extractCauseFromExecutionException(ResultSetFuture.java:269) at com.datastax.driver.core.ResultSetFuture.getUninterruptibly(ResultSetFuture.java:183) at com.datastax.driver.core.Session.execute(Session.java:111) at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:519) at org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:510) at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:487) at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:510) at org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:499) at org.springframework.cassandra.core.CqlTemplate.query(CqlTemplate.java:409) at org.springframework.cassandra.core.CqlTemplate.query(CqlTemplate.java:436) at org.springframework.cassandra.core.CqlTemplate.query(CqlTemplate.java:430) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:122) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:337) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy1408.findByPartitionKey(Unknown Source) {code} Also tried indexes instead of bind parameter names {code} @Query(SELECT * FROM foo WHERE p1 = ?1 AND p2 = ?2 AND p3 = ?3) Set<Foo> findByPartitionKey(final double p1, final double p2, final String p3); {code} The above query gave me the following stacktrace: {code} org.springframework.data.repository.query.ParameterOutOfBoundsException: Invalid parameter index! You seem to have declare too little query method parameters! at org.springframework.data.repository.query.Parameters.getParameter(Parameters.java:179) at org.springframework.data.repository.query.Parameters.getBindableParameter(Parameters.java:249) at org.springframework.data.repository.query.ParametersParameterAccessor.getBindableValue(ParametersParameterAccessor.java:107) at org.springframework.data.cassandra.repository.query.StringBasedCassandraQuery.getParameterWithIndex(StringBasedCassandraQuery.java:48) at org.springframework.data.cassandra.repository.query.StringBasedCassandraQuery.replacePlaceholders(StringBasedCassandraQuery.java:41) at org.springframework.data.cassandra.repository.query.StringBasedCassandraQuery.createQuery(StringBasedCassandraQuery.java:30) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:120) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:337) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy1486.findByPartitionKey(Unknown Source) Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 at java.util.ArrayList.rangeCheck(ArrayList.java:635) at java.util.ArrayList.get(ArrayList.java:411) at org.springframework.data.repository.query.Parameters.getParameter(Parameters.java:177) ... 38 more {code}

    Spring JIRA | 3 years ago | Colin McQueen
    com.datastax.driver.core.exceptions.InvalidQueryException: Invalid amount of bind variables
  6. 0

    Exception about too long clustering key

    Google Groups | 10 months ago | Emīls Šolmanis
    com.datastax.driver.core.exceptions.InvalidQueryException: The sum of all clustering columns is too long (72650 > 65535)

    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.InvalidQueryException

      ERROR FUNCTION_FAILURE: execution of 'cql_test_keyspace_alt.function_1[double]' failed: java.lang.RuntimeException

      at com.datastax.driver.core.Responses$Error.asException()
    2. DataStax Java Driver for Apache Cassandra - Core
      SimpleChannelInboundHandler.channelRead
      1. com.datastax.driver.core.Responses$Error.asException(Responses.java:125)
      2. com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:120)
      3. com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:186)
      4. com.datastax.driver.core.RequestHandler.access$2300(RequestHandler.java:45)
      5. com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:752)
      6. com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:576)
      7. com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1003)
      8. com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:925)
      9. com.datastax.shaded.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      9 frames