Canonical divisors in weighted Bergman spaces