We consider generalized linear mixed models (GLMMs) and frailty models (FMs) when one of the predictors is measured with error for clustered discrete, continuous and survival data. We explore these models from two directions: bias analysis and parameter inference. We study the asymptotic bias when measurement error is ignored. We show that the observed data conditional on the error-prone covariates also follow GLMMs and FMs, but having much more complicated forms. We develop a structural model for parameter estimation using MLEs. For frailty measurement error models, we propose the nonparametric maximum likelihood (NPMLE) method. We prove the identifiability of the model, the existence of the NPML estimates (NPMLEs), and consistency and asymptotic normality of the NPMLEs. An EM algorithm is developed to calculate the NPMLEs. The proposed method is applied to the western Kenya parasitemia data and its performance is evaluated through simulations.