It looks like you've not initialized indices and values, so scala at some point is trying to work with their default values. Also based on the documentation you've linked you need to create SparseVector with new (maybe there's no companion object?)
I can't test, but I suggest to try the following:
val indices = Array(1,2,3) // indices is expected to be an array of Int
val values = Array(1.0d,2.0d,3.0d) // values is an array of doubles
val v2 = new SparseVector(3, indices, values)
does this work? If it does, the problem may be in the part of code you omitted after val featValues