EJBCA

EJBCA is a very powerful PKI written in Java. It's probably the better (of both opensource and proprietary) PKI ever written.