click here for details... Sakai Executive Director Position Search now open
Issue Details (XML | Word | Printable)

Key: SAK-6102
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Roland Groen
Votes: 3
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Sakai

Additional info field of profile not stored above 255 characters

Created: 25-Aug-2006 06:37   Updated: 05-Jun-2009 08:36
Component/s: Profile
Affects Version/s: 2.2.1, 2.2.2, 2.2.3
Fix Version/s: None

Time Tracking:
Not Specified

Environment: debian linux / jdk1.5.0 / tomcat5.5.17 / mysql5 / mysql-connector-java-3.1.13-bin.jar
Issue Links:
Duplicate
 

2.6.x Status: None
2.5.x Status: None
2.4.x Status: None


 Description  « Hide
The additional info field of the profile larger than 255 chars is not updated into the db since it is stored in the NOTES field:

NOTES varchar(255)

Mysql than throws:

Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'NOTES' at row 1

As a consequence, the profile as a whole is not serialized but remains in the http session, with all subsequent consequences.

Either change the field type to TEXT or raise a proper warning at UI level.


 All   Comments   Work Log   Change History   Subversion Commits   git Commits      Sort Order: Ascending order - Click to sort in descending order
Jim Doherty added a comment - 10-Nov-2006 03:46
We've executed the following SQL in our Oracle environment to raise the limit to 4K for this field.

ALTER TABLE SAKAI_PERSON_T MODIFY NOTES VARCHAR2 (4000);

It might still be helpful to generate an error message when the user tries to add more the 4K to this field.



Sam Ottenhoff added a comment - 28-Feb-2007 15:10
It seems like this issue is fixed in 2.4.0_QA_002 on qa1-uk (Linux / MySQL).

Should this conversion be added to the 2.4 migration scripts?

Matthew Buckett added a comment - 08-Aug-2007 09:18
We are still seeing this issue on a 2.4.x install (MySQL), our notes column is set to 255 characters. Strangely in the hibernate mapping file the limit it set at 4k. Better validation of input would be good.

Kristol Hancock added a comment - 11-Feb-2009 06:44
We don't have the cycles to address this bug at this time. If someone is interested in providing a patch, please attach it to this bug and then assign the but to 'automatic'.

Steve Swinsburg added a comment - 05-Jun-2009 08:34 - edited
In the DB conversion scripts, this field was increased to 4000 in Sakai v2.1.2->2.2.0.

For newer installs, the Hibernate mapping has it at 4000 as well:
<property name="notes" column="NOTES" length="4000" />

However, if the SQL in common-composite-component/src/sql/DB-VENDOR/sakai_common.sql was run manually instead of using auto.ddl=true, that would have set it at 255:
NOTES varchar(255)

Could that be the culprit in the cases above?

Steve Swinsburg added a comment - 05-Jun-2009 08:36
Note also that in the same folder there is a DB upgrade script for this if you had manually run the creation script sakai_common.sql in that folder to create the tables: SAK-3861.sql