Creating a review in Crucible fails - failed to lazily initialize a collection of role

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Attempting to create a review fails with a modal window containing the following message:

1 2 3 4 5 6 7 8 9 Error Server Error   Error 2 URL: /json/cru/TEST-1/loadFrxAjax A javax.servlet.ServletException was encountered javax.el.ELException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.cenqua.crucible.model.CrucibleRevision.otherDetails, no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.cenqua.crucible.model.CrucibleRevision.otherDetails, no session or session was closed failed to lazily initialize a collection of role: com.cenqua.crucible.model.CrucibleRevision.otherDetails, no session or session was closed

The following appears in the atlassian-fisheye-YYYY-MM-DD.log

1 2 3 4 5 6 7 8 9 10 11 2016-01-12 09:45:38,465 ERROR [qtp1383519982-42789 ] org.hibernate.LazyInitializationException LazyInitializationException-<init> - failed to lazily initialize a collection of role: com.cenqua.crucible.model.CrucibleRevision.otherDetails, no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.cenqua.crucible.model.CrucibleRevision.otherDetails, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375) at org.hibernate.collection.AbstractPersistentCollection.readElementByIndex(AbstractPersistentCollection.java:176) at org.hibernate.collection.PersistentMap.get(PersistentMap.java:169) at com.cenqua.crucible.model.CrucibleRevision$DetailsMap.get(CrucibleRevision.java:679) at com.cenqua.crucible.model.CrucibleRevision$DetailsMap.get(CrucibleRevision.java:607) at com.cenqua.crucible.model.CrucibleRevision.getDetail(CrucibleRevision.java:428) at com.cenqua.crucible.view.FRXDO.isDiffable(FRXDO.java:786) ...

Cause

In the same daily log you will see the same web request log the following error:

1 2 3 4 5 6 2016-01-12 09:45:38,428 ERROR [qtp1383519982-42789 ] fisheye UploadManager-createFileForUploadItem - Could not create upload directory: /opt/atlassian/fecru/data/var/data/uploads/02/41 2016-01-12 09:45:38,429 WARN [qtp1383519982-42789 ] fisheye DefaultContentManager-tryStoreRevision - Couldn't store revision test/test_file.txt : 17018 (51543) java.lang.RuntimeException: java.io.IOException: Could not create directory to store upload. ... Caused by: java.io.IOException: Could not create directory to store upload. ... 287 more

Resolution

Update the folder permissions on the path referenced in the error message so that the user running the application can write. Your permissions requirements might be more strict than the following example and a recursive call to the root of the of the uploads folder might take some time to complete depending on the amount of data:

chmod -R u+w /opt/atlassian/fecru/data/var/data/uploads

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.