Studio Error for any type of PickerField

HI,

When using Studio 6.6.0 (and now 6.6.1), whenever I try to add any type of PickerField (PickerField, LookupPickerField, SearchPickerField), Studio throw a null pointer error, as follows. Any help would be appreciated

[21:37:01.845] Unexpected error
java.lang.NullPointerException
[21:37:06.939] Exception has been thrown by com.haulmont.studio.ui.app.a@7a0ee6f8:
[21:37:06.939] java.lang.NullPointerException
 at java.lang.String.compareTo(String.java:1155)
 at java.lang.String.compareTo(String.java:111)
 at java.util.Comparators$NaturalOrderComparator.compare(Comparators.java:52)
 at java.util.Comparators$NaturalOrderComparator.compare(Comparators.java:47)
 at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
 at java.util.TimSort.sort(TimSort.java:220)
 at java.util.Arrays.sort(Arrays.java:1512)
 at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:348)
 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
 at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
 at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
 at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
 at com.haulmont.studio.ui.sd.layout.model.prop.PickerFieldMetaClassComponentProperty.getOptions(SourceFile:50)
 at com.haulmont.studio.ui.sd.layout.TabularPropertiesEditor.createField(SourceFile:409)
 at com.haulmont.studio.ui.sd.layout.TabularPropertiesEditor.addPropertyToGrid(SourceFile:334)
 at com.haulmont.studio.ui.sd.layout.TabularPropertiesEditor.createPropertiesContainer(SourceFile:258)
 at com.haulmont.studio.ui.sd.layout.TabularPropertiesEditor.refresh(SourceFile:393)
 ...

Hi,
Thank you for reporting the problem. We have created a YouTrack issue, see the link on the right.

This is happening because MappedSuperClass in the project doesn’t have the @MetaClass annotation.

Hi Natalia, thanks.

For a workaround, for now, can I manually add @MetaClass to the entity? If so, where should it go?

You can manually add the @MetaClass annotation to the entity from the IDE. Select your entity in Studio and click the IDE button to open the entity class in the IDE. Take a look at the documentation for more information and examples.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/STUDIO-3920