as far as I can tell from the stacktrace the property for the next entity id can't be found in the database.
Usually this property should be set at engine creation time with the CheckDbCmd(). You should be able to manually set it with
commandService.execute(new CheckDbCmd());