I have a theory that it is because class B is missing a SeriealVersionUID so when deserializing the parent type (A) is read instead of the child type (B)
If you don't specify a SerialVersionUID the the compiler calculates one for you so class B isn't missing a SerialVersionUID it just doesn't have one that you have specified.
There are potential problems with not providing your own SerialVersionUID but these generally result in an InvalidClassException being thrown.
Without seeing an
SSCCE it's hard to say exactly what is happening. Can you supply one or more information?
Can you show a small serialized file that is exhibiting this behaviour.