title: insert list<text> cassandra using java
body: <p>I"m trying to insert a list in cassandra, but I getting this error:</p>
  
  <blockquote>
    <p>Exception in thread "main"
    com.datastax.driver.core.exceptions.InvalidQueryException: Invalid
    amount of bind variables</p>
  </blockquote>
  
  <p>The table in cassandra is:</p>
  
  <pre><code>CREATE TABLE list (name text PRIMARY KEY, values list&lt;text&gt; );
  </code></pre>
  
  <p>My query using java is:</p>
  
  <pre><code>public void insert(String name, List&lt;String&gt; values) {
      execute("INSERT INTO list (name, values) VALUES ('%s', ?)", name, values);
      }
  </code></pre>
  
  <p>What is the problem?</p>