You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Hiram Chirino (JIRA)" <ji...@activemq.org> on 2006/03/17 19:54:26 UTC

[jira] Commented: (AMQ-533) Unable to create ACTIVEMQ_ACK table

    [ http://jira.activemq.org/jira//browse/AMQ-533?page=comments#action_35809 ] 

Hiram Chirino commented on AMQ-533:
-----------------------------------

ActiveMQ has not been enhanced so that the SQL statements used can be tuned.

In you case, you would want to used something similar to...

  <broker useJmx="false">

    <persistenceAdapter>
      <journaledJDBC useJournal="false">
        <statements>
          <statements stringIdDataType ="VARCHAR(128)"/>
        </statements>
      </journaledJDBC>
    </persistenceAdapter>

  </broker>

For more info on what attributes can be set on the statements element, see:
http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/store/jdbc/Statements.html
All the settable bean properties can be used as attributes of the <statements> element.


> Unable to create ACTIVEMQ_ACK table
> -----------------------------------
>
>          Key: AMQ-533
>          URL: http://jira.activemq.org/jira//browse/AMQ-533
>      Project: ActiveMQ
>         Type: Bug

>   Components: Message Store
>     Versions: 3.2.2
>  Environment: MySQL 4.1.11 (InnoDB engine, UTF-8 default characterset), MySQL 3.1.8 connector/J, Java 1.5.0_06, Windows XP SP2, ActiveMQ 3.2.2
>     Reporter: N W
>     Priority: Blocker
>      Fix For: 4.0 M5

>
>
> I received the following error when trying to run ActiveMQ for the first time in the above environment:
> "Specified key was too long; max key length is 1024 bytes..."
> when ActiveMQ tries to create the ACTIVEMQ_ACKS table. It looks like the pk for that table involves two columns which are defined in DefaultStatementProvider.java as being VARCHAR(250)s. In in UTF-8 characterset each char is composed of 3 bytes such that in this case the pk will be 1500 bytes which exceeds the max length for a InnoDB primary key.
> Is there a spec. which stipulates that containernameDataType and subscriptionIdDataType should be VARCHAR(250)? Could these be changed to say VARCHAR(128) or some such so that the pk on that table will fall within the 1024 byte limit?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira