Unable to access a Crucible review with no row with the given identifier exists errors
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Unable to access a Crucible review with the following errors appearing inside the atlassian-fisheye-<date>.log file:
2014-03-07 16:29:54,393 WARN [qtp151680292-241952 ] org.eclipse.jetty.servlet.ServletHandler ServletHandler-doHandle -
javax.servlet.ServletException: javax.servlet.ServletException: javax.el.ELException: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.cenqua.crucible.model.FileRevisionExtraInfo#3041180]
...
Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.cenqua.crucible.model.FileRevisionExtraInfo#3041180]
at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:449)
at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:189)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:178)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:191)
at com.cenqua.crucible.model.FileRevisionExtraInfo_$$_javassist_43.hashCode(FileRevisionExtraInfo_$$_javassist_43.java)
at java.util.HashMap.hash(HashMap.java:366)
at java.util.HashMap.put(HashMap.java:496)
at java.util.HashSet.add(HashSet.java:217)
at com.cenqua.crucible.model.ReviewParticipant.getCompletedFrxs(ReviewParticipant.java:223)
Diagnosis
Run the following SQL query to check if there is database integrity issue:
select * from cru_file_read_status where cru_frx not in (select cru_frx_id from cru_frx);
Cause
Cause 1
There is database integrity issue. The table cru_file_read_status
has content in the column cru_frx
that does not exist in the table cru_frx
.
Cause 2
The database integrity issue can also be caused by having more than one Fisheye/Crucible instance connected to the same database. This might be the case if you get no results after running the SQL query above.
Resolution
Resolution 1 - Fix integrity issue in cru_file_read_status
Stop your Fisheye/Crucible server.
- Backup your database for rollback purposes.
Run the following SQL query to delete the problematic data:
delete from cru_file_read_status where cru_frx not in (select cru_frx_id from cru_frx);
- Restart your Fisheye/Crucible server.
Resolution 2 - Connecting only one Fisheye/Crucible instance to the database
- Stop all of your Fisheye/Crucible instances that are connected to the same database.
- Modify
config.xml
to ensure that only one instance is pointing to a single database at all times. - Start your Fisheye/Crucible server.