Maybe this will fix the class cast exception in java 6?