We perform an exploratory lattice QCD simulation of DDˉ scattering, aimed at determining the masses as well as the decay widths of charmonium resonances above open charm threshold. Neglecting coupling to other channels, the resulting phase shift for DDˉ scattering in p-wave yields the well-known vector resonance ψ(3770). For mπ=156 MeV, the extracted resonance mass and the decay width agree with experiment within large statistical uncertainty. The scalar charmonium resonances present a puzzle, since only the ground state χc0(1P) is well understood, while there is no commonly accepted candidate for its first excitation. We simulate DDˉ scattering in s-wave in order to shed light on this puzzle. The resulting phase shift supports the existence of a yet-unobserved narrow resonance with a mass slightly below 4 GeV. A scenario with this narrow resonance and a pole at χc0(1P) agrees with the energy-dependence of our phase shift. Further lattice QCD simulations and experimental efforts are needed to resolve the puzzle of the excited scalar charmonia.