You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Ingo Siebert <in...@cas.de> on 2007/12/04 12:32:20 UTC

Contimuum 1.1 with MySQL 5.0

Hi,

i'm trying to use MySQL instead of Derby, because it is already 
available at the server.

I used this tutorial, but i use this JDBC driver: rg.gjt.mm.mysql.Driver
   http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+on+MySQL


But i get this problem.

58969 [http-9080-Processor24] ERROR JPOX.RDBMS  - Error thrown executing 
CREATE TABLE `JDOUSER`
(
     `USERNAME` VARCHAR(256) BINARY NOT NULL,
     `ACCOUNT_CREATION_DATE` DATETIME NULL,
     `COUNT_FAILED_LOGIN_ATTEMPTS` INTEGER NOT NULL,
     `EMAIL` VARCHAR(256) BINARY NULL,
     `ENCODED_PASSWORD` VARCHAR(256) BINARY NULL,
     `FULL_NAME` VARCHAR(256) BINARY NULL,
     `LAST_LOGIN_DATE` DATETIME NULL,
     `LAST_PASSWORD_CHANGE` DATETIME NULL,
     `LOCKED` BIT NOT NULL,
     `MODEL_ENCODING` VARCHAR(256) BINARY NULL,
     `USER_PASSWORD` VARCHAR(256) BINARY NULL,
     `PASSWORD_CHANGE_REQUIRED` BIT NOT NULL,
     `PERMANENT` BIT NOT NULL,
     `VALIDATED` BIT NOT NULL,
     PRIMARY KEY (`USERNAME`)
) ENGINE=INNODB : Specified key was too long; max key length is 765 bytes

Does someone use the current continuum version with MySQL 5.0?
Is there any workaround?

Cheers,

Ingo

Re: Contimuum 1.1 with MySQL 5.0

Posted by Ingo Siebert <in...@cas.de>.
Thank you!

I also needed to change the 'users' database to the latin1 charset.
It seems it's working fine now.

Cheers,

Ingo

ossi petz schrieb:
> Hallo
> 
> i have a very similar issue (etch mysql 5.0.32):
> 
> 2007-12-04 17:09:50,777 [main] ERROR JPOX.RDBMS  - Error thrown 
> executing CREATE TABLE `SECURITY_OPERATIONS`
> (
>     `NAME` VARCHAR(256) BINARY NOT NULL,
>     `DESCRIPTION` VARCHAR(256) BINARY NULL,
>     `PERMANENT` BIT NOT NULL,
>     `RESOURCE_REQUIRED` BIT NOT NULL,
>     PRIMARY KEY (`NAME`)
> ) ENGINE=INNODB : Specified key was too long; max key length is 765 bytes
> com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Specified key was 
> too long; max key length is 765 bytes
> 
> 
> in the jpox forums are quite some posts on this. it seems to be some 256 
>  > 255 issue in JDO specs as mysql is a little strict in lengths. the 
> workaround i found working is change the charset of the database from 
> utf-8 to latin1_general_ci
> 
> ALTER DATABASE `mvn_continuum` DEFAULT CHARACTER SET latin1 COLLATE 
> latin1_general_ci
> 
> 
> hope this helps :)
> regards
> 
> ossi
> 
> 
> 
> Ingo Siebert schrieb:
>> Hi Damien,
>>
>> i'm using MySQL 5.0.32. It's coming as a stable Debian package.
>>
>> I tried the other driver "com.mysql.jdbc.Driver", but it doesn't 
>> change anything.
>>
>> Maybe someone can look into my attached logfile to find a solution.
>> Any other idea? I think VAHCHAR(256) isn't more than 756 Bytes.
>>
>> Ingo
>>
>>
>> Damien Lecan schrieb:
>>> Hello,
>>>
>>>> i'm trying to use MySQL instead of Derby, because it is already
>>>> available at the server.
>>>>
>>>> I used this tutorial, but i use this JDBC driver: 
>>>> rg.gjt.mm.mysql.Driver
>>>>    http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+on+MySQL
>>>> ...
>>>> Does someone use the current continuum version with MySQL 5.0?
>>>
>>> Yes, it works fine with Mysql 5.0.45.
>>> But class name for the official MySQL Connector/J driver is
>>> com.mysql.jdbc.Driver.
>>>
>>>> Is there any workaround?
>>>
>>> Try com.mysql.jdbc.Driver driver ?
>>>
>>>
>>> Damien Lecan
>>
>>
>>
> 


Re: Contimuum 1.1 with MySQL 5.0

Posted by ossi petz <os...@gmail.com>.
Hallo

i have a very similar issue (etch mysql 5.0.32):

2007-12-04 17:09:50,777 [main] ERROR JPOX.RDBMS  - Error thrown 
executing CREATE TABLE `SECURITY_OPERATIONS`
(
     `NAME` VARCHAR(256) BINARY NOT NULL,
     `DESCRIPTION` VARCHAR(256) BINARY NULL,
     `PERMANENT` BIT NOT NULL,
     `RESOURCE_REQUIRED` BIT NOT NULL,
     PRIMARY KEY (`NAME`)
) ENGINE=INNODB : Specified key was too long; max key length is 765 bytes
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Specified key was 
too long; max key length is 765 bytes


in the jpox forums are quite some posts on this. it seems to be some 256 
 > 255 issue in JDO specs as mysql is a little strict in lengths. the 
workaround i found working is change the charset of the database from 
utf-8 to latin1_general_ci

ALTER DATABASE `mvn_continuum` DEFAULT CHARACTER SET latin1 COLLATE 
latin1_general_ci


hope this helps :)
regards

ossi



Ingo Siebert schrieb:
> Hi Damien,
> 
> i'm using MySQL 5.0.32. It's coming as a stable Debian package.
> 
> I tried the other driver "com.mysql.jdbc.Driver", but it doesn't change 
> anything.
> 
> Maybe someone can look into my attached logfile to find a solution.
> Any other idea? I think VAHCHAR(256) isn't more than 756 Bytes.
> 
> Ingo
> 
> 
> Damien Lecan schrieb:
>> Hello,
>>
>>> i'm trying to use MySQL instead of Derby, because it is already
>>> available at the server.
>>>
>>> I used this tutorial, but i use this JDBC driver: rg.gjt.mm.mysql.Driver
>>>    http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+on+MySQL
>>> ...
>>> Does someone use the current continuum version with MySQL 5.0?
>>
>> Yes, it works fine with Mysql 5.0.45.
>> But class name for the official MySQL Connector/J driver is
>> com.mysql.jdbc.Driver.
>>
>>> Is there any workaround?
>>
>> Try com.mysql.jdbc.Driver driver ?
>>
>>
>> Damien Lecan
> 
> 
> 


Re: Contimuum 1.1 with MySQL 5.0

Posted by Ingo Siebert <in...@cas.de>.
Hi Damien,

i'm using MySQL 5.0.32. It's coming as a stable Debian package.

I tried the other driver "com.mysql.jdbc.Driver", but it doesn't change 
anything.

Maybe someone can look into my attached logfile to find a solution.
Any other idea? I think VAHCHAR(256) isn't more than 756 Bytes.

Ingo


Damien Lecan schrieb:
> Hello,
> 
>> i'm trying to use MySQL instead of Derby, because it is already
>> available at the server.
>>
>> I used this tutorial, but i use this JDBC driver: rg.gjt.mm.mysql.Driver
>>    http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+on+MySQL
>> ...
>> Does someone use the current continuum version with MySQL 5.0?
> 
> Yes, it works fine with Mysql 5.0.45.
> But class name for the official MySQL Connector/J driver is
> com.mysql.jdbc.Driver.
> 
>> Is there any workaround?
> 
> Try com.mysql.jdbc.Driver driver ?
> 
> 
> Damien Lecan




Re: Contimuum 1.1 with MySQL 5.0

Posted by Damien Lecan <ml...@dlecan.com>.
Hello,

> i'm trying to use MySQL instead of Derby, because it is already
> available at the server.
>
> I used this tutorial, but i use this JDBC driver: rg.gjt.mm.mysql.Driver
>    http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+on+MySQL
> ...
> Does someone use the current continuum version with MySQL 5.0?

Yes, it works fine with Mysql 5.0.45.
But class name for the official MySQL Connector/J driver is
com.mysql.jdbc.Driver.

> Is there any workaround?

Try com.mysql.jdbc.Driver driver ?


Damien Lecan