org.hibernate.PropertyAccessException when opening a review

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

Symptoms

The following appears in the atlassian-fisheye.log when opening a review:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2014-05-20 15:00:00,000 ERROR - Exception "org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.cenqua.crucible.model.Patch.availableForAdding" (javax.servlet.ServletException) while processing "/review/cru/CR-1" (Referer:"http://localhost:8060/review/project/CR") javax.servlet.ServletException: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.cenqua.crucible.model.Patch.availableForAdding at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:285) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) (...) Caused by: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.cenqua.crucible.model.Patch.availableForAdding at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:109) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:586) (...) Caused by: java.lang.IllegalArgumentException at sun.reflect.GeneratedMethodAccessor1643.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:66) ... 202 more

Cause

This may happen after an upgrade from Fisheye/Crucible 2.x to 3.x, on the following condition:

  • If a review was created from the old version after the database schema was upgraded, it will assign a NULL value to the column cru_available_for_add of the table cru_patch because this column was not present in the old version.

  • This can also lead to Not a patch revision id error when opening a review.

Resolution

  • Check you have records with a NULL value in this column:

1 select * from cru_patch where cru_available_for_add is null
  • Set this column to true for these records:

1 update cru_patch set cru_available_for_add=true where cru_available_for_add is null
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.