Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
7.6.1
-
JIRA 4.3.4, Windows Server 2003, Tomcat 6, WAR-deployed version of JIRA, SQL Server 2005 database
-
7.06
-
1
-
Severity 2 - Major
-
Description
Steps to recreate:
- In Active Directory, create a group with a description > 255 characters
- Set a user directory in JIRA against said Active Directory
- Synchronise
For any group with a large description, something like the following will be spit out in the log:
com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Group][id,13837][groupName,GroupWithLongDescription][updatedDate,2011-07-08 17:23:33.25][description,PSLSF11\DEPTS\TRNG\2 OPERATIONS TRAINING\APPROVED MATERIAL [R]; \\PSLSF11\DEPTS\TRNG\3 MAINT TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\4 TECH TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\5 CONFIG_ASSESSMENT\APPROVED MATERIALS [R]; PSLSF11\DEPTS\TRNG\7 GENERAL EMPLOYEE TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\11 NUC DIV TRNG [R]; PSLSF11\DEPTS\TRNG\12 LMS\APPROVED MATERIAL [R]][directoryId,10000][lowerDescription,pslsf11\depts\trng\2 operations training\approved material [r]; \\pslsf11\depts\trng\3 maint training\approved material [r]; pslsf11\depts\trng\4 tech training\approved material [r]; pslsf11\depts\trng\5 config_assessment\approved materials [r]; pslsf11\depts\trng\7 general employee training\approved material [r]; pslsf11\depts\trng\11 nuc div trng [r]; pslsf11\depts\trng\12 lms\approved material [r]][active,1][local,0][type,GROUP][lowerGroupName,GroupWithLongDescription][createdDate,2011-07-08 17:23:33.25] (SQL Exception while executing the following:INSERT INTO jiraschema.cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation)) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167) at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.add(OfBizGroupDao.java:158) at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.add(OfBizGroupDao.java:144) at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.addAll(OfBizGroupDao.java:136) at com.atlassian.crowd.directory.CachingDirectory.addAllGroups(CachingDirectory.java:109) at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.addOrUpdateCachedGroups(DbCachingRemoteDirectoryCache.java:445) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAllGroups(UsnChangedCacheRefresher.java:273) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:35) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:209) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:645) at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:84) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Group][id,13837][groupName,GroupWithLongDescription][updatedDate,2011-07-08 17:23:33.25][description,PSLSF11\DEPTS\TRNG\2 OPERATIONS TRAINING\APPROVED MATERIAL [R]; \\PSLSF11\DEPTS\TRNG\3 MAINT TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\4 TECH TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\5 CONFIG_ASSESSMENT\APPROVED MATERIALS [R]; PSLSF11\DEPTS\TRNG\7 GENERAL EMPLOYEE TRAINING\APPROVED MATERIAL [R]; PSLSF11\DEPTS\TRNG\11 NUC DIV TRNG [R]; PSLSF11\DEPTS\TRNG\12 LMS\APPROVED MATERIAL [R]][directoryId,10000][lowerDescription,pslsf11\depts\trng\2 operations training\approved material [r]; \\pslsf11\depts\trng\3 maint training\approved material [r]; pslsf11\depts\trng\4 tech training\approved material [r]; pslsf11\depts\trng\5 config_assessment\approved materials [r]; pslsf11\depts\trng\7 general employee training\approved material [r]; pslsf11\depts\trng\11 nuc div trng [r]; pslsf11\depts\trng\12 lms\approved material [r]][active,1][local,0][type,GROUP][lowerGroupName,GroupWithLongDescription][createdDate,2011-07-08 17:23:33.25] (SQL Exception while executing the following:INSERT INTO jiraschema.cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Data truncation)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162) ... 16 more
Can I recommend one of the following?
- Change DDL to make fields cwd_group.description and cwd_group.lower_description of type varchar(MAX)?
- Change DB access code to auto-snip any descriptions > 255 characters?
My workaround was modifying the DB schema like the first option. Of course, this is going to cause an issue on the next upgrade if I have to start with another empty JIRA database.
Attachments
Issue Links
- relates to
-
CWD-4909 Increase Character Limit of the Group Description
- Future Consideration