javaserialversionuid

Find which class in which jar has a given serialVersionUID


When I get a java.io.InvalidClassException, it gives me the serialVersionUID that it wants, and the serialVersionUID that it got. Is there an easy way to tell which of my dozens of jars using the wrong serialVersionUID?

Update: I should mention that our intention is to update everything at the same time, but I'm trying to debug a problem in our build and deploy process.


Solution

  • use the serialver tool from the sun jdk for each class in the jar.