Bulk import failure due to special characters
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Bulk import failure due to special characters

Error received in the bulk import template was as below:

Error: NullPointerException:Cannot invoke "com.krishagni.catissueplus.core.biospecimen.domain.CollectionProtocol.getId()" because the return value of "com.krishagni.catissueplus.core.biospecimen.domain.CollectionProtocolRegistration.getCollectionProtocol()" is null

The user is trying to import data for the registration custom form, but getting the above error

How to check if your file contains special characters

Using command prompt you can execute the below command for the file

For Linux or Mac

cat -A filename.csv | head -1

For Windows: You can inspect special characters, using: Notepad++ → Open file → View > Show Symbol > Show All Characters

Cause:

The file contained special character at the start of the header row. This typically happens when the file is edited and saved using Excel, which adds a non-printing Unicode character: U+FEFF (Byte Order Mark).

image.png

Fix

  1. Download a fresh template from the user interface

  2. Copy values from the old file to the new file

  3. Upload the new file

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com