java.lang.IllegalArgumentException: Too many values for built statement, the maximum allowed is 65535

The OpenNMS Issue Tracker | Jesse White | 1 year ago
  1. 0

    I ran into the following exception when trying to stress test the Newts integration with OpenNMS. In these tests, a single resource could contain as many as 3000 metrics. {code} Exception in thread "pool-10-thread-13" java.lang.IllegalArgumentException: Too many values for built statement, the maximum allowed is 65535 at com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache(BuiltStatement.java:87) at com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:180) at com.datastax.driver.core.querybuilder.Batch.getValues(Batch.java:133) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:513) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:474) at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:97) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) at org.opennms.newts.cassandra.CassandraSession.execute(CassandraSession.java:87) at org.opennms.newts.cassandra.search.CassandraIndexer.update(CassandraIndexer.java:96) at org.opennms.newts.cassandra.search.CassandraIndexerSampleProcessor.submit(CassandraIndexerSampleProcessor.java:45) at org.opennms.newts.api.SampleProcessorService$1.run(SampleProcessorService.java:76) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    The OpenNMS Issue Tracker | 1 year ago | Jesse White
    java.lang.IllegalArgumentException: Too many values for built statement, the maximum allowed is 65535
  2. 0

    I ran into the following exception when trying to stress test the Newts integration with OpenNMS. In these tests, a single resource could contain as many as 3000 metrics. {code} Exception in thread "pool-10-thread-13" java.lang.IllegalArgumentException: Too many values for built statement, the maximum allowed is 65535 at com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache(BuiltStatement.java:87) at com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:180) at com.datastax.driver.core.querybuilder.Batch.getValues(Batch.java:133) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:513) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:474) at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:97) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) at org.opennms.newts.cassandra.CassandraSession.execute(CassandraSession.java:87) at org.opennms.newts.cassandra.search.CassandraIndexer.update(CassandraIndexer.java:96) at org.opennms.newts.cassandra.search.CassandraIndexerSampleProcessor.submit(CassandraIndexerSampleProcessor.java:45) at org.opennms.newts.api.SampleProcessorService$1.run(SampleProcessorService.java:76) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    The OpenNMS Issue Tracker | 1 year ago | Jesse White
    java.lang.IllegalArgumentException: Too many values for built statement, the maximum allowed is 65535
  3. 0

    Discovered via: http://stackoverflow.com/questions/31415250/datastax-java-driver-convert-scala-collections-to-java-error If you use a type in a collection that doesn't correspond with a CQL type found in TypeCodec.getDataTypeFor the error is raised for the collection's class instead of the enclosing types class. For example: {code:java} session.execute("create keyspace if not exists test WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };"); session.execute("create table if not exists test.tbl (k text PRIMARY KEY, v map<text, text>);"); Map<String, SettableFuture<Double>> map = new HashMap<String, SettableFuture<Double>>(); map.put("hello", SettableFuture.<Double>create()); session.execute("insert into test.tbl (k, v) values (?,?)", "hello", map); {code} yields an exception on HashMap instead of SettableFuture. {noformat} java.lang.IllegalArgumentException: Value 1 of type class java.util.HashMap does not correspond to any CQL3 type at com.datastax.driver.core.SimpleStatement.convert(SimpleStatement.java:102) at com.datastax.driver.core.SimpleStatement.getValues(SimpleStatement.java:120) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:518) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:478) at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:98) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:55) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:47) {noformat} The same would happen for a set/list: {noformat} java.lang.IllegalArgumentException: Value 1 of type class java.util.HashSet does not correspond to any CQL3 type at com.datastax.driver.core.SimpleStatement.convert(SimpleStatement.java:102) at com.datastax.driver.core.SimpleStatement.getValues(SimpleStatement.java:120) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:518) at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:478) at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:98) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:55) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:47) {noformat} There is also some code duplication between SimpleStatement.convert and Utils.convert and the error occurs in both places (from a SimpleStatement or BuildStatement).

    DataStax JIRA | 1 year ago | Andy Tolbert
    java.lang.IllegalArgumentException: Value 1 of type class java.util.HashMap does not correspond to any CQL3 type
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Question on write failures logs show Uncaught exception on thread Thread[MutationStage-1,5,main]

    Google Groups | 1 month ago | George Webster
    java.lang.IllegalArgumentException: Mutation of 16.011MiB is too large for the maximum size of 16.000MiB
  6. 0

    Question on write failures logs show Uncaught exception on thread Thread[MutationStage-1,5,main]

    Google Groups | 1 month ago | George Webster
    java.lang.IllegalArgumentException: Mutation of 16.011MiB is too large for the maximum size of 16.000MiB

    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. java.lang.IllegalArgumentException

      Too many values for built statement, the maximum allowed is 65535

      at com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache()
    2. DataStax Java Driver for Apache Cassandra - Core
      AbstractSession.execute
      1. com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache(BuiltStatement.java:87)
      2. com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:180)
      3. com.datastax.driver.core.querybuilder.Batch.getValues(Batch.java:133)
      4. com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:513)
      5. com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:474)
      6. com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:97)
      7. com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)
      7 frames
    3. New Timeseries Datastore :: Cassandra :: Common
      CassandraSession.execute
      1. org.opennms.newts.cassandra.CassandraSession.execute(CassandraSession.java:87)
      1 frame
    4. org.opennms.newts
      CassandraIndexerSampleProcessor.submit
      1. org.opennms.newts.cassandra.search.CassandraIndexer.update(CassandraIndexer.java:96)
      2. org.opennms.newts.cassandra.search.CassandraIndexerSampleProcessor.submit(CassandraIndexerSampleProcessor.java:45)
      2 frames
    5. New Timeseries Datastore :: API
      SampleProcessorService$1.run
      1. org.opennms.newts.api.SampleProcessorService$1.run(SampleProcessorService.java:76)
      1 frame
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames