You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ErinO <Er...@hotmail.com> on 2006/04/11 19:56:56 UTC
error using MySql
Hi,
I am trying to config the ActiveMQ 4.0 RC1 to use mysql, I tried both
mysql-connector-java-3.1.12-bin.jar and
mysql-connector-java-5.0.0-beta-bin.jar, and got the same error message:
Failure was: CREATE TABLE ACTIVEMQ_ACKS(CONTAINER VARCHAR(250) NOT NULL,
CLIENT_ID VARCHAR(250) NOT NULL, SUB_NAME VARCHAR(250) NOT NULL, SELECTOR
VARCHAR(250), LAST_ACKED_ID INTEGER, PRIMARY KEY ( CONTAINER, CLIENT_ID,
SUB_NAME)) Message: Specified key was too long; max key length is 1024 bytes
SQLState: 42000 Vendor code: 1071
This is part of the config file related to db setup:
<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"
dataSource="#mysql-ds" useJournal="true">
<adapter><bytesJDBCAdapter/></adapter>
</journaledJDBC>
</persistenceAdapter>
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://localhost/boe120?relaxAutoCommit=true"/>
<property name="username" value="sa"/>
<property name="password" value="password"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
Please let me know what I did wrong.
Thanks.
Erin
--
View this message in context: http://www.nabble.com/error-using-MySql-t1433357.html#a3867047
Sent from the ActiveMQ - User forum at Nabble.com.
Re: error using MySql
Posted by "Christopher G. Stach II" <cg...@ldsys.net>.
ErinO wrote:
> Thanks for the reply.
>
> I am using the ActiveMQ default db statements, does that mean if I want to
> use mysql, I need to customize those statements?
>
>
> Erin
> --
> View this message in context: http://www.nabble.com/error-using-MySql-t1433357.html#a3868123
> Sent from the ActiveMQ - User forum at Nabble.com.
>
Maybe you just need to use a different default character set in my.cnf.
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
--
Christopher G. Stach II
Re: error using MySql
Posted by ErinO <Er...@hotmail.com>.
Thanks for the reply.
I am using the ActiveMQ default db statements, does that mean if I want to
use mysql, I need to customize those statements?
Erin
--
View this message in context: http://www.nabble.com/error-using-MySql-t1433357.html#a3868123
Sent from the ActiveMQ - User forum at Nabble.com.
Re: error using MySql
Posted by "Christopher G. Stach II" <cg...@ldsys.net>.
ErinO wrote:
> Hi,
>
> I am trying to config the ActiveMQ 4.0 RC1 to use mysql, I tried both
> mysql-connector-java-3.1.12-bin.jar and
> mysql-connector-java-5.0.0-beta-bin.jar, and got the same error message:
>
> Failure was: CREATE TABLE ACTIVEMQ_ACKS(CONTAINER VARCHAR(250) NOT NULL,
> CLIENT_ID VARCHAR(250) NOT NULL, SUB_NAME VARCHAR(250) NOT NULL, SELECTOR
> VARCHAR(250), LAST_ACKED_ID INTEGER, PRIMARY KEY ( CONTAINER, CLIENT_ID,
> SUB_NAME)) Message: Specified key was too long; max key length is 1024 bytes
> SQLState: 42000 Vendor code: 1071
(250 + 250 + 250) * <default charset character width> = something
greater than 1024
--
Christopher G. Stach II