Copied from the Apache ODE FAQ:
Q. My process fails with a selectionFailure; What can I do?
A. BPEL expects a single element to be selected when evaluating and expressions, and a selectionFailure fault is thrown if zero or more than one element are selected.
So I guess that the output variable is not initialized and you point to an element in the to-expression that is not (yet) existing.