In DirichletCondition the u(x) function is black and must have been defined earlier and that's why you have errors.Start Mathematica with a clear Kernel.