You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Evangelos Vlachogiannis (JIRA)" <je...@portals.apache.org> on 2009/05/31 19:04:07 UTC

[jira] Created: (JS2-1025) Mysql maven2 build error - UNIQUE INDEX key too long

Mysql maven2 build error - UNIQUE INDEX key too long
----------------------------------------------------

                 Key: JS2-1025
                 URL: https://issues.apache.org/jira/browse/JS2-1025
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Project Build
    Affects Versions: 2.2.2
         Environment: WinXP, jdk 1.6, mysql 5.0.45 community-nt
            Reporter: Evangelos Vlachogiannis


While building a custom j2.2 portal I got the following error:

Embedded error: Failed to execute:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE
ON PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NA
ME, NAME)
Specified key was too long; max key length is 1000 bytes
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unexpected error

I think that the:
CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON
PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)

query needs to be replaced with a shorter index e.g. (DTYPE, APPLICATION_NAME, PORTLET_NAME) but I do not know about side effects.

Please provide fix and deploy also to jars as people cannot build custom portals with j2.2 / mysql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (JS2-1025) Mysql maven2 build error - UNIQUE INDEX key too long

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma resolved JS2-1025.
----------------------------

    Resolution: Won't Fix

I think adding/setting table default character encoding (for mysql) is too environment specific for us to provide and making that configurable too much extra effort not worth it imo.
For production environments, tuning and tweaking things like the database schema is an administrative task often needed anyway, so better leave that to the experts at hand then. 


> Mysql maven2 build error - UNIQUE INDEX key too long
> ----------------------------------------------------
>
>                 Key: JS2-1025
>                 URL: https://issues.apache.org/jira/browse/JS2-1025
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Project Build
>    Affects Versions: 2.2.2
>         Environment: WinXP, jdk 1.6, mysql 5.0.45 community-nt
>            Reporter: Evangelos Vlachogiannis
>            Priority: Minor
>
> While building a custom j2.2 portal I got the following error:
> Embedded error: Failed to execute:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE
> ON PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NA
> ME, NAME)
> Specified key was too long; max key length is 1000 bytes
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unexpected error
> I think that the:
> CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON
> PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)
> query needs to be replaced with a shorter index e.g. (DTYPE, APPLICATION_NAME, PORTLET_NAME) but I do not know about side effects.
> Please provide fix and deploy also to jars as people cannot build custom portals with j2.2 / mysql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1025) Mysql maven2 build error - UNIQUE INDEX key too long

Posted by "Mansour Al Akeel (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910429#action_12910429 ] 

Mansour Al Akeel commented on JS2-1025:
---------------------------------------

Ate:
I am having the same issue. And I just created a portal application from the artifact. When it didn't work I had to follow the tutorial.

This issue makes the process of deploying jetspeed with mysql impossible. While tweaking the database for a specific environment is an administrative task and not to be carried by jetspeed deployment process, this issue is not related to tweaking the database for specific environment. I would not call getting jetspeed to work with a default MySQL installation a "specific environment". MySQL is one of the most popular DBMS.

> Mysql maven2 build error - UNIQUE INDEX key too long
> ----------------------------------------------------
>
>                 Key: JS2-1025
>                 URL: https://issues.apache.org/jira/browse/JS2-1025
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Project Build
>    Affects Versions: 2.2.2
>         Environment: WinXP, jdk 1.6, mysql 5.0.45 community-nt
>            Reporter: Evangelos Vlachogiannis
>            Priority: Minor
>
> While building a custom j2.2 portal I got the following error:
> Embedded error: Failed to execute:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE
> ON PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NA
> ME, NAME)
> Specified key was too long; max key length is 1000 bytes
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unexpected error
> I think that the:
> CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON
> PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)
> query needs to be replaced with a shorter index e.g. (DTYPE, APPLICATION_NAME, PORTLET_NAME) but I do not know about side effects.
> Please provide fix and deploy also to jars as people cannot build custom portals with j2.2 / mysql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1025) Mysql maven2 build error - UNIQUE INDEX key too long

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718328#action_12718328 ] 

Ate Douma commented on JS2-1025:
--------------------------------

Follow up comment from Vangelis send to the jetspeed-dev@ list on 2009-06-06:

Evangelos Vlachogiannis wrote:
> I have probably found the solution:
> 
> the problem was that I was using utf-8 mysql encoding (see from example 
> http://bugs.mysql.com/bug.php?id=4541). So I edited the generated 
> create-schema.sql and set:
> 
> CREATE TABLE PORTLET_PREFERENCE
> (
>    ID INTEGER NOT NULL,
>    DTYPE VARCHAR(10) NOT NULL,
>    APPLICATION_NAME VARCHAR(80) NOT NULL,
>    PORTLET_NAME VARCHAR(80) NOT NULL,
>    ENTITY_ID VARCHAR(80) NULL,
>    USER_NAME VARCHAR(80) NULL,
>    NAME VARCHAR(254) NOT NULL,
>    READONLY SMALLINT NOT NULL,
>    PRIMARY KEY (ID)
> ) DEFAULT CHARACTER SET latin1;
> 
> then the db was created successfully. ... however the
> 
> mvn jetspeed:mvn -Dtarget=all
> 
> cannot work if the jetspeed jars does not contain something like that;) 
> so I have to build the portal stepby step.
> 
> BR,
> Vangelis


> Mysql maven2 build error - UNIQUE INDEX key too long
> ----------------------------------------------------
>
>                 Key: JS2-1025
>                 URL: https://issues.apache.org/jira/browse/JS2-1025
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Project Build
>    Affects Versions: 2.2.2
>         Environment: WinXP, jdk 1.6, mysql 5.0.45 community-nt
>            Reporter: Evangelos Vlachogiannis
>            Priority: Minor
>
> While building a custom j2.2 portal I got the following error:
> Embedded error: Failed to execute:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE
> ON PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NA
> ME, NAME)
> Specified key was too long; max key length is 1000 bytes
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unexpected error
> I think that the:
> CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON
> PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)
> query needs to be replaced with a shorter index e.g. (DTYPE, APPLICATION_NAME, PORTLET_NAME) but I do not know about side effects.
> Please provide fix and deploy also to jars as people cannot build custom portals with j2.2 / mysql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (JS2-1025) Mysql maven2 build error - UNIQUE INDEX key too long

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma updated JS2-1025:
---------------------------

    Priority: Minor  (was: Major)

The problem really is with MySQL, this is not a Jetspeed bug.
The unique index cannot be made shorter without a complete object remodelling, we need all these columns in the index as it represent a *logical* model constraints.
The fact you're overrunning the *mysql* limit of 1000 bytes key length indicates you most likely are using an extremely long preference name.
I suggest trying to reduce your preference name length as easiest solution here.


> Mysql maven2 build error - UNIQUE INDEX key too long
> ----------------------------------------------------
>
>                 Key: JS2-1025
>                 URL: https://issues.apache.org/jira/browse/JS2-1025
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Project Build
>    Affects Versions: 2.2.2
>         Environment: WinXP, jdk 1.6, mysql 5.0.45 community-nt
>            Reporter: Evangelos Vlachogiannis
>            Priority: Minor
>
> While building a custom j2.2 portal I got the following error:
> Embedded error: Failed to execute:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE
> ON PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NA
> ME, NAME)
> Specified key was too long; max key length is 1000 bytes
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unexpected error
> I think that the:
> CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON
> PORTLET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)
> query needs to be replaced with a shorter index e.g. (DTYPE, APPLICATION_NAME, PORTLET_NAME) but I do not know about side effects.
> Please provide fix and deploy also to jars as people cannot build custom portals with j2.2 / mysql

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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