On 27/03/2013 14:30, Adam Davenport wrote:
I am in the process of evaluating Syncope as our university is in the process of selecting a new identity management solution. My first step is to install Syncope and investigate the out of the box features.

I have followed the directions for the wiki documentation:
1) Create a new Syncope project
2) Run Syncope in real environment

However, when I navigate to http://localhost:8080/syncope-console, I get the message : "Alert : Session expired: please login again." I
checked log files and discovered the following:

[...]
org.apache.openjpa.persistence.PersistenceException: Specified key was too long; max key length is 767 bytes {stmnt 66373625 CREATE TABLE ConnInstance (id BIGINT NOT NULL, bundleName VARCHAR(255) NOT NULL, connectorName VARCHAR(255) NOT NULL, displayName VARCHAR(255), version VARCHAR(255) NOT NULL, xmlConfiguration TEXT, PRIMARY KEY (id), UNIQUE U_CNNNTNC_DISPLAYNAME (displayName)) ENGINE = innodb} [code=1071, state=42000] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) ~[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE]

*Infrastructure*
Server: Windows Server 2008 R2 Standard
App Serv: Tomcat 7.0
Database: MySQL 5.6
Java: Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Any suggestions?

Hi Adam,
the error message above ("Specified key was too long; max key length is 767 bytes") seems to be related to MySQL's InnoDB [1].

As you can read from [2], in fact, one of InnoDB limits is that "By default, an index key for a single-column index can be up to 767 bytes" while in our case displayName is longer. This default behavior can be changed [3].

Possible workarounds:
a) disable InnoDB in MySQL and go with MyISAM (quicker and easier, especially if you are just evaluating) b) play with InnoDB configuration to allow longer single-column indexes (I have no enough experience in this field, though) c) override ConnInstance.java in your own project and remove the UNIQUE constraint annotation from displayName (not suggested, as would introduce deviation from standard Syncope persistence classes)

HTH
Regards

[1] http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes
[2] http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html
[3] http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_large_prefix

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to