Heat oil in a pot over medium heat. Add carrots, celery, and onion; cook and stir until onion is translucent, about 5 minutes. Add chicken broth, great Northern beans, kidney beans, and ham. Stir in water and rosemary. Season with salt and white pepper. Simmer, stirring occasionally, until vegetables are soft, about 30 minutes.