as Longxing mentions, the ClassCast errors are due,
March 27, 2007 at 1:46 AM
as Longxing mentions, the ClassCast errors are due to duplicate EJB classes. Basically, you do not need the EJB classes in your WAR file since they are in the JAR already (at least this is the case for JBoss 4.0.5). I was able to get this example working by commenting out one task within the ant file.
The line to remove is the first 'copy' task in the target named "buildWar". It copies the classes into the War (what we want to avoid).