Hi,

The first error is because MySQL has a size limit on the index  and since 
multiple columns re involved it adds their lengths together. Develoeprs need to 
be aware of this when creating column lengths and then indexes. Does the cookie 
name really need to be allocated as a varchar(500)? 

If so, how much of it is unique enough to index off? You can specify a subset 
of the column to create the index, e.g.:

…. unique(PORTAL_COOKIE_ID, COOKIE_NAME(50))

Or MD5 the long columns.

The second is because INTERVAL is a reserved word in MySQL, but it has been 
used for a column name. That will need to be changed.

cheers,
Steve




On 09/02/2012, at 6:56 PM, Fabrice Marchon wrote:

> Hi,
> 
> Could someone please help me concerning installing uPortal 4.0.3 on
> Tomcat 6 using a MySQL database?
> 
> 
> 1) Part 1 with MySQL 5.1
> I encounter problems with the 'ant dbtest' target: it can create some
> tables (about 73), but not all.
> 
> Here is my first MySQL environment:
> - MySQL 5.1.57 (default storage InnoDB, lower_case_table_names=1,
> org.jasig.portal.io.threadPool.maxThreads=1)
> 
> Here is my error:
>  INFO HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
>     [java] ERROR HHH000388: Unsuccessful: create table
> UP_PORTLET_COOKIES (PORTLET_COOKIE_ID bigint not null, COOKIE_COMMENT
> varchar(1000), COOKIE_DOMAIN varchar(500), ENTITY_VERSION bigint,
> EXPIRES datetime not null, COOKIE_NAME varchar(500) not null,
> COOKIE_PATH varchar(1000), SECURE boolean not null, COOKIE_VALUE
> varchar(1000) not null, VERSION integer not null,
> portalCookie_PORTAL_COOKIE_ID bigint, PORTAL_COOKIE_ID bigint, primary
> key (PORTLET_COOKIE_ID), unique (PORTAL_COOKIE_ID, COOKIE_NAME))
> ENGINE=InnoDB
>     [java] ERROR Specified key was too long; max key length is 767 bytes
> ...
> 
> 
> 2) I try the same test with another version of MySQL 5.5
> Here is my second MySQL environment:
> - MySQL 5.5.19 (default storage InnoDB, lower_case_table_names=1,
> org.jasig.portal.io.threadPool.maxThreads=1)
> 
> Here is my error:
> ERROR HHH000388: Unsuccessful: create table
> UP_EVENT_AGGR_CONF_INTRVL_EXC (UP_EVENT_AGGR_CONF_INTRVL_ID bigint not
> null, INTERVAL varchar(255)) ENGINE=InnoDB
>     [java] ERROR You have an error in your SQL syntax; check the manual
> that corresponds to your MySQL server version for the right syntax to
> use near 'INTERVAL varchar(255)
>     [java]     ) ENGINE=InnoDB' at line 3
> ...
> 
> 
> I followed up the online guides for building uPortal with MySQL:
> -
> https://wiki.jasig.org/pages/viewpage.action?pageId=42696767#Building%26DeployinguPortal-uPortalFullSourceVersion
> - https://wiki.jasig.org/display/UPM40/MySQL
> 
> Full stack traces of compile and dbtest are attached for both tests.
> 
> 
> P.S.: I run the same build and deployment processes with a Postgres 8.2
> database and it works perfectly!!
> 
> -- 
> Fabrice Marchon
> 
> -- 
> You are currently subscribed to [email protected] as: 
> [email protected]
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/uportal-dev<uportal_403_compile_mysql55.txt><uportal_403_dbtest_mysql55.txt><uportal_403_dbtest_mysql51.txt><uportal_403_compile_mysql51.txt>


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to