i have never used the classpathref but looks good(i take note). what i do in my ant projects is use classpath inside the javac task like
<!-- compile sources -->
<javac srcdir="${servlet.src}"
destdir="${servlet.dist}"
debug="on" target="1.5"
fork="yes"
executable="${.....}"
>
<classpath>
<fileset dir="${servlet.general_lib}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${project.root}/dist/dal.jar"/>
<pathelement path="${project.root}/mas/dist/gatewayAgent.jar"/>
<pathelement path="${project.root}/mas/dist/jadeOntology.jar"/>
<pathelement path="${project.root}/mas/dist/agentGenerator.jar"/>
</classpath>
</javac>
and works.
But is better your use of classpathref, you could try to run ant with -d option (debug mode) and add to your ant task debug and debuglevel take a look at the ant manual:
http://ant.apache.org/manual/CoreTasks/javac.html
With these options ant will output to the console all the debug (usefull) information, check if you are loading all of the libraries you need.
You could also check with <echo>${targetdir}</echo> if your references are correct, some times this is the key.
i hope it helps.