tweaked files for compatibility with hibernate 4.x