Update: While I still don't know the reason for the error, changing to a different java version in the eclipse preferences fixed it.