We present a cavitation model based on the Stokes equation and formulate adaptive finite element methods for its numerical solution. A posteriori error estimates and adaptive algorithms are derived, and numerical examples illustrating the theory are supplied, in particular with comparison to the simplified Reynolds model of lubrication.