You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Tellier Benoit (JIRA)" <ji...@apache.org> on 2018/01/22 11:32:00 UTC

[jira] [Created] (MAILBOX-323) InvalidQuery exception in cassandra mailbox quota

Tellier Benoit created MAILBOX-323:
--------------------------------------

             Summary: InvalidQuery exception in cassandra mailbox quota
                 Key: MAILBOX-323
                 URL: https://issues.apache.org/jira/browse/MAILBOX-323
             Project: James Mailbox
          Issue Type: Task
          Components: quota, cassandra
    Affects Versions: master
            Reporter: Tellier Benoit


A statement was reused accross query execution without being prepared.

That lead to possibly this kind of error:

{code:java}
Exception calling IsOverQuota: Invalid amount of bind variables
com.datastax.driver.core.exceptions.InvalidQueryException: Invalid amount of bind variables
	at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:50)
	at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
	at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:245)
	at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:68)
	at org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaManager.getDefaultMaxMessage(CassandraPerUserMaxQuotaManager.java:113)
	at org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaManager.getMaxMessage(CassandraPerUserMaxQuotaManager.java:133)
	at org.apache.james.mailbox.store.quota.StoreQuotaManager.getMessageQuota(StoreQuotaManager.java:52)
	at org.apache.james.transport.matchers.IsOverQuota.match(IsOverQuota.java:83)
	at org.apache.james.mailetcontainer.impl.camel.MatcherSplitter.split(MatcherSplitter.java:112)
at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
{code}

We should rather use a prepared statement and keeping the key as a bind variable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org