Replaced resolve() with getResource().