portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evangelos Vlachogiannis <evl...@aegean.gr>
Subject Re: [jira] Updated: (JS2-1025) Mysql maven2 build error - UNIQUE INDEX key too long
Date Sat, 06 Jun 2009 10:23:00 GMT
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

Vlachogiannis Evangelos wrote:
> Hi,
>
>
> Yes I have followed this tutorial -  http://portals.apache.org/jetspeed-2/tutorial/index.html
>
>
> Here is the mvn -X jetspeed:mvn -Dtarget=all
>
>
> --------
>  # PORTLET_PREFERENCE # --------------------------------------------------------
> ---------------
>   CREATE TABLE PORTLET_PREFERENCE ( ID INTEGER NOT NULL, DTYPE VARCHAR(10) NOT N
> ULL, APPLICATION_NAME VARCHAR(80) NOT NULL, PORTLET_NAME VARCHAR(80) NOT NULL, E
> NTITY_ID VARCHAR(80) NULL, USER_NAME VARCHAR(80) NULL, NAME VARCHAR(254) NOT NUL
> L, READONLY SMALLINT NOT NULL, PRIMARY KEY (ID) )
> [DEBUG] SQL:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON PORTLET_PREFERENCE
> (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)
> [ERROR] Failed to execute:   CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON PORTL
> ET_PREFERENCE (DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME
> )
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Unexpected 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] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unexpected error
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:583)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:499)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:478)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:330)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:291)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Unexpected error
>         at org.apache.jetspeed.maven.utils.SqlScripts.runScript(SqlScripts.java:
> 187)
>         at org.apache.jetspeed.maven.utils.SqlScripts.execute(SqlScripts.java:94
> )
>         at org.apache.jetspeed.maven.plugins.InitMojo.execute(InitMojo.java:113)
>
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:451)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:558)
>         ... 16 more
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to execute:
> CREATE UNIQUE INDEX UIX_PORTLET_PREFERENCE ON PORTLET_PREFERENCE (DTYPE, APPLICA
> TION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME)
>         at org.apache.jetspeed.maven.utils.SqlScripts.execSQL(SqlScripts.java:27
> 8)
>         at org.apache.jetspeed.maven.utils.SqlScripts.runScript(SqlScripts.java:
> 174)
>         ... 20 more
> Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Specified key wa
> s too long; max key length is 1000 bytes
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
>         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:734)
>         at org.apache.jetspeed.maven.utils.SqlScripts.execSQL(SqlScripts.java:23
> 6)
>         ... 21 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 24 seconds
> [INFO] Finished at: Fri Jun 05 15:33:22 EEST 2009
> [INFO] Final Memory: 11M/22M
> [INFO] ------------------------------------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] ...FAILED[code=1].
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.BuildFailureException: ...FAILED[code=1].
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:579)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:512)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:482)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:330)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:227)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoFailureException: ...FAILED[code=1].
>         at org.apache.jetspeed.maven.plugins.MvnMojo.executeTarget(MvnMojo.java:
> 506)
>         at org.apache.jetspeed.maven.plugins.MvnMojo.execute(MvnMojo.java:328)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:451)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:558)
>         ... 16 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 3 minutes 5 seconds
> [INFO] Finished at: Fri Jun 05 15:33:22 EEST 2009
> [INFO] Final Memory: 5M/9M
> [INFO] ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.339 / Virus Database: 270.12.53/2155 - Release Date: 06/04/09 17:55:00
>   

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


Mime
View raw message