Import CSV with split: Cannot invoke method split() on null object


Does anyone has import data using the “split” eval with an empty column ?
I tried to import somes roles with menus and permission but when permissions column is empty I have an error :

2018-06-21 15:56:47.723 ERROR 3138 --- [gine[Catalina]]]          : Unable to import record: [role.femtonext.exploit, Exploit Team, , ]
2018-06-21 15:56:47.723 ERROR 3138 --- [gine[Catalina]]]          : With following exception:
java.lang.NullPointerException: Cannot invoke method split() on null object
        at org.codehaus.groovy.runtime.NullObject.invokeMethod(

The CSV content sample:

role.femtonext.exploit;Exploit Team;;

Do I need to set an empty value like " " or “” in empty column .?

Thank you for your help

Something like that :

eval="myCol != null ? myCol.split(',') as List : []"

Great, you are fantastic :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.