We show that a Dirac Hamiltonian with equal scalar and vector harmonic oscillator potentials has not only a spin symmetry but a U(3) symmetry and that a Dirac Hamiltonian with scalar and vector harmonic oscillator potentials equal in magnitude but opposite in sign has not only a pseudospin symmetry but a pseudo-U(3) symmetry. We derive the generators of the symmetry for each case.