500: Unexpected server error with NullPointerException

LabKey Support Forum (Inactive)
500: Unexpected server error with NullPointerException eva pujadas  2015-11-13 04:01
Status: Closed
 
That's just to report the cause of several "500: Unexpected server error" we got because of a "wrong designed" list in LabKey.

By error we created a list with primary key of type Integer, with an activated "Missing Value Indicators" checkbox in the "Advanced" tab of the "Edit Design" view.
That produced a series of errors, all with a "500: Unexpected server error" message, which, unfortunately, did no give us any clue about the possible cause.
The errors appear when:
- exporting the lists through the menu "Admin -> Folder -> Management -> Export"
- editing a record in this list
- inserting a new record in this list
After some investigation we found out the cause of that error.
I hope that can help others in case they face the same issue, and that it can help to build a more robust LabKey.

Thanks to the LabKey team for your great work,
Eva
 
 
Jon (LabKey DevOps) responded:  2015-11-13 12:41
Hi Eva,

Thanks for showing us this error!

The NPE is generating due to how the Missing Value Indicator is designed. Since you're attempting to apply it to the Primary Key of the table (a value that is required), it doesn't have the ability to have two columns stand behind it, the raw value and the missing value indicator. This is what is generating the NPE and there should be no reason to use the Missing Value Indicator on any Primary Key since the Primary Key will always have a value.

What we are going to have to do is to create an enhancement to prevent that box from being enabled on a primary key field for a future release of LabKey and update our docs (https://www.labkey.org/wiki/home/Documentation/page.view?name=manageMissing) to indicate that the feature isn't meant to be used on the Primary Key.

Regards,

Jon
 
Jon (LabKey DevOps) responded:  2015-11-13 13:07