I am getting a strange runtime error from my code:
\"Found interface [SomeInterface] but class was expected\"
How can this happen? How can an i
This happened to me when i was running a maven build.
From what i could gather (as well as from Jared's answer) as the reason was that - there were two versions of the same 3rd party jar specified in my effective pom.xml. One version was coming in as a transitive dependency and the other was specified by me in my local pom.xml.
So at compile time, it was referring to the old version and at runtime it was referring to the new version.
I removed the version specified in my local pom.xml and it worked.
Of course, the 3rd party had broken backward-compatibility between their versions and changed a class to an interface or vice-versa. But they are free to do so.