In my case I ran the configuration routine twice.
I had automatic configuration (ie config from xml in resources) in one method, then I implemented a configuration by setting properties in another method but I forgot to bypass the former. As soon as I did, the error gone.