[Tex/LaTex] pdfx package gives me Option clash for package hyperref

option-clashpdfx

I'm using the following package for convert a PDF to a PDF/A format

\usepackage[a-1b]{pdfx}

When I compile, I receive the following error.

"Option clash for package hyperref"

I've searched within TEX but until now I didn't find any valid solution.

I compile with Mac OS Tex in TexShop. The typeset is set as LaTex.

Thank you in advance.

Edit

Here a small example of what I'm trying to achieve

\documentclass[english,lof,lot]{thesis} 
\errorcontextlines=9

\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}

\usepackage{lmodern}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Added Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{caption}
\usepackage{algorithmic}
\usepackage{array}
\usepackage{amssymb}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage[figuresright]{rotating}
\usepackage{float}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PDF/A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[a-1b]{pdfx}

// begin document here...

where thesis.cls is a document class that contains the following

\RequirePackage{ifpdf}
\ifpdf
  \RequirePackage[pdfpagelabels]{hyperref}
\else
  \RequirePackage{hyperref}
\fi

Since I didn't write the class, I would like to know if how is it possible to overcome the error.

When I try to compile with this configuration, the error is the following

The package hyperref has already been loaded with options:
[pdfpagelabels].
There has now been an attempt to load with option
[pdftex,pdfa] Adding the global options:pdfpagelabels,pdftex,pdfa to
your \documentclass declaration may fix this.

Best Answer

that should be

\RequirePackage{ifpdf}
\ifpdf \PassOptionsToPackage{pdfpagelabels}{hyperref} \fi
\RequirePackage{hyperref}