One thing that looks suspicious about your code is that the getSalt() method computes a new random salt every time that you call it.
That's probably the cause of the problems.
You should compute a new salt once, and then use that computed value, instead of computing a new value each time in getSalt().