Measurement of the branching fraction B(B-u(+)->J/psi pi(+)) and search for B-c(+)->J/psi pi(+)