Cancer pain patients need variable opioid doses. Preclinical and clinical studies suggest that opioid efficacy is related to genetic variability. However, the studies have small samples, findings are not replicated, and several candidate genes have not been studied. Therefore, a study of genetic variability with opioid doses in a large population using a confirmatory validation population was warranted. We recruited 2294 adult European patients using a World Health Organization (WHO) step III opioid and analyzed single nucleotide polymorphisms (SNPs) in genes with a putative influence on opioid mechanisms. The patients' mean age was 62.5 years, and the average pain intensity was 3.5. The patients' primary opioids were morphine (n = 830), oxycodone (n = 446), fentanyl (n = 699), or other opioids (n = 234). Pain intensity, time on opioids, age, gender, performance status, and bone or CNS metastases predicted opioid dose and were included as covariates. The patients were randomly divided into 1 development sample and 1 validation sample. None of 112 SNPs in the 25 candidate genes OPRM1, OPRD1, OPRK1, ARRB2, GNAZ, HINT1, Stat6, ABCB1, COMT, HRH1, ADRA2A, MC1R, TACR1, GCH1, DRD2, DRD3, HTR3A, HTR3B, HTR2A, HTR3C, HTR3D, HTR3E, HTR1, or CNR1 showed significant associations with opioid dose in both the development and the validation analyzes. These findings do not support the use of pharmacogenetic analyses for the assessed SNPs to guide opioid treatment. The study also demonstrates the importance of validating findings obtained in genetic association studies to avoid reporting spurious associations as valid findings. To elicit knowledge about new genes that influence pain and the need for opioids, strategies other than the candidate gene approach is needed. Variability in 112 single nucleotide polymorphisms in 25 candidate genes did not influence opioid doses in 2294 European cancer pain patients.