[ http://jira.activemq.org/jira//browse/AMQ-533?page=comments#action_35895 ]
shantharam commented on AMQ-533: -------------------------------- Here is the complete solution, this resolved isse for us, update the datasource configuration as below <persistenceAdapter> <journaledJDBC useJournal="false" journalLogFiles="5" dataDirectory="../activemq-data" dataSource="#ds"/> <statements> <statements stringIdDataType ="VARCHAR(128)" msgIdDataType="VARCHAR(128)" containerNameDataType="VARCHAR(128)"/> </statements> </persistenceAdapter> > 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 RC1 > > > 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