Thank you for contacting Aspose support.
I have used the following piece of code against the latest version of Aspose.Cells for Java 8.5.0 to verify your presented scenario. Please note, I am unable to replicate the said exception, in fact the style was applied correctly to the specified row.
Please give a try to the following code on your end. In case the problem persists, please provide us your input spreadsheet along with your complete code (most preferably a sample application) for further investigation.
Workbook sourcebook = new Workbook(“sample.xlsx”);
Worksheet sheet = sourcebook.getWorksheets().get(0);
Cells cells = sheet.getCells();
Style style = sourcebook.createStyle();
StyleFlag flag = new StyleFlag();
cells.applyRowStyle(0, style, flag);