java.lang.IllegalStateException: Character set is not defined for uploadItem

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.


Whenever you try opening a review the following error can be found in the atlassian-fisheye.log:

2019-08-02 13:42:03,071 ERROR [qtp943573036-841 ] fisheye FRXDO-mapInlineComments - Error mapping comments. Cannot display comments on review CR-1. Error: Character set is not defined for uploadItem file.txt
java.lang.IllegalStateException: Character set is not defined for uploadItem file.txt
	at com.cenqua.crucible.revision.managers.DefaultEncodedContentProvider.getCharset( [fisheye.jar:?]
	at com.cenqua.crucible.revision.managers.DefaultEncodedContentProvider.getContent( [fisheye.jar:?]
	at com.cenqua.crucible.revision.managers.DefaultContentManager.getContents( [fisheye.jar:?]
	at com.cenqua.fisheye.diff.DiffHelper.getHunkList( [fisheye.jar:?]
	at com.cenqua.crucible.revision.source.Source.getHunkList( [fisheye.jar:?]
	at com.cenqua.crucible.view.FRXDO.getHunkList( [fisheye.jar:?]
	at com.cenqua.crucible.view.FRXDO.getTetrisGrid( [fisheye.jar:?]
	at com.cenqua.crucible.view.FRXDO.mapInlineComments( [fisheye.jar:?]
	at com.cenqua.crucible.view.FRXDO.<init>( [fisheye.jar:?]
	at com.cenqua.crucible.revision.managers.DefaultContentManager.makeFRXDO( [fisheye.jar:?]
	at com.atlassian.crucible.actions.ReviewBaseAction.makeFRXDO( [fisheye.jar:?]
	at com.atlassian.crucible.actions.ViewFRXAction$1.doInTransaction( [fisheye.jar:?]
	at com.atlassian.crucible.actions.ViewFRXAction$1.doInTransaction( [fisheye.jar:?]
	at com.atlassian.fisheye.spi.impl.DefaultTxTemplate.execute( [fisheye.jar:?]
	at com.atlassian.crucible.actions.ViewFRXAction.execute( [fisheye.jar:?]


This problem may happen when the review has files uploaded as Attachments or as Pre-commit patches.

At the moment these files get uploaded they don't have a charset / encoding defined (or Crucible fails to detect it), and this information goes missing into the database.

The error happens when Crucible tries to retrieve the information from the database and the charset cannot be found.


  1. Shut down Crucible

  2. Backup the database using the database vendor software, just to be on the safe side.
  3. Query the database for the file mentioned in the stack trace (e.g., file.txt in the example above) by running this query:

    SELECT cru_charset, cru_upload_id, cru_original_name FROM cru_upload_item WHERE cru_original_name = 'file.txt';
  4. You may get a multiple rows in the query output, and among them you may see a few rows with cru_charset empty (or null):

     cru_charset | cru_upload_id | cru_original_name
     UTF-8       |         35205 | file.txt
     UTF-8       |         35206 | file.txt
     UTF-8       |         35264 | file.txt
     UTF-8       |         35265 | file.txt
                 |         35377 | file.txt
                 |         35376 | file.txt
  5. Fix the problem by adding 'UTF-8' to cru_charset where they're missing by running this query:

    UPDATE cru_upload_item SET cru_charset = 'UTF-8' WHERE cru_upload_id = 35376 AND cru_original_name = 'file.txt';
    UPDATE cru_upload_item SET cru_charset = 'UTF-8' WHERE cru_upload_id = 35377 AND cru_original_name = 'file.txt';
  6. Start Crucible

DescriptionAn IllegalStateException error happens when opening a review that contains uploaded files because no charset is found at database level
Last modified on Aug 6, 2019

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.