\documentclass[article]{standalone}               
\usepackage{graphicx}
\usepackage{pgf,tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.7}

\makeatletter
\pgfplotsset{
	% a special modification which allows to use the scatter/classes
	% styles inside of error bars:
    /pgfplots/error bars/draw error bar/.code 2 args={%
        \pgfkeysgetvalue{/pgfplots/error bars/error mark}%
            {\pgfplotserrorbarsmark}%
        \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%
            {\pgfplotserrorbarsmarkopts}%
		\pgfplots@scatter@classes@pre@marker@code
        \draw #1 -- #2 node[pos=1,sloped,allow upside down] {%
            \expandafter\tikz\expandafter[\pgfplotserrorbarsmarkopts]{%
                \expandafter\pgfuseplotmark\expandafter{\pgfplotserrorbarsmark}%
                \pgfusepath{stroke}}%
        };
		\endscope
    }
}
\makeatother

\begin{document}
\begin{tikzpicture}
    \begin{axis}
      \addplot [scatter,
        only marks,
        scatter src=explicit symbolic,
        scatter/classes={
          A0={mark=o,red,/pgfplots/error bars/.cd,
            error mark options={draw=red}},
          A1={mark=square,blue}},
        error bars/.cd,
        y dir=both,
        y explicit] 
      table[x=x,y=y,y error=err,meta=class,row sep=crcr] {
        x y err class\\
        0 0 1   A0\\
        1 1 1   A0\\
        2 0 1   A1\\
        3 2 2   A1\\
      };
    \end{axis}
\end{tikzpicture}
\end{document}
